[asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk

Olli Heiskanen ohjelmistoarkkitehti at gmail.com
Fri Aug 15 09:41:31 CDT 2014


After having thought this through a bit I have some thoughts I'd like to

In this case where the rtp profile is RTP/AVP Asterisk accepts and handles
the call normally. If a webrtc client calls a sip client, or even another
webrtc client, rtpengine is needed to step in (in my setup most of the
clients would indeed be webrtc, but some of them might be sip). I think it
would be better to use RTP/SAVPF throughout the process if both clients are
webrtc (or otherwise speak RTP/SAVPF), but currently there is no way to
accomplish this?

Is it possible to configure Asterisk to only accept the RTP/SAVPF profile,
and send 488 to all others? If it's not possible to force Asterisk to
ignore rtp profiles (thus allowing the sdp be handled by rtpengine
entirely), I'd prefer to use RTP/SAVPF or RTP/SAVP in the communication
between Kamailio and Asterisk servers and use rtpengine to bridge to
RTP/AVP and RTP/AVPF only if the client cannot speak securely.

I'd very much like to hear opinions and thoughts on these.


2014-08-13 20:39 GMT+03:00 Olli Heiskanen <ohjelmistoarkkitehti at gmail.com>:

> Aaa now I understood better, thanks!
> That's the instruction I used originally to write my Kamailio config, but
> I wasn't sure on how the sdp was supposed to be altered at which places in
> the whole SIP flow. I was thinking the original INVITE with the original
> sdp would go all the way to the receiving client, which return 488, which
> Kamailio would pick up and use rtpengine to alter the sdp at that point.
> So I'll need to alter the sdp every time before sending it to the Asterisk
> servers altogether and so avoid all the hassle I've been having with
> Asterisk.
> cheers,
> Olli
> 2014-08-13 20:07 GMT+03:00 Paul Belanger <paul.belanger at polybeacon.com>:
> On Wed, Aug 13, 2014 at 4:35 AM, Olli Heiskanen
>> <ohjelmistoarkkitehti at gmail.com> wrote:
>> > Hi,
>> >
>> > Wow, thanks Paul, realizing the problem makes a lot of sense.
>> >
>> > So I setup Kamailio as a peer, but if I disable chan_sip module
>> completely,
>> > I can't do it in sip.conf like I'd otherwise assume to do. I tried to
>> > rebuild Asterisk without chan_sip, but I guess that's not quite the way
>> to
>> > go? Asterisk stopped sending back any sip messages so either there is a
>> > configuration means on how to do this or I'm doing something wrong with
>> my
>> > current setup. My next thought was to compile Asterisk normally and set
>> > rtcachefriends to no, that did not work either, when dialing the cli
>> stated:
>> > app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP'
>> > (cause 20 - Subscriber absent)
>> > which I guess says Asterisk does not know where to send the message.
>> >
>> > The inner workings of Asterisk is a bit beyond me, if you don't mind
>> giving
>> > advice on how to proceed I'd be most grateful.
>> >
>> I think you are still mis-understanding me.  I'll try to be clearer.
>> From the POV of asterisk, you do still need chan_sip, however the only
>> peer asterisk needs to be away of it Kamailio.  All other peers will
>> be stored within kamailio.  This was the reason for my comment about
>> realtime sip, you don't need it.
>> Then, within kamailio, you'll need to invoke rtpengine using
>> (rtpproxy-ng with kamailio 4.1) to rewrite the sdp for the invite to
>> asterisk.  You'll use the rtpproxy_offer and rtp_answer functions to
>> remove ICE when calls originate from webrtc clients.  Since you are
>> not using a websocket in asterisk, it will just be a SIP over udp, the
>> need for ICE and SAVPF is not needed.
>> What you are trying to do is pretty complicated, it took me about 2
>> weeks to get everything setup properly.  There is good information[1]
>> on the web, you just need to google for it.
>> [1] http://www.slideshare.net/crocodilertc/webrtc-websockets
>> --
>> Paul Belanger | PolyBeacon, Inc.
>> Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
>> Github: https://github.com/pabelanger | Twitter:
>> https://twitter.com/pabelanger
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140815/47422d36/attachment.html>

More information about the asterisk-users mailing list