10-12-2011 02:03 AM
Is there a way to tell the phone to dail a number by using a http request.
Something like the ~/admin/reboot and ~/admin/resync?http://server/file ?
Many thanks!
10-27-2011 07:38 AM
I have found the solution my self.
A POST request to the phone's adress http(s)://xxx.xxx.xxx.xxx/Execute can be used to make the phone dail by using XML.
XML example:
By pushing the XML as POST in the variable called "XML" the phone will open the first line and dail.
My way is to use Curl in PHP to tell the phone to dail by request of the CRM.
12-21-2011 08:25 AM
Hi Bastiaan,
I am trying to replicate in a spa508g. Can you tell me what you mean by: variable called "XML". As a matter of fact if you can send post a tcpdump of the packet and/or how to use curl, it would be great. (although this post is already great)
Thanks Diego
12-23-2011 10:36 AM
For benefit of future generations:
POST /CGI/Execute HTTP/1.1
Host: 172.26.0.18
Accept: */*
Content-Type: text/xml; charset="UTF-8"
Content-Length: 95
XML=
HTTP/1.1 200 OK
Content-Type: text/html
Cache-Control: must-revalidate, no-store
Connection: close
01-06-2012 02:14 AM
I use the fallowing script. Please note this is a example and you have to check for errors. I picked this out of my script.
$telefoonnummer = "
$Phone = "
$data .= "
$data .= "
$data .= "
$postdata = "XML=".$data;
$url = "http://".$Phone."/CGI/Execute";
$options = array(
// CURLOPT_PROXY => "
// CURLOPT_PROXYPORT => "80", //Proxy port if needed
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => true, // return headers
CURLOPT_USERAGENT => "CURLPHONE", // who am i
CURLOPT_CONNECTTIMEOUT => 10, // timeout on connect
CURLOPT_TIMEOUT => 10, // timeout on response
CURLOPT_POST => 1, // i am sending post data
CURLOPT_POSTFIELDS => $postdata, // this are my post vars
);
$ch = curl_init($url);
curl_setopt_array($ch,$options);
$content = curl_exec($ch);
$err = curl_errno($ch);
$errmsg = curl_error($ch) ;
$header = curl_getinfo($ch);
curl_close($ch);
?>
05-25-2013 04:37 AM
Hi Bastiaan,
I am trying to do the same. I want to send a dial request to SPA525G2 and SPA509G phones from my application.
I have been unable to find a suitable solution. Can you explain your solution via XML in a little more detail.
I have come across an application called Dialectic for Mac which simply asks for the IP address of the phone and is able to dial numbers from my address book. I wish to do something similar from my .NET application but cant find a suitable route.
Please help.
05-26-2013 11:24 PM
Hi Nirav,
Please note i used a PHP web application to do this. Also the code above requires PHP with CURL.
But bascliy what the script does is a http POST request to the phone with XML.
I'm posting "XML=
With this i tell the phone to dial the number filled in where
Please check http://www.cisco.com/en/US/docs/voice_ip_comm/cuipph/all_models/xsi/7_0/english/programming/guide/xsi70uri.html to see what you can do more with the IP phone.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide