Olli Heiskanen
2014-Aug-11 08:45 UTC
[asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk
Hello, I'm trying to get calls working between websocket clients and sip clients. For clients I have sip.js based clients on chrome, Zoipers and a Grandstream phone. Challenge here is I'd like to have Kamailio and rtpengine to handle the bridging between different rtp profiles but Asterisk changes them in the sdp bodies along the way. I'm using Asterisk 11.11.0. Is there a way to configure Asterisk to ignore the rtp profile but allow calls to pass with either of those profiles (even though clients might answer with 488 which would be caught and handled by Kamailio and rtpengine)? In my setup I have Asterisk Kamailio realtime integration, and the second goal is to be able to add peers to the db table with similar data, as in no different values based on what kind of client wants to register. I'd like to allow the user to register using which ever client they choose (in this case one of the 3 I mentioned). Previously I had problems like 'rejecting secure audio stream without encryption details', no audio or BYE messages sent immediately after call has begun etc, but according to sip.js documentation ( http://sipjs.com/guides/server-configuration/asterisk/) the settings avpf and force_avp affect the way Asterisk handles the rtp profiles and now my calls do work ok but I'd need to move the rtp profile handling to rtpengine. Here's my sip.conf: bindport = 5070 ;Kamailio is at port 5060, and it's always used as outbound proxy bindaddr = PU.BL.IC.IP tcpenable = yes limitonpeers = yes rtcachefriends = yes rtupdate=yes tos_sip=cs3 tos_audio=ef realm = testers.com autodomain=no domain=testers.com allowexternaldomains=no allowguest=no ;avpf=yes ; encryption=yes transport=ws,wss,udp icesupport=yes srvlookup=yes nat=force_rport,comedia videosupport=yes directmedia=no And here's the way I've defined my websocket peer to my sippeers table: id: 4 name: 660 ipaddr: PU.BL.IC.IP port: 5060 regseconds: 1407744248 defaultuser: 660 fullcontact: sip:660 at PU.BL.IC.IP:5060 regserver: useragent: lastms: 0 host: dynamic type: friend context: default deny: 0.0.0.0/0.0.0.0 permit: PU.BL.IC.IP secret: NULL md5secret: NULL avpf: yes force_avp: yes icesupport: yes directmedia: yes encryption: yes nat: force_rport,comedia callgroup: NULL pickupgroup: NULL language: NULL disallow: NULL allow: NULL setvar: NULL callerid: NULL amaflags: NULL videosupport: no maxcallbitrate: NULL mailbox: NULL regexten: NULL fromdomain: testers.com fromuser: NULL qualify: NULL defaultip: NULL outboundproxy: PU.BL.IC.IP contactpermit: NULL contactdeny: NULL fullname: NULL cid_number: NULL callingpres: NULL mohinterpret: NULL mohsuggest: NULL hasvoicemail: NULL subscribemwi: NULL vmexten: NULL rtpkeepalive: NULL directrtpsetup: yes dtlsenable: yes dtlsverify: no dtlsprivatekey: /etc/asterisk/keys/asterisk.pem dtlssetup: actpass dtlscertfile: /etc/asterisk/keys/asterisk.pem dtlscafile: /etc/asterisk/keys/ca.crt sippasswd: md5ofmypwd rpid: NULL domain: testers.com sippasswd2: NULL This is how all other clients are currently defined: id: 7 name: 771 ipaddr: PU.BL.IC.IP port: 5060 regseconds: 1407748788 defaultuser: 771 fullcontact: sip:771 at PU.BL.IC.IP:5060 regserver: useragent: lastms: 0 host: dynamic type: friend context: default deny: 0.0.0.0/0.0.0.0 permit: PU.BL.IC.IP secret: NULL md5secret: NULL avpf: no force_avp: NULL icesupport: NULL directmedia: yes encryption: NULL nat: force_rport,comedia callgroup: NULL pickupgroup: NULL language: NULL disallow: NULL allow: NULL setvar: NULL callerid: NULL amaflags: NULL videosupport: NULL maxcallbitrate: NULL mailbox: NULL regexten: NULL fromdomain: testers.com fromuser: NULL qualify: NULL defaultip: NULL outboundproxy: PU.BL.IC.IP contactpermit: NULL contactdeny: NULL fullname: NULL cid_number: NULL callingpres: NULL mohinterpret: NULL mohsuggest: NULL hasvoicemail: NULL subscribemwi: NULL vmexten: NULL rtpkeepalive: NULL directrtpsetup: NULL dtlsenable: NULL dtlsverify: NULL dtlsprivatekey: NULL dtlssetup: NULL dtlscertfile: NULL dtlscafile: NULL sippasswd: 27e13af7c596313350986c58c9d24946 rpid: NULL domain: testers.com sippasswd2: NULL cheers, Olli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140811/e2507cc4/attachment.html>
Paul Belanger
2014-Aug-11 22:56 UTC
[asterisk-users] Letting rtp profiles be handled by rtpengine instead of Asterisk
On Mon, Aug 11, 2014 at 4:45 AM, Olli Heiskanen <ohjelmistoarkkitehti at gmail.com> wrote:> > Hello, > > I'm trying to get calls working between websocket clients and sip clients. > For clients I have sip.js based clients on chrome, Zoipers and a Grandstream > phone. Challenge here is I'd like to have Kamailio and rtpengine to handle > the bridging between different rtp profiles but Asterisk changes them in the > sdp bodies along the way. I'm using Asterisk 11.11.0. > > Is there a way to configure Asterisk to ignore the rtp profile but allow > calls to pass with either of those profiles (even though clients might > answer with 488 which would be caught and handled by Kamailio and > rtpengine)? In my setup I have Asterisk Kamailio realtime integration, and > the second goal is to be able to add peers to the db table with similar > data, as in no different values based on what kind of client wants to > register. I'd like to allow the user to register using which ever client > they choose (in this case one of the 3 I mentioned). > > Previously I had problems like 'rejecting secure audio stream without > encryption details', no audio or BYE messages sent immediately after call > has begun etc, but according to sip.js documentation > (http://sipjs.com/guides/server-configuration/asterisk/) the settings avpf > and force_avp affect the way Asterisk handles the rtp profiles and now my > calls do work ok but I'd need to move the rtp profile handling to rtpengine. >We are successfully using kamailio / rtpengine with websockets and asterisk 1.8. First question is why are you duplicating registrations within asterisk? Secondly, why are you using websockets in asterisk? Without knowing more about your use case, I'll tell you how we did it. Like I said, kamailio is responsible for our SIP/ws subscribers and registrations. Once within kamailio we simply dispatch traffic to asterisk via SIP/udp. RTP is handled by rtpengine (using rtproxy-ng) and that is basically it. No special configuration is needed for asterisk (in fact 1.8 has no support for RTP/SAVPF) so we rewrite SDP on 488. Then setup a kamailio peer and away you go. -- Paul Belanger | PolyBeacon, Inc. Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode) Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger
Apparently Analagous Threads
- From and To headers contain same account in INVITEs
- Rejecting secure audio stream without encryption details - when using ws clients and Kamailio integration
- Inbound call from sip peer to internal webrtc peer fails while internal sip-webrtc calls work
- Asterisk removes ice lines in sdp when calling between webrtc clients
- WebRTC phone