cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1406
Views
1
Helpful
2
Replies

CiscoIPPhoneText and SPA504G (7.5.6)

moreavlueit
Level 1
Level 1

Hello,

if i send a POST-Request to my Device like the following, the Device is doing the call to the given number:

<CiscoIPPhoneExecute><ExecuteItem URL="Dial:4711" /></CiscoIPPhoneExecute>

If i send a POST-Request with CiscoIPPhoneText to show a message on the Phones-Display, nothing happens:

<CiscoIPPhoneText><Prompt>my prompt</Prompt><Text>my message</Text></CiscoIPPhoneText>

Do i have to set up something? Or what i'm doing wrong? The XML-Response Looks okay.

I try it with a simple python-script:

Python 3.2.5 (default, May 15 2013, 23:06:03) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import http.client
>>> url = '192.168.0.10'
>>> urlpath = '/CGI/Execute'
>>> xml = "XML=<CiscoIPPhoneText><Prompt>my prompt</Prompt><Text>my message</Text></CiscoIPPhoneText>"
>>> conn = http.client.HTTPConnection(url)
>>> conn.request("POST", urlpath, body=xml, headers={'content_type':'xml'})
>>> response = conn.getresponse()
>>> print(response.status, response.reason)
200 OK
>>> data = response.read()
>>> print(data)
b'<?xml version="1.0" encoding="iso-8859-1"?>\r\n<CiscoIPPhoneResponse>\r\n<ResponseItem Status="0" Data="" URL=""/>\r\n<ResponseItem Status="0" Data="" URL=""/>\r\n<ResponseItem Status="0" Data="" URL=""/>\r\n</CiscoIPPhoneResponse>\r\n'
>>> conn.close()
>>>

Any help is appreciated.

Best regards

Karsten

2 Replies 2

dstaudt
Cisco Employee
Cisco Employee

The SPAxxx phones are not officially supported with the IP Phone Services SDK, so it's unknown to what extent various IPPS requests will work.

That being said, you might try using CiscoIPPhoneExecute to send a URL (instead of Dial:) - it's possible the phone might go ahead and retrieve it.  I think strictly speaking CiscoIPPhoneExecute is supposed to be the only object that can be POSTed, though it turns out most other phones accept other object types.

therealfafnir
Level 1
Level 1

If you want to push a text object to the phone  (not a status update) you can try this

<CiscoIPPhoneExecute>

  <ExecuteItem Priority="0" URL="http://myserver/mypath/mytext_object.xml"/>

</CiscoIPPhoneExecute>

where mytext_object.xml contains (Ta-Taaa!) the desired xml object to execute/ display:


<CiscoIPPhoneText><Prompt>my prompt</Prompt><Text>my message</Text></CiscoIPPhoneText>

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: