New Forum system requires email address which you used to apply for your account to replace your original username. Password stays the same.Please see this post for more details
http://forum.yealink.com/forum/showthread.php?tid=40344

Yealink Test Club has been officially launched. Please visit post below to get detail information. Come and join us!
http://forum.yealink.com/forum/announcements.php?aid=18

We just had the YMCS online and we are also working on the features plan on the future versions, in this regard we are need to hear your voice about the YMCS.
Please visit : http://forum.yealink.com/forum/showthread.php?tid=42322


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
  Cannot sync Google contacts CharlieX 4 240 Today 11:34 AM
Last Post: garcia567
  SpeedDial a contact from local directory Simatics 0 15 Yesterday 07:33 AM
Last Post: Simatics
  Delete Internal Contacts axel@circle.cloud 0 16 01-16-2020 05:36 PM
Last Post: axel@circle.cloud
  Utility to sync outlook contacts with T4x phone tsukraw 3 7,501 08-06-2019 07:56 PM
Last Post: justingoldberg
  T48G / Import & sync google contacts Urbany 7 15,075 08-05-2019 09:22 PM
Last Post: justingoldberg
  bug T48G - dialog-info local identify name not show on BLF alert Kamik 8 6,669 06-10-2019 06:47 AM
Last Post: JERALD
  T48G with newest firmware - Local Directory not showing, Netzwork Directory instead sani390 2 1,251 08-21-2018 03:18 PM
Last Post: johnkiniston
  Call Transfer Issue - No Contacts Displayed Vikas 0 1,396 09-05-2017 10:06 AM
Last Post: Vikas
Exclamation Local Contacts Backup Not Working Garan 1 1,692 08-28-2017 04:25 PM
Last Post: complex1
  Local Sip port on T46 JamesC 7 4,841 08-25-2017 06:55 AM
Last Post: Karl_Yealink

Forum Jump:


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

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