[OpenSIPS-Users] Dumb ass question
johan
johan at democon.be
Sat Jun 12 08:11:51 EST 2021
Indeed, getting rtpengine involved is the easiest fix.
BUT : I am working on B2BUA implementation in opensips. So as there is
no route[relay] and reply_route, where do I need to call rtpengine_offer
and rtpengine_answer ?
wkr,
On 11/06/2021 15:10, Slava Bendersky via Users wrote:
> Hello Johan,
> You can use something like this
>
>
> route[ONHOLD] {
> if(!is_audio_on_hold())
> return;
>
> $var(cline-ip) = NULL;
>
> if(has_body("application/sdp")) {
> if(search_body("a=sendonly") ||
> search_body("a=inactive")) {
> $var(cline-ip) =
> $(rb{sdp.line,c}{s.select,2, });
> xlog("[$rm] On hold call SDP IP
> [$var(cline-ip)]\n");
>
> if($(var(cline-ip){s.select,1,.}{s.int})==0 &&
> $socket_in(proto)=="WSS") {
> xlog("[$rm] On hold call going
> from WAN SouceIP <$si> to LAN with transport $socket_in(proto)\n");
> $var(rtpengine_f_topbx) =
> "replace-session-connection replace-origin UDP/TLS/RTP/SAVPF";
> $var(codec_flag_topbx) =
> "codec-strip-PCMU codec-strip-G722 codec-strip-PCMA";
> $var(codec_trans) =
> "transcode-OPUS codec-mask-G722";
> $avp(on_hold) = "true";
>
> rtpengine_offer("$var(rtpengine_f_topbx) $var(codec_flag_topbx)
> $var(codec_trans) ICE=remove in-iface=external out-iface=internal");
> t_on_reply("handle_wss_reply");
> } else {
> xlog("[$rm] On hold call going
> from WAN SouceIP <$si> to LAN with transport $socket_in(proto)\n");
> rtpengine_offer("RTP/AVP
> replace-session-connection replace-origin ICE=remove
> in-iface=external out-iface=internal");
> t_on_reply("3");
> }
> }
> }
> route(RELAY);
> exit;
> }
>
>
> volga629
>
>
>
>
> ------------------------------------------------------------------------
> *From: *"johan" <johan at democon.be>
> *To: *"OpenSIPS users mailling list" <users at lists.opensips.org>
> *Sent: *Friday, June 11, 2021 6:05:39 AM
> *Subject: *[OpenSIPS-Users] Dumb ass question
>
> Hello,
>
>
> is there somebody that can help me with rewriting the sdp when you
> receive 0.0.0.0 ?
>
> I kind of like tried a bunch of variations on this
> fix_nated_sdp(0x12,"1.2.3.4");, but obviously I do something wrong.
>
> wkr, Johan.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210612/33f2d08f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xD7D896F7DDA70EC3.asc
Type: application/pgp-keys
Size: 2450 bytes
Desc: OpenPGP public key
URL: <http://lists.opensips.org/pipermail/users/attachments/20210612/33f2d08f/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 665 bytes
Desc: OpenPGP digital signature
URL: <http://lists.opensips.org/pipermail/users/attachments/20210612/33f2d08f/attachment-0001.sig>
More information about the Users
mailing list