drachtio is an open-source, nodejs-based ecosystem for creating any kind of VoIP server-based application: registrar, proxy, back-to-back user agent, and many others. Within the drachtio ecosystem, drachtio-fsmrf is a high-level media processing abstraction layer that utilizes freeswitch as a media server, and partners with the drachtio signaling resource framework to enable the creation of media-processing applications such as conferencing, IVR and others.
Note: API documentation for drachtio-fsmrf can be found here.
var app = ;var Mrf = ;var mrf = app ;var Srf = ;var srf = app ;srf;mrf;srf;
Note: drachtio-fsmrf applications require a network connection to a drachtio server process that sits in the VoIP network and handles the low-level SIP messaging.
Additionally, drachtio-fsmrf applications require a freeswitch media server, configured as defined in the drachtio-fs-ansible, which provides an ansible role that can be used build up a freeswitch media server for use with drachtio-fsrmf from a vanilla ubuntu install.
npm install drachtio-fsmrf --save
First, create a drachtio "app". This contains the middleware stack and core message routing functions needed for the core drachtio library that is central to all drachtio applications. Next, create a new instance of the drachtio media resource function, passing the drachtio app that you just created.
var drachtio = ;var app = ;var Mrf = ;var mrf = app ;
In most cases, you will also want to create an instance of the drachtio signaling resource framework as well, in order to handle the SIP signaling requirements of the application.
var Srf = ;var srf = app ;
Once you have obtained a reference to a media server, you can obtain access to resources on the media server via any of the following methods:
You can also send freeswitch api commands directly to the media server by invoking the MediaServer#api method.
Once you are done working with an endpoint, you should call Endpoint#destroy to release it back to the media server.
There are two ways to create a conference:
Besides the example applications found in the examples folder, the following full-fledged sample applications are available: