VoIP use case

SIP (Session Initiation Protocol) is an open session management protocol on the application OSI layer. The standards that define it are RFC 3261 (obsolete now), RFC 2543, and RFC 3265. It merely authenticates, locates, and handles the media to establish a VoIP session, although it doesn’t transfer the data itself. That is done by another protocol like RTP (Real-time Transport Protocol) which we will use through Linphone.

Linphone -> SIPode |call ended|<-> Nuance

Of course, many VoIP application rely on SIP nodes, and lately I came by Twilio which is no exception. However, I wanted to have complete control over the audio flux, a feature that Twilio didn’t offer, especially since the recording of calls they provided was only available to download 10secs after the call’s end. Way too long to wait, even if I didn’t need a stream.

Of course, having the cake and the icing on it is always better. Let’s add streaming to our requirements as we intercept and record calls.

Being a big fan of quick prototyping and lately, Javascript, of course I chose node as a base language. Also because a lot of useful wrappers are available to use, and in our case, nuance and pjsip wrappers.

Code excerpt