<div dir="ltr"><div><br></div><div>Hello,</div><div><br></div><div>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.</div>


<div><br></div><div>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). </div>


<div><br></div><div>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 (<a href="http://sipjs.com/guides/server-configuration/asterisk/" target="_blank">http://sipjs.com/guides/server-configuration/asterisk/</a>) 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.</div>


<div><br></div><div>Here's my sip.conf:</div><div><br></div><div>bindport = 5070<span style="white-space:pre-wrap">           </span>;Kamailio is at port 5060, and it's always used as outbound proxy</div><div>bindaddr = PU.BL.IC.IP</div>


<div>tcpenable = yes</div><div>limitonpeers = yes</div><div>rtcachefriends = yes</div><div>rtupdate=yes</div><div>tos_sip=cs3</div><div>tos_audio=ef</div><div>realm = <a href="http://testers.com" target="_blank">testers.com</a></div>

<div>
autodomain=no</div><div>domain=<a href="http://testers.com" target="_blank">testers.com</a></div><div><br></div><div>allowexternaldomains=no</div><div>allowguest=no</div><div>;avpf=yes<span style="white-space:pre-wrap">   </span>;</div>


<div>encryption=yes</div><div>transport=ws,wss,udp</div><div>icesupport=yes</div><div>srvlookup=yes</div><div>nat=force_rport,comedia</div><div>videosupport=yes</div><div>directmedia=no</div><div><br></div><div><br></div>


<div>And here's the way I've defined my websocket peer to my sippeers table:</div><div><br></div><div>            id: 4</div><div>          name: 660</div><div>        ipaddr: PU.BL.IC.IP</div><div>          port: 5060</div>


<div>    regseconds: 1407744248</div><div>   defaultuser: 660</div><div>   fullcontact: sip:660@PU.BL.IC.IP:5060</div><div>     regserver:</div><div>     useragent:</div><div>        lastms: 0</div><div>          host: dynamic</div>


<div>          type: friend</div><div>       context: default</div><div>          deny: <a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a></div><div>        permit: PU.BL.IC.IP</div><div>        secret: NULL</div>

<div>     md5secret: NULL</div>
<div>          avpf: yes</div><div>     force_avp: yes</div><div>    icesupport: yes</div><div>   directmedia: yes</div><div>    encryption: yes</div><div>           nat: force_rport,comedia</div><div>     callgroup: NULL</div>


<div>   pickupgroup: NULL</div><div>      language: NULL</div><div>      disallow: NULL</div><div>         allow: NULL</div><div>        setvar: NULL</div><div>      callerid: NULL</div><div>      amaflags: NULL</div><div>


  videosupport: no</div><div>maxcallbitrate: NULL</div><div>       mailbox: NULL</div><div>      regexten: NULL</div><div>    fromdomain: <a href="http://testers.com" target="_blank">testers.com</a></div><div>      fromuser: NULL</div>

<div>
       qualify: NULL</div><div>     defaultip: NULL</div><div> outboundproxy: PU.BL.IC.IP</div><div> contactpermit: NULL</div><div>   contactdeny: NULL</div><div>      fullname: NULL</div><div>    cid_number: NULL</div><div>


   callingpres: NULL</div><div>  mohinterpret: NULL</div><div>    mohsuggest: NULL</div><div>  hasvoicemail: NULL</div><div>  subscribemwi: NULL</div><div>       vmexten: NULL</div><div>  rtpkeepalive: NULL</div><div>directrtpsetup: yes</div>


<div>    dtlsenable: yes</div><div>    dtlsverify: no</div><div>dtlsprivatekey: /etc/asterisk/keys/asterisk.pem</div><div>     dtlssetup: actpass</div><div>  dtlscertfile: /etc/asterisk/keys/asterisk.pem</div><div>    dtlscafile: /etc/asterisk/keys/ca.crt</div>


<div>     sippasswd: md5ofmypwd</div><div>          rpid: NULL</div><div>        domain: <a href="http://testers.com" target="_blank">testers.com</a></div><div>    sippasswd2: NULL</div><div><br></div><div><br></div><div>

<br></div><div>This is how all other clients are currently defined:</div>
<div><br></div><div>            id: 7</div><div>          name: 771</div><div>        ipaddr: PU.BL.IC.IP</div><div>          port: 5060</div><div>    regseconds: 1407748788</div><div>   defaultuser: 771</div><div>   fullcontact: sip:771@PU.BL.IC.IP:5060</div>


<div>     regserver:</div><div>     useragent:</div><div>        lastms: 0</div><div>          host: dynamic</div><div>          type: friend</div><div>       context: default</div><div>          deny: <a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a></div>


<div>        permit: PU.BL.IC.IP</div><div>        secret: NULL</div><div>     md5secret: NULL</div><div>          avpf: no</div><div>     force_avp: NULL</div><div>    icesupport: NULL</div><div>   directmedia: yes</div>


<div>    encryption: NULL</div><div>           nat: force_rport,comedia</div><div>     callgroup: NULL</div><div>   pickupgroup: NULL</div><div>      language: NULL</div><div>      disallow: NULL</div><div>         allow: NULL</div>


<div>        setvar: NULL</div><div>      callerid: NULL</div><div>      amaflags: NULL</div><div>  videosupport: NULL</div><div>maxcallbitrate: NULL</div><div>       mailbox: NULL</div><div>      regexten: NULL</div><div>


    fromdomain: <a href="http://testers.com" target="_blank">testers.com</a></div><div>      fromuser: NULL</div><div>       qualify: NULL</div><div>     defaultip: NULL</div><div> outboundproxy: PU.BL.IC.IP</div><div> contactpermit: NULL</div>


<div>   contactdeny: NULL</div><div>      fullname: NULL</div><div>    cid_number: NULL</div><div>   callingpres: NULL</div><div>  mohinterpret: NULL</div><div>    mohsuggest: NULL</div><div>  hasvoicemail: NULL</div><div>


  subscribemwi: NULL</div><div>       vmexten: NULL</div><div>  rtpkeepalive: NULL</div><div>directrtpsetup: NULL</div><div>    dtlsenable: NULL</div><div>    dtlsverify: NULL</div><div>dtlsprivatekey: NULL</div><div>     dtlssetup: NULL</div>


<div>  dtlscertfile: NULL</div><div>    dtlscafile: NULL</div><div>     sippasswd: 27e13af7c596313350986c58c9d24946</div><div>          rpid: NULL</div><div>        domain: <a href="http://testers.com" target="_blank">testers.com</a></div>


<div>    sippasswd2: NULL</div><div><br></div><div><br></div><div>cheers,</div><div>Olli</div></div>