This section describes the event data that is associated with event types. Events are asynchronously returned to the application from the eventhandler.
The following XML schema definition provides a formal definition of all possible XML payloads that are valid with event types.
<xs:simpleType name="event_type">
<xs:restriction base="xs:string">
<xs:enumeration value="end_play" />
<xs:enumeration value="end_playcollect" />
<xs:enumeration value="end_playrecord" />
<xs:enumeration value="end_overlay" />
<xs:enumeration value="keepalive" />
<xs:enumeration value="incoming" />
<xs:enumeration value="ringing" />
<xs:enumeration value="connected" />
<xs:enumeration value="hangup" />
<xs:enumeration value="info" />
<xs:enumeration value="dtmf" />
<xs:enumeration value="tone" />
<xs:enumeration value="any" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="event_data_name">
<xs:restriction base="xs:string">
<xs:enumeration value="result" />
<xs:enumeration value="reason" />
<xs:enumeration value="digits" />
<xs:enumeration value="tone" />
<xs:enumeration value="duration" />
<xs:enumeration value="uri" />
<xs:enumeration value="caller_uri" />
<xs:enumeration value="content_type" />
<xs:enumeration value="content" />
<xs:enumeration value="transaction_id" />
</xs:restriction>
</xs:simpleType>
<xs:element name="event_data">
<xs:complexType>
<xs:attribute name="name" type="event_data_name" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:simpleType name="event_resource_type">
<xs:restriction base="xs:string">
<xs:enumeration value="call" />
<xs:enumeration value="conference" />
<xs:enumeration value="any" />
</xs:restriction>
</xs:simpleType>
<xs:element name="event">
<xs:complexType>
<xs:sequence>
<xs:element ref="event_data" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="type" type="event_type" use="required" />
<xs:attribute name="resource_type" type="event_resource_type" />
<xs:attribute name="resource_id" type="xs:string" />
</xs:complexType>
</xs:element>
Event parameters provide information about the specific event, such as type.
Parameter |
Description |
Values |
type |
The event type. |
end_play end_playcollect end_playrecord end_overlay dtmf tone info incoming ringing connected hangup keepalive |
resource_type |
The resource type associated with the event. |
call or conference |
resource_id |
A unique ID. |
N/A |
Event data is provided in two parts – a description of the data (name) and then data itself.
Parameter |
Description |
Values |
name |
The name of an event data. |
reason tone digits duration caller_uri uri content_type content transaction_id |
value |
The value of an event data. |
varies |
This table contains detailed descriptions of the event types and an example of the XML payload that accompanies the event.
Event |
Description |
Event Payload |
end_play |
transaction_id Reason:
Duration in milliseconds |
<web_service version="1.0"> |
end_playcollect |
transaction_id Reason:
tone Duration in milliseconds |
<web_service version="1.0"> |
end_playrecord |
transaction_id Reason:
Duration in milliseconds |
<web_service version="1.0"> |
end_overlay |
transaction_id Reason:
Duration in milliseconds |
<web_service version="1.0"> |
incoming |
call_id, uri, caller_uri |
<web_service version="1.0"> |
ringing |
The remote party of an outbound call is ringing. call_id |
<web_service version="1.0"> |
connected |
The remote party of an outbound call has answered. call_id Reason:
|
<web_service version="1.0"> |
hangup |
The remote party has ended the call. call_id Reason:
|
<web_service version="1.0"> |
info |
Unsolicited user information (such as SIP INFO).
|
<web_service version="1.0"> |
dtmf |
Unsolicited DTMF digits.
|
<web_service version="1.0"> |
tone |
Unsolicited tone detection events.
|
<web_service version="1.0"> |
keepalive |
Once the application starts to monitor the events, the PowerMedia XMS RESTful server will send a keepalive event periodically. |
<web_service version="1.0"> |