<div dir="ltr"><div dir="ltr"><div>Dear Kamailians, <br><br>I just opened a merge request for a new module called RTP Media Server</div><div><br></div><div>I understand that integrating an RTP/Media endpoint directly in Kamailio may seems strange at first.</div><div>Let me share my thoughts ...</div><div><br></div><div>By combining Kamailio, oRTP and mediastreamer2</div><div>this module is providing some very good foundation to support RTP endpoint and various media processing features.</div><div><br></div><div>This seems like a great idea for various use cases like IoT, IVR or other specific needs.</div><div><br></div><div>Kamailio is still handling everything related to SIP/SDP (the module is adding some SDP parsing, they could be integrated in the core if this seems fit).</div><div><br></div><div>By doing integration with a library we can benefit from the scripting engine and probably KEMI.</div><div>This does not means that everyone should run this module on a Kamailio sever acting as a load balancer, of course CPU intensive operations like resampling and encoding may be taking place on the server.</div><div><br></div><div>oRTP is providing RTP endpoints compliant with (RFC 3550)</div><div><br></div><div>MediaStreamer2, even if written in C is quite a high level library, because it is implementing a framework for audio processing using graphs of filters, filters can be to do various things.</div><div>Similar to playing with lego blocks :)</div><div><br></div><div>- Support for most free and some non free codecs can be added easily.</div><div>- Work to bridge calls is already in progress in the module.</div><div>- Mobile phone support ARM CPU and other embedded scenario should be supported</div><div><br></div><div>Mediastream2 is creating one thread per call "msticker", this can work smoothly in Kamailio even if it is forking processes.</div><div>Shared memory allocation is supported using wrapper around malloc/free used by the libraries.</div><div><br></div><div>This project was started last year, I exposed the idea at KamailioWorld2017, the feedbacks I god where not all positives :)</div><div><br></div><div>But we did speak about it again at ClueCon2018 and I was encouraged to complete the work and propose a MR.</div><div><br></div><div>The module is not working and was tested with several softphones.</div><div><br></div><div>I think it is time to submit it ... before considering adding more features or investing more time in it.</div><div><br></div><div>Julien</div><div><br></div><div><br></div><div>Example config using the features already implemented</div><div><br></div><div><font face="monospace, monospace">event_route[rms:start] {</font></div><div><font face="monospace, monospace">        xnotice("[rms:start] play ...\n");</font></div><div><font face="monospace, monospace">        rms_play("/tmp/reference_8000.wav", "rms:after_play");</font></div><div><font face="monospace, monospace">};</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">event_route[rms:after_play] {</font></div><div><font face="monospace, monospace">        xnotice("[rms:after_play] play done...\n");</font></div><div><font face="monospace, monospace">        rms_hangup();</font></div><div><font face="monospace, monospace">};</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">route {</font></div><div><font face="monospace, monospace">        if (t_precheck_trans()) {</font></div><div><font face="monospace, monospace">                t_check_trans();</font></div><div><font face="monospace, monospace">                exit;</font></div><div><font face="monospace, monospace">        }</font></div><div><font face="monospace, monospace">        t_check_trans();</font></div><div><font face="monospace, monospace">        if (is_method("INVITE") &amp;&amp; !has_totag()) {</font></div><div><font face="monospace, monospace">                if (!rms_answer()) {</font></div><div><font face="monospace, monospace">                        t_reply("503", "server error");</font></div><div><font face="monospace, monospace">                }</font></div><div><font face="monospace, monospace">        }</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">        if (is_method("BYE")){</font></div><div><font face="monospace, monospace">                rms_media_stop();</font></div><div><font face="monospace, monospace">        }</font></div><div><font face="monospace, monospace">}</font></div></div></div>