📜 ⬆️ ⬇️

Making audio calls from web and mobile clients (RTMP, RTMFP, WebRTC)

Introduction


Good day, Habrovchane.

I want to share with the community my experience in the implementation of audio calls from the web and mobile clients in Cisco UCCX. Perhaps he will help someone in the future or in the present.

So, once, I was tasked with organizing audio calls from web and mobile clients to Cisco UCCX. Everyone knows excellent services like zingaya, but the customer clearly limited the use of third-party services.
The task has been reduced to writing a client, choosing SBC and forwarding signaling from the client to the Cisco Call Manager.
')
The analysis I conducted stopped me on three ways to implement the requirements:


RTMP client for Freeswitch


Virtues



I put the description of this option in the first place, as the most promising, which was implemented.
For the remaining options, demo versions were written, but the first one went to production.

Deployment speed

It is phenomenal, especially for companies that already use Freeswitch in their work. Just uncomment the endpoints / mod_rtmp line in modules.conf, compile the module (make mod_rtmp-install in src),
fix the configuration file in $ FSPATH / conf / autoload_config / rtmp.conf.xml (namely, set the ip, port, dialplan),
load the installed module (load mod_rtmp in fs_cli) and open the port in iptables.
All - you can begin to develop the client.

Client development speed

Freeswitch contains a demo client written in ActionScript3 with JS CallBacks (clients / flex).
For this task, an Adobe AIR client was written that implements the control logic of NetStream and callbacks from Freeswitch, such as login, logout, call, notify, and so on.
In short, the work proceeds as follows:
Freeswitch assigns a channel uuid to each NetStream, and then all calls will bridged through themselves. The only problem I caught was the inability to use TTS and ASR (connected via unimrcp) MRCPv2 protocol when calling from an RTMP client.

The time spent on development is a week, in two hands (that is, one person or two one-armed coders).

Thanks to Adobe AIR, the client shelf included: desktop-client, tablet-client for iOS and Android, mobile-client for iOS and Android, and Flash-client.
There was one code, the only difference was in layout and icons, which made me and the customer very happy.

disadvantages



Use of TCP and instability of work on 3G channels

As practice has shown, this client is stable on adsl, lan channels and wifi. On 3G, it behaved unpredictably (as well as the MTS 3G coverage). In any case, he kept the connections, and the maximum that was corrupted audio.

No noise cancellation

Everyone knows the problem, thanks to Putin, Adobe for this.
Not yet decided for desktop clients, mobile clients use headphones.

Support only Speex

If the remote side is an IP PBX, then Freeswitch will take over the transcoding.
But between the RTMP client and Freeswitch, Speex is still running.
Mod_rtmp is needed to support G.711.

The connection between two RTMP clients - SIG and RTP is via Freeswitch.

To communicate 2 RTMP clients always need a server.

RTMFP client for RTMFP2SIP


Virtues



disadvantages



This product was also considered as promising until I failed with
adding functionality to Adobe AIR Mobile.

For Desktop and Web clients, this product has significant advantages over the first in the list:
1) UDP-based protocol
2) Support H.264 and G.711.

The behavior of SIG and RTP is absolutely identical to the first option (only UDP instead of TCP).

In general, due to his incomplete suitability for the task, I was only enough to install it,
setup and test call. It is quite trivial and well described by the developer.

A demo client was made in Flash - development time is 3 days.

WebRTC clients written on js + Mobicents SIP Servlets


If I confess, I have placed my greatest hopes on this.

I had enough experience with Mobicents, so support for WebRTC in version 2.0.0 of FINAL was good news for me.
I seriously dreamed about video and audio calls without plug-ins and web browsers, but fate was cruel.
I will not describe the technology WebRTC, it can easily be found in the search for Habr.
I note only one thing that I need to get a tattoo: "Do not use Draft".
It is desirable on the forehead, preferably in a mirror image, so that during morning shaving, I would recall this brilliant idea that came when the implementation of siprec draft for Broadworks did not work with the implementation of siprec draft for Cisco (because Broadworks used siprec 04, and Cisco siprec 11) .

If it's interesting, then only Chrome build 24 worked more or less stably, Firefox refused to work at night, and the experimental Ericsson Bowser cursed me and the iPad and my Nexus S.

Therefore, I will write hypothetical advantages and disadvantages.

Virtues



disadvantages



A demo client was made which hung in Ericsson Bowser and worked only in Chrome build 24 - the development period is 3 days.

Sources


RTMP
wiki.freeswitch.org/wiki/Mod_rtmp
RTMFP
flashphoner.com/flash-rtmfp-sip-gateway
Webrtc
code.google.com/p/sipservlets
code.google.com/p/sipservlets/wiki/HTML5WebRTCVideoApplication

Conclusion


I hope this article was useful to you and saved you time when choosing one of these technologies.

Source: https://habr.com/ru/post/169775/


All Articles