cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
410
Views
0
Helpful
0
Comments
cdnadmin
Community Member

Subject: RE: ExecuteItem Init:Services Close Services Tabs
Replied by: Florian Kroessbacher on 07-06-2011 03:59:42 PM
Hy,


try to send

<CiscoIPPhoneExecute><ExecuteItem URL="Init:Services" /></CiscoIPPhoneExecute>

I think the phone differences between '' an ""

cheers Floh
This document was generated from CDN thread

Created by: Richard Rhinehart on 07-06-2011 03:31:33 PM
Hello,
 
I currently have an application that acts as a callerID. It will push the name of the caller to the services window upon the call alerting event.  This works. However, I need to have the services screen exit either when the call is connected or disconnected.  I have read in this forum that you can accomplish closing the services screen by performing a <CiscoIPPhoneExecute><ExecuteItem URL='Init:Services' /></CiscoIPPhoneExecute> 
 
Currently I am trying to accomplish this in two places and I am unsuccessful in both.
 
In my server observer object I have tried the following. I've tried encoding the xml as well as sending the raw xml as shown above.
 

if (ev instanceof ConnConnectedEv) {
          String origNumber = conns[0].getAddress().getName();
          String destNumber = conns[1].getAddress().getName();
           // Create the Execute object to PUSH to the phone that just answered this call
              String xml = "%3CCiscoIPPhoneExecute%3E%3CExcecuteItem%20URL%3D'Init%3AServices'%20%2F%3E%3C%2FCiscoIPPhoneExecute%3E";
              // Use the 2nd Connection object because it will be the receiving end of the call -
              // that's the phone we want to PUSH to
              CiscoTerminal ct = (CiscoTerminal) conns[1].getTerminalConnections()[
                  0].getTerminal();
try {
                // DEBUG code
                System.out.println("SENDING:" + xml + " \r\n to phone " +
                                   ct.getName());
                ct.sendData(xml);
              }
              catch (Exception e) {
                System.out.println(e);
 
              }



 
I also have tried pointing the above sendData(xml) to point to a url that runs and outputs the following. Again I've tried encoding the xml as well.
A)out.println("<CiscoIPPhoneExecute><ExcecuteItem URL='Init:Services' /></CiscoIPPhoneExecute>");
out.println("%3CCiscoIPPhoneExecute%3E%3CExcecuteItem%20URL%3D'Init%3AServices'%20%2F%3E%3C%2FCiscoIPPhoneExecute%3E");
 
The only thing I've noticed that occurs is when I have A) implemented I get a parse xml 4 error.
 
Am I correct in assuming that Init:Services should clear all services tabs from the phone?
 
If so am I sending the xml correctly?
 
Do I need to encode the xml when it gets sent?
 
Any help would be greatly appreciated.
 
Regards,
 
Rick

Subject: RE: ExecuteItem Init:Services Close Services Tabs
Replied by: NIGEL WARBURTON on 08-06-2011 10:24:44 AM
speak mark work for me. Also I found on some phones that I needed to add \r\n (maybe just need the \n) to the add of the the lines. Here is a snippet from me: -

    $pushdata .= "<CiscoIPPhoneExecute>\r\n" ;
    $pushdata .= "<ExecuteItem Priority=\"0\" URL=\"Init:Services\"/>\n" ;
    $pushdata .= "</CiscoIPPhoneExecute>\r\n" ;

I also have priority set whereas you dont. Hope this helps.

Subject: RE: ExecuteItem Init:Services Close Services Tabs
Replied by: Richard Rhinehart on 08-06-2011 10:20:43 AM
Thanks Floh, however that was unsuccessful.


I added the quotes and my code now looks like this.  On connected it should remove the services tab. However it is just hiding it.  Any other ideas? Am I doing things correctly?

if (ev instanceof ConnConnectedEv) {
              String origNumber = conns[0].getAddress().getName();
              String destNumber = conns[1].getAddress().getName();
              // Create the Execute object to PUSH to the phone that just answered this call
              String xml = "<CiscoIPPhoneExecute><ExcecuteItem URL=\"Init:Services\" /></CiscoIPPhoneExecute>";
              // Use the 2nd Connection object because it will be the receiving end of the call -
              // that's the phone we want to PUSH to
              CiscoTerminal ct = (CiscoTerminal) conns[1].getTerminalConnections()[
                  0].getTerminal();

              try {
                // DEBUG code
                System.out.println("SENDING:" + xml + " \r\n to phone " +
                                   ct.getName());
                ct.sendData(xml);
..............................

Subject: RE: ExecuteItem Init:Services Close Services Tabs
Replied by: Richard Rhinehart on 08-06-2011 10:55:24 AM
Thank you to both Nigel and Floh for your time and comments. I believe each of you helped me to be successful.  After adding the quotes and \n\r 's the services tab now closes.

MUCHAS GRACIAS!!!!

Subject: RE: ExecuteItem Init:Services Close Services Tabs
Replied by: NIGEL WARBURTON on 08-06-2011 11:53:12 AM
Glad to be of help! I have been thinking of doing something similar (I like to play!). Would be interested in your thoughts around how the call altering bit works for you, I'll then have a go playing. If you get chance and anything to share send me an email at mr at nigelwarburton.co.uk
Let me know if you get stuck elsewhere!
Getting Started

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:

Quick Links