cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8797
Views
0
Helpful
6
Replies

Cisco SPA 525G | Dial number by http(s) request

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!

6 Replies 6

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.

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

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

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   => "", //Proxy host if needed
   // 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);
?>

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.

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=" to the phone's execute address http:///CGI/Execute

With this i tell the phone to dial the number filled in where with the highest priority.

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.