cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Please note that Remote Expert Mobile announced end-of-life and support will end on February 28, 2022.
163
Views
0
Helpful
0
Replies
Highlighted

A way to push a text message to Cisco Phone. Python Requests.

Hi Team!
May be somebody already have a solution... I try to find a way to send a Text Message to the Cisco Phone. I have discovered a small documented example, but it does not describe how to send the message:
https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cuipph/all_models/xsi/9-1-1/CUIP_BK_P82B3B16_00_phones-services-application-development-notes/CUIP_BK_P82B3B16_00_phones-services-application-development-notes_chapter_0101.html#CUIP_RF_D711F1A6_00

 

Device URI Example

This alert example performs the following actions:

  1. Plays a tone on the phone
  2. Unlocks the phone
  3. Displays an alarm message on the phone
<CiscoIPPhoneExecute>
    <ExecuteItem URL="Device:Unlock"/>
    <ExecuteItem URL="Play:alert.wav"/>
</CiscoIPPhoneExecute>

On processing the above command, the following response is sent:

<CiscoIPPhoneText>
    <Title>Alert</Title>
    <Prompt>Urgent</Prompt>
    <Text>
        Please go to room 1234.
    </Text>
    <SoftKeyItem>
        <Name>Accept</Name>
        <URL>http://<ip>/AlertResponse.jsp?reason=accept</URL>
    </SoftKeyItem>
    <SoftKeyItem>
        <Name>Busy</Name>
        <URL>http://<ip>/AlertResponse.jsp?reason=busy</URL>
    </SoftKeyItem>
</CiscoIPPhoneText>

The POST request with Cisco IP Phone Execute is quite clear, i use the python requests and i can execute the call or send the Key, but i don't understand how to send the text message.

xml = """
<CiscoIPPhoneExecute>
<ExecuteItem URL="{command}" Priority="0"/>
</CiscoIPPhoneExecute>"""

response = requests.post("http://{ip}/CGI/Execute".format(ip=phone_ip),
    timeout = 3,
    auth = HTTPBasicAuth(USERID, PASSWORD),
    data = {"XML": xml.format(command="Key:Applications")}).text

>>>
    <?xml version="1.0" encoding="utf-8"?>
    <CiscoIPPhoneResponse>
    <ResponseItem URL="Key:Applications" Data="Success" Status="0" />
    </CiscoIPPhoneResponse>

What am i missing? Is it possible?

 

0 REPLIES 0