HTTP APIs are exported that allow interaction and notifications with any SIP event packages - for example the reg event package, dialog info, message-waiting, rtcp-stats etc.
In order to subscribe to a dialog, firstly post a HTTP request to the API controller:
POST /v/2009-06/sep HTTP/1.1
Content-Type: text/xml
<?xml version="1.0"?>
<subscribe xmlns="http://voip.co.uk/api/sep/2009-06" event="reg">
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
<list>
<entry uri="sip:bill@example.com" />
<entry uri="sip:joe@example.org" />
<entry uri="sip:ted@example.net" />
</list>
</resource-lists>
<notify url="http://my.server.com/callback?xxx=yyy"/>
<expires>2009-06-01T18:00:00+00:00</expires>
<accept>application/reginfo+xml</accept>
</subscribe>
The result will contain a 201 Created, and a Location header pointing to the subscription:
HTTP/1.1 201 Created Location: http://api.voip.co.uk/v/2009-01/sep/182ebe38-3854-4873-a8ab-2cb0eff38b4c
Fetching the resource will provide the subscription status:
GET /v/2009-01/sep/182ebe38-3854-4873-a8ab-2cb0eff38b4c
Host: api.voip.co.uk
Accept: xxxx
HTTP/1.1 200 OK
<?xml version="1.0"?>
<subscription xmlns="http://voip.co.uk/api/sep/2009-06" event="reg">
<list xmlns="urn:ietf:params:xml:ns:rlmi" uri="sip:domain.com" version="1" fullState="true">
<resource uri="sip:bill@example.com"">
<instance id="juwigmtboe" state="active">
<reginfo xmlns="urn:ietf:params:xml:ns:reginfo" version="1" state="partial">
<registration aor="sip:bill@example.com" id="a7" state="active">
<contact id="76" state="active" event="registered" duration-registered="0">
<uri>sip:bill@pc34.example.com</uri>
</contact>
</registration>
</reginfo>
</instance>
</resource>
<resource uri="sip:joe@example.org" />
<resource uri="sip:ted@example.net" />
</list>
<notify url="http://my.server.com/callback?xxx=yyy"/>
<expires>2009-06-01T18:00:00+00:00</expires>
</subscribe>