[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
  Google Contacts sync DLyon 0 144 10-03-2020 12:56 PM
Last Post: DLyon
  Cannot sync Google contacts CharlieX 26 9,930 09-03-2020 12:53 PM
Last Post: Maxence
  66.85.0.5 BT-Send Problem ednt 2 355 08-31-2020 10:31 PM
Last Post: Yisroel_MongoTEL
  Local and Remote phonebooks with more than 3 #s per entry? AndyInNJ 1 651 04-04-2020 09:29 AM
Last Post: complex1
  Local and Remote phonebooks pause and code (conference bridges) AndyInNJ 0 402 04-03-2020 06:02 PM
Last Post: AndyInNJ
  T46S: Outlook contacts are called to email instead of telephone number primator 0 671 02-14-2020 12:24 PM
Last Post: primator
  SpeedDial a contact from local directory Simatics 1 730 01-21-2020 11:46 AM
Last Post: Shawn_Yealink
  Delete Internal Contacts axel@circle.cloud 1 705 01-21-2020 06:42 AM
Last Post: Phil_Yealink
  Utility to sync outlook contacts with T4x phone tsukraw 3 9,594 08-06-2019 07:56 PM
Last Post: justingoldberg
  T48G / Import & sync google contacts Urbany 7 19,210 08-05-2019 09:22 PM
Last Post: justingoldberg

Forum Jump:


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

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