cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1111
Views
0
Helpful
0
Replies

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

Evgeny Udaltsov
Level 1
Level 1

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
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: