on 01-24-2014 02:28 PM
You can Push a CiscoIPPhoneText to the other phone.
What you need is to know the IP adress of the other Phone so, you need to implement a method to retrieve IP Adress from for example DN or other parameter.
You can develop an XML service to insert DN to find the phone you want to send the message, then by AXl library you can retrieve the devicename associated to th Dn(you can have more than one device associate, however), and then you can retrieve IP Adress by the serviceability XML library (given the devicename).
I made an implementation of this.
It's not simple because it's based on our framework, we've developed.
You need some little bricks, in order to:
- retrieve devicename'phone associated to a DN (rof. AXL)
- retrieve IP Adress 's phone from the device name (rif. Serviceability AXL)
- a method to push an XML object (CiscoIPPhoneText) to a phone (rif. Cisco IPPhone service, HTTP Post).
Hope this help.
Cisco XML Objects can be either pushed (HTTP POST) or pulled (HTTP GET).
If you see the Cisco Documentation Cisco Unified IP Phone Services Application Development Notes (Supporting XML Application):
The following description designates how an HTTP server request is made to the phone via an HTTP POST operation:
1.The server performs an HTTP POST in response to a case-sensitive URL of the phone with this format: http://x.x.x.x/CGI/Execute, where x.x.x.x represents the IP address of the destination Cisco Unified IP Phone.
The form that is posted should have a case-sensitive form field name called ¿XML¿ that contains the desired XML object. For any HTTP POST operation, the server must provide basic HTTP authentication information with the POST. The provided credentials must be of a user in the global directory with a device association with the target phone
You can Push any object via the CiscoIPPhoneExecute object or push directly other displayable XML Object (such as CiscoIPPhoneMenu, CiscoIPPhoneText or CiscoIPPhoneStatus).
You can do this from any application (Web, service...) and from any language, that support http request.
This is a C# example:
string pushxml = "XML=" + HttpUtility.UrlEncode(url1);
string uri = "http://" + ipddress + "/CGI/Execute";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
req.ContentType = "application/x-www-form-urlencoded";
//req.Connection = "close";
req.Credentials = new System.Net.NetworkCredential(uid, pwd);
req.Method = "POST";
System.IO.Stream stream = req.GetRequestStream();
byte[] arrBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(pushxml);
stream.Write(arrBytes, 0, arrBytes.Length);
stream.Close();
WebResponse resp = req.GetResponse();
Stream respStream = resp.GetResponseStream();
StreamReader rdr = new StreamReader(respStream, System.Text.Encoding.ASCII);
string strResponse = rdr.ReadToEnd();
return strResponse;
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: