Pop up Message from one Cisco IP Phone to another ?

Version 1

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Stefania Oliviero on 02-08-2011 05:05:11 AM
    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.
    This document was generated from CDN thread

    Created by: Jun Hong Lexus Sim on 02-08-2011 01:31:34 AM
    Is it possible for a Cisco IP Phone to send a message to another Cisco IP Phone and display a Pop up Message ?

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: NIGEL WARBURTON on 02-08-2011 04:49:31 AM
    hi there, additional software would be required to do what your trying to achieve (that is if you are looking for a commercial product). I would look at Burbee and Dominocomms (Phone Pager & Action Caller) for products that can do this out of the box. Let me know if you want any further infomation on either.
     

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Jun Hong Lexus Sim on 04-08-2011 12:44:54 AM
    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.

     
    Could a get a sample of your implementation if you don't mind ?

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Stefania Oliviero on 04-08-2011 11:28:30 AM
    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.

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Jun Hong Lexus Sim on 08-08-2011 02:23:39 AM
    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.

     
    If I just want to sent to a specific phone do I still need all that ?

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Jeffrey Ness on 08-08-2011 07:23:04 AM
    If by a specific phone you mean 1 and only 1 physical phone handset which you would create a DHCP reservation for it's IP address not to change you could cut out the first 2 points. I don't think you could natively use an IP Phone Service to push to the destination phone as it will end up with a GET request and not a POST type request so you would still need a web server hosting an application (IP Phone Service) to receive the request from the source phones and initiate the push of the CiscoIPPhoneText XML to the destination phone in the proper format.

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Stefania Oliviero on 08-08-2011 08:25:29 AM
    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;

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Stefania Oliviero on 08-08-2011 09:27:59 AM
    You must have a Web Server if you want to Push Images or objects larger than 512 bytes, or if you push a CiscoIPPhoneExecute object that includes url to a web server.
    In any case you can start a request from your application based on some business logic, not necessarily from the phone..

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Jun Hong Lexus Sim on 09-08-2011 11:22:50 PM
    I am confused with the sudden influx of different knowledge, I think I was not clear in what I was trying to convey in the 1st place.
    I have this application that sends an a text to a mobile phone, currently I wish to send not just only a text but a notification/text to a specific IP Phone as well

    Subject: RE: New Message from Jun Hong Lexus Sim in IP Phone Services (IPPS) - IP Ph
    Replied by: Stefania Oliviero on 10-08-2011 03:29:12 AM
    Sorry, I don¿t understand. What do you mean with notification/text ?

    From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
    Sent: mercoledì 10 agosto 2011 05:23
    To: cdicuser@developer.cisco.com
    Subject: New Message from Jun Hong Lexus Sim in IP Phone Services (IPPS) - IP Phone Services Questions: RE: Pop up Message from one Cisco IP Phone to another ?

    Jun Hong Lexus Sim has created a new message in the forum "IP Phone Services Questions":

    --------------------------------------------------------------
    I am confuse with the sudden influx of different knowledge, I think I was not clear in what I was trying to convey in the 1st place.
    I have this application that sends an a text to a mobile phone, currently I wish to send not just only a text but a notification/text to a specific IP Phone as well
    --
    To respond to this post, please click the following link:

    <http://developer.cisco.com/web/ipps/forums/-/message_boards/view_message/4339895>

    or simply reply to this email.

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Jun Hong Lexus Sim on 10-08-2011 04:55:06 AM
    It's just a CiscoIPPhoneText with some text in it to inform the person

    Subject: RE: New Message from Jun Hong Lexus Sim in IP Phone Services (IPPS) - IP Ph
    Replied by: Stefania Oliviero on 10-08-2011 07:40:12 AM
    So,you have to send a message from phone A to phone B , I think what I¿ve written in the previous message is still valid.
    I figure out you  have a web application to handle request from Phone A. Then, from this web application,  you can push anything you want to phone B, using the push function I wrote in the previous message.
    You can use CiscoIPPhoneExcute , in such a case you must have  a Web application  (that you already have) or a CiscoIpPhoneText object directly.
    Hope this help.


    From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
    Sent: mercoledì 10 agosto 2011 10:55
    To: cdicuser@developer.cisco.com
    Subject: New Message from Jun Hong Lexus Sim in IP Phone Services (IPPS) - IP Phone Services Questions: RE: Pop up Message from one Cisco IP Phone to another ?

    Jun Hong Lexus Sim has created a new message in the forum "IP Phone Services Questions":

    --------------------------------------------------------------
    It's just a CiscoIPPhoneText with some text in it to inform the person
    --
    To respond to this post, please click the following link:

    <http://developer.cisco.com/web/ipps/forums/-/message_boards/view_message/4342714>

    or simply reply to this email.

    Subject: RE: Pop up Message from one Cisco IP Phone to another ?
    Replied by: Jun Hong Lexus Sim on 12-08-2011 05:32:03 AM
    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;

     
    Can you explain more regarding this example, I don't really get ContentType part, pushxml 

    Subject: when send HTTP request with CiscoIPPhoneExecute
    Replied by: Mahmoud Ahmed on 12-12-2012 09:09:53 AM
    Hi,
    just 2 Questions please..
    when send HTTP request with CiscoIPPhoneExecute
     
    1- using "CallManagerSimulator.exe" and "IP Phone 7960G" , Authentication required??
        -yes i can access "http://X.X.X.X/CGI/Execute" (but Username/ Password required) Error Log 4.?????
        -yes registered and can access the url services.
     
    2- using "CallManager6 VMware" and "IP Communicator", the ip communicator take the same ip address of the pc
     
        -No i can't access "http://X.X.X.X/CGI/Execute" (not found) (404).????
        -yes registered and can access the url services.
        - pc (192.168.1.2)  IP Cummunicator(192.168.1.2)  CUCM VMware in same pc (192.168.1.3)
     
    please help, thanks