3-5
Cisco Unified IP Phone Services Application Development Notes
OL-18696-01
Chapter 3 Component APIs
RTP Streaming API
Examples
Start Media
•
Request
HTTP POST /CGI/Execute
<startMedia>
<mediaStream
onStopped=”Notify:http:server:80:path/page”
receiveVolume=”50”>
<type>audio</type>
<codec>G.729</codec>
<mode>sendReceive</mode>
<address>239.1.2.3</address>
<port>20480</port>
</mediaStream>
</startMedia>
•
Response
HTTP200 OK
<mediaStream id=”abc123”/>
Stop Media
•
Request
HTTP POST CGI/Execute
<stopMedia>
<mediaStream id=”abc123”/>
</stopMedia>
•
Response
HTTP 200 OK
If the user terminates the media stream by placing the active audio path on-hook, the following
notification is sent:
HTTP POST /server/path/page
DATA=<notifyMediaEvent type=”stopped” origin=”user”>
<mediaStream id=”abc123”/>
</notifyMediaEvent>
Errors and Responses
Error conditions and responses for the RTP Streaming API include:
Condition
Applicable
Methods
HTTP Result Code
Type
Data
Authorization failed
all
401 (Authorization Failed) N/A
N/A