-
Notifications
You must be signed in to change notification settings - Fork 34
FreeSWITCH Rayo Extension
rayo-freeswitch extends the Rayo specification and has its base namespace at urn:xmpp:rayo:freeswitch
. It provides the means to access the FreeSWITCH Inbound Event Socket interface via Rayo.
Events are sent by FS to all subscribing clients that registered using the "event" command. They are propagated by Rayo to all registered parties by way of an XMPP presence stanza. The following is the minimum data sent for a FreeSWITCH event (more information)
Event-Name: RE_SCHEDULE
Core-UUID: 6d2375b0-5183-11e1-b24c-f527b57af954
FreeSWITCH-Hostname: freeswitch.local
FreeSWITCH-Switchname: freeswitch.local
FreeSWITCH-IPv4: 127.0.0.1
FreeSWITCH-IPv6: ::1
Event-Date-Local: 2012-02-07 19:36:31
Event-Date-GMT: Tue, 07 Feb 2012 18:36:31 GMT
Event-Date-Timestamp: 1328639791116026
Event-Calling-File: switch_scheduler.c
Event-Calling-Function: switch_scheduler_execute
Event-Calling-Line-Number: 65
Event-Sequence: 3349
Which will translate to the following XMPP stanza:
<presence to="[email protected]/1" from="[email protected]">
<event xmlns="urn:xmpp:rayo:freeswitch:ies:1" name="RE_SCHEDULE">
<attribute name="Unique-ID" value="005f03fa-c803-428e-92cb-10534ac780dd"/>
<attribute name="Core-UUID" value="6d2375b0-5183-11e1-b24c-f527b57af954"/>
<attribute name="FreeSWITCH-Hostname" value="freeswitch.local"/>
<attribute name="FreeSWITCH-Switchname" value="freeswitch.local"/>
<attribute name="FreeSWITCH-IPv4" value="127.0.0.1"/>
<attribute name="FreeSWITCH-IPv6" value="::1"/>
<attribute name="Event-Date-Local" value="2012-02-07 19:36:31"/>
<attribute name="Event-Date-GMT" value="Tue, 07 Feb 2012 18:36:31 GMT"/>
<attribute name="Event-Date-Timestamp" value="1328639791116026"/>
<attribute name="Event-Calling-File" value="switch_scheduler.c"/>
<attribute name="Event-Calling-Function" value="switch_scheduler_execute"/>
<attribute name="Event-Calling-Line-Number" value="65"/>
<attribute name="Event-Sequence" value="3349"/>
</event>
</presence>
The from attribute on presence will be of the form "[email protected]" if the event has a Unique-ID and thus comes from a call, or just "call.rayo.net" if not. The above example adds the ID for display purposes.
All IES commands follow the same syntax