The following examples show how to build SIP based WebRTC applications in a nutshell with Frafos ABC SBC server and JsSIP client.
A JsSIP User Agent is associated to a SIP user account. It requires some configuration parameters for its initialization which are provided through a configuration object. Click here for a Full UA Configuration Parameters list
On the server side, many specific options are available for REGISTER management as exposed in the Registration Caching and Handling documentation section.
First of all a pair of HTML5 video elements are created, where the local and remote media will be rendered.
An HTML button is used to terminate the call which calls the call.terminate() method on click.
On the server side, a wide range of operations can be performed such as filtering, SIP and media management, transcoding, and a long etcetera, as exposed in the General Configuration Reference.
In addition to the Outgoing Call explained in the previous example, this one provides with a mechanism to send DTMFs on an ongoing call.
HTML buttons emulate a dialpad, which use call.sendDTMF() method on click to send the corresponding DTMFs encapsulated in a SIP INFO message.
On the server side, the DTMFs are bypassed to the other end, but they could also be transformed to inband DTMFs or captured by the server to provide some functionality like call transfer, music on hold, etc.
A simple HTML buton triggers the UA.sendMessage() method to send a text message to the other end.
On the server side, the message can be forwarded to the destination or blocked based on any local policy. Of course
SIP routing rules,
and much more options are available as for any other SIP message type.