One of the interfaces available in our PowerMedia
Extended Media Server (XMS) is the ability to use RESTFul web services to
control the media server. RESTFul web services provides an easy paradigm to get
access to call control and media resources via web services provided by
XMS. A developer can use any programming or scripting languages they are
familiar with to accomplish this, as long as it supports functions for dealing
with http services. Development environments could include Java, C#, PERL, PHP, ... etc.. This post is to give a brief overview of the XMS RESTful interface.
You are probably already familiar with the idea of http
serving up, for example, web pages as shown below:
PowerMedia XMS provides a similar interface for
communication media platforms:
The above shows a simple request to create a call. You’ll
notice an application ID (appid) which allows you to define discrete appids so
that multiple applications may be simultaneously run on a single XMS server.
The payload that would go along with the request looks like this:
The payload is straightforward in that it specifies the
destination and whether you wish to have call progress analysis enabled, i.e.
cpa=”yes”. Once sent to the XMS, a response comes back as 201 to let you
know that the process of creating a call has been started. The 201 will
also have a payload that will give a little more information on the call that
has been initiated; most import is the call identifier which is a unique
reference # for the call.
This is pretty much it to create call, i.e. (1) specify http
command and (2) associated payload.
To be upfront, there is a little more work needed to make a
full robust application. With communication applications there are unsolicited
events such as call status information, play completion events, etc. that you
would need to look out for. This can be done with http event
streaming. With a typical http request, a connection is made between the
client and the server and is closed out when the request is done. With
http event streaming, the connection remains open which allows the web service
to continue to send raw data across. You would want to open another thread or process that is monitoring for events. For a call you would get back an
event message with the call identifier that would let you know the state of the
For more information on PowerMedia XMS, please visit: http://www.dialogic.com/en/products/media-server-software/xms.aspx