[OpenSIPS-Users] Dumb ass question
Slava Bendersky
volga629 at networklab.ca
Fri Jun 11 13:10:46 EST 2021
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210611/b6aaba44/attachment-0001.html>
More information about the Users
mailing list