[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
API to send the account information using XML POST
Author Message
mr.expert Offline
Junior Member
**

Posts: 1
Joined: Jan 2018
Reputation: 0
Post: #1
API to send the account information using XML POST
Hello,

I am working on Yealink T23G and was trying to send sip account information from my computer to the phone using API with C program.

I followed the documentation on from the link: http://support.yealink.com/documentFront...umentId=33

Does anyone know how can I post XML to the phone using the API?
I do not want to use software/server for the HTTP server or XMLRPC. I want to POST the XML using the C program only.

Also, I was able to login to the phone using `CURL` referring the following link:
http://forum.yealink.com/forum/archive/i...-4066.html

Following command worked fine:
Code:
curl -D "abcd.txt" "192.168.0.225/servlet?p=login&q=login&username=admin&pwd=admin&jumpto=URI&&key=AutoP"

I got the response of "200 ok" and cookies got saved. (was testing on the terminal using terminal command before writing the C program)


I tried the following command to send the XML, but it did not work:
Code:
[quote]url -D "abcd.txt" -X "POST" -d "xml=<?xml version="1.0" encoding="ISO-8859-1"?><YealinkIPPhoneConfiguration Beep="yes"><Item>account.1.enable=1</Item><Item>account.1.label=1400</Item><Item>account.1.display_name
=1400</Item><Item>account.1.user_name=1400</Item><Item>account.1.auth_name=1400</Item><Item>account.1.sip_server.1.address=10.2.1.199</Item></YealinkIPPhoneConfiguration>" "192.168.0.225/servlet?p=account-register&q=load&acc=0"[/quote]

I have also tried using the postman software to find the issue but did not find the solution.

Is there a specific URL for the XML API or should I just use the IP address of the phone? Am I using the wrong API above? Is it possible to share the URL list for the XML API?

Thanks.
01-12-2018 11:37 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #2
RE: API to send the account information using XML POST
You need to lookup PushXML, that is the API that you want to use. Part of that API allows you to send configuration options (any that would normally appear in provisioning files) directly to the phone by POSTing to it. You do not have to login or pretend to be the web user, but instead have to first pre-configure the phone to allow Push requests to come from the IP of your PC.

Check the documentation on the Yealink site, the PushXML documentation is pretty self-explanitory and I believe it even comes with a sample of how to use it. You'll have to adopt that to your C program obviously, but should be straight forward if you're writing C in the first place..

Out of curiosity, what exactly is the reason for doing this?
01-19-2018 10:50 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  T55A USB headset mic send volume too low joleti@temperzone.com 0 2,724 10-29-2021 04:06 AM
Last Post: joleti@temperzone.com
  T21P E2 Send softkey missing Mardy 1 6,959 06-19-2017 02:45 AM
Last Post: Jensen_Yealink
  T21 control send volume via webgui Cynergy 7 34,565 05-30-2016 06:53 PM
Last Post: EricaJohn
  T41P: Account 1 and 2 won't register? gatorphan 9 29,947 02-12-2016 04:41 PM
Last Post: rdoyle1000
  T27P headset send volume low jaroslaw.mlynek 3 12,292 12-18-2015 02:46 PM
Last Post: Karl_Yealink
  T48G - Default Account robtrop 1 8,825 10-29-2015 07:41 PM
Last Post: Yealink_Michael
  BLF state is broken after simultaneous call to watched account strang 11 44,563 06-20-2015 06:31 PM
Last Post: Brian3644
  T26 Account 1 No Longer Will Register Bezalu 1 7,286 06-09-2015 02:42 AM
Last Post: Flora_Yealink
  T21 headset send volume low sheilab 1 10,165 02-02-2015 05:32 PM
Last Post: Yealink_Peter

Forum Jump:


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

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