[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SIP-T32G send local contacts
Author Message
Douglas Silva Offline
Junior Member
**

Posts: 1
Joined: Nov 2019
Reputation: 0
Post: #1
SIP-T32G send local contacts
Hi everyone !

I have a Yealink SIP T32G , I want to send list of contacts via API Linux Script

I'm using cURL to send the Post request but i'm receiving the error: invalid Contact file in the third cURL and in the fourth cURL say that there is no file.

What i'm doing wrong ?

this is my script:

#!/bin/bash


curl -H "Content-Type: text/html;charset=UTF-8" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: multipart/form-data" -H "Connection: keep-alive" -H "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-US,en;q=0.5" -H "Content-Length: 582" -H "Host: xx.xx.xx.xx" -H "Origin: http://xx.xx.xx.xx" -H "Referer: http://xx.xx.xx.xx/htm/iframe-upload.htm" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" --trace-ascii /root/debugdump0.txt -d @/root/ContactData.xml http://xx.xx.xx.xx/cgi-bin/cgiServer.exx


curl -H "Content-Type: text/html;charset=UTF-8" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/octet-stream" -H "Connection: keep-alive" -H "Accept: */*" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-US,en;q=0.5" -H "Content-Length: 60" -H "Host: xx.xx.xx.xx" -H "Origin: http://xx.xx.xx.xx" -H "Referer: http://xx.xx.xx.xx/cgi-bin/cgiServer.exx...ntacts.htm" -H "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" --trace-ascii /root/debugdump1.txt -d @/root/strUploadFile.file http://xx.xx.xx.xx/cgi-bin/cgiServer.exx


curl -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/octet-stream" -H "Connection: keep-alive" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-US,en;q=0.5" -H "Accept: */*" -H "Content-Length: 49" -H "Host: xx.xx.xx.xx" -H "Origin: http://xx.xx.xx.xx" -H "Referer: http://xx.xx.xx.xx/cgi-bin/cgiServer.exx...ntacts.htm" -H "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" --trace-ascii /root/debugdump2.txt -d "filterContactValidity(\"/tmp/ContactData.xml\",\"1\")" http://xx.xx.xx.xx/cgi-bin/cgiServer.exx


curl -H "Content-Type: text/html;charset=UTF-8" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/octet-stream" -H "Connection: keep-alive" --trace-ascii /root/debugdump3.txt -d @/root/systemFunc.file http://xx.xx.xx.xx/cgi-bin/cgiServer.exx



the logs:

== Info: Expire in 0 ms for 6 (transfer 0x55dcf5225e80)
== Info: Trying xx.xx.xx.xx...
== Info: TCP_NODELAY set
== Info: Expire in 200 ms for 4 (transfer 0x55dcf5225e80)
== Info: Connected to xx.xx.xx.xx (xx.xx.xx.xx) port 80 (#0)
=> Send header, 441 bytes (0x1b9)
0000: POST /cgi-bin/cgiServer.exx HTTP/1.1
0026: Host: xx.xx.xx.xx
0037: Authorization: Basic YWRtaW46YWRtaW4=
005e: Content-Type: application/octet-stream
0086: Connection: keep-alive
009e: Accept-Encoding: gzip, deflate
00be: Accept-Language: en-US,en;q=0.5
00df: Accept: */*
00ec: Content-Length: 49
0100: Origin: http://xx.xx.xx.xx
011a: Referer: http://xx.xx.xx.xx/cgi-bin/cgiServer.exx...ontacts.ht
015a: m
015d: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gec
019d: ko/20100101 Firefox/70.0
01b7:
=> Send data, 49 bytes (0x31)
0000: filterContactValidity("/tmp/ContactData.xml","1")
== Info: upload completely sent off: 49 out of 49 bytes
== Info: HTTP 1.0, assume close after body
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.0 200 OK
<= Recv header, 38 bytes (0x26)
0000: Content-Type:text/html;charset=UTF-8
<= Recv header, 12 bytes (0xc)
0000: Expires:-1
<= Recv header, 21 bytes (0x15)
0000: Accept-Ranges:bytes
<= Recv header, 17 bytes (0x11)
0000: Server:SIPPhone
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 22 bytes (0x16)
0000: Invalid Contact File !
== Info: Closing connection 0


---------------------------------------------------------------------------------------------------


== Info: Expire in 0 ms for 6 (transfer 0x560fc0da7e80)
== Info: Trying xx.xx.xx.xx...
== Info: TCP_NODELAY set
== Info: Expire in 200 ms for 4 (transfer 0x560fc0da7e80)
== Info: Connected to xx.xx.xx.xx (xx.xx.xx.xx) port 80 (#0)
=> Send header, 258 bytes (0x102)
0000: POST /cgi-bin/cgiServer.exx HTTP/1.1
0026: Host: xx.xx.xx.xx
0037: User-Agent: curl/7.64.0
0050: Accept: */*
005d: Content-Type: text/html;charset=UTF-8
0084: Authorization: Basic YWRtaW46YWRtaW4=
00ab: Content-Type: application/octet-stream
00d3: Connection: keep-alive
00eb: Content-Length: 141
0100:
=> Send data, 141 bytes (0x8d)
0000: systemFunc("cp -f /tmp/ContactData.xml /phone/config/ContactData
0040: .xml; rm -f /tmp/ContactData.xml")msgBroadcastPostMessage("0x100
0080: 07","8","0").
== Info: upload completely sent off: 141 out of 141 bytes
== Info: HTTP 1.0, assume close after body
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.0 200 OK
<= Recv header, 66 bytes (0x42)
0000: cp: cannot stat '/tmp/ContactData.xml': No such file or director
0040: y.
<= Recv header, 38 bytes (0x26)
0000: Content-Type:text/html;charset=UTF-8
<= Recv header, 12 bytes (0xc)
0000: Expires:-1
<= Recv header, 21 bytes (0x15)
0000: Accept-Ranges:bytes
<= Recv header, 17 bytes (0x11)
0000: Server:SIPPhone
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 2 bytes (0x2)
0000: 0.
== Info: Closing connection 0


Sorry for my english.

thanks in advance.
(This post was last modified: 11-13-2019 02:43 PM by Douglas Silva.)
11-13-2019 02:26 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Messages In This Thread
SIP-T32G send local contacts - Douglas Silva - 11-13-2019 02:26 PM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Utility to sync outlook contacts with T4x phone tsukraw 4 19,559 07-08-2023 08:16 AM
Last Post: ziksk8
  Send different codes on keystroke (enable and disable) Marsl84 0 911 04-21-2023 08:15 PM
Last Post: Marsl84
  T42s VPN & local SIP Accounts noch work, only one of them mysterox 0 1,422 10-27-2022 04:54 PM
Last Post: mysterox
  Delete Internal Contacts axel@circle.cloud 3 8,627 04-13-2022 10:21 PM
Last Post: Beachnuttz
Bug Transfer to Broadworks Network Directory Contacts - screen timeout issue livehappy42 0 2,636 10-27-2021 07:58 AM
Last Post: livehappy42
  Google Contacts sync DLyon 2 8,269 08-29-2021 11:14 AM
Last Post: henrym
  T46S Remote phonebook update to local phonebook. T9 Search UCUC 5 8,557 06-30-2021 02:50 PM
Last Post: UCUC
  Cannot sync Google contacts CharlieX 31 70,736 04-15-2021 08:11 AM
Last Post: TechPromise
  T46S - Outlook Contacts limited to 1499 GaryFoxTayto 0 3,269 03-02-2021 10:14 PM
Last Post: GaryFoxTayto
  66.85.0.5 BT-Send Problem ednt 2 5,326 08-31-2020 10:31 PM
Last Post: Yisroel_MongoTEL

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication