<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div>Hello Johan,</div><div>You can use something like this </div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote><div><div>route[ONHOLD] {</div><div>        if(!is_audio_on_hold())</div><div>                return;</div><div><br data-mce-bogus="1"></div><div>       <span style="color: #000000; font-family: 'lucida console', sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: 'lucida console', sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">$var(cline-ip)<span>  = NULL;</span></span><div style="clear: both;" data-mce-style="clear: both;"><br></div></div><div>        if(has_body("application/sdp")) {</div><div>                if(search_body("a=sendonly") || search_body("a=inactive")) {</div><div>                        $var(cline-ip) = $(rb{sdp.line,c}{s.select,2, });</div><div>                        xlog("[$rm] On hold call SDP IP [$var(cline-ip)]\n");</div><div>                        if($(var(cline-ip){s.select,1,.}{s.int})==0 && $socket_in(proto)=="WSS") {</div><div>                                xlog("[$rm] On hold call going from WAN SouceIP <$si> to LAN with transport $socket_in(proto)\n");</div><div>                                $var(rtpengine_f_topbx) = "replace-session-connection replace-origin UDP/TLS/RTP/SAVPF";</div><div>                                $var(codec_flag_topbx) = "codec-strip-PCMU codec-strip-G722  codec-strip-PCMA";</div><div>                                $var(codec_trans) = "transcode-OPUS codec-mask-G722";</div><div>                                $avp(on_hold) = "true";</div><div>                                rtpengine_offer("$var(rtpengine_f_topbx) $var(codec_flag_topbx) $var(codec_trans) ICE=remove in-iface=external out-iface=internal");</div><div>                                t_on_reply("handle_wss_reply");</div><div>                        } else {</div><div>                                xlog("[$rm] On hold call going from WAN SouceIP <$si> to LAN with transport $socket_in(proto)\n");</div><div>                                rtpengine_offer("RTP/AVP replace-session-connection replace-origin ICE=remove in-iface=external out-iface=internal");</div><div>                                t_on_reply("3");</div><div>                        }</div><div>                }</div><div>        }</div><div>        route(RELAY);</div><div>        exit;</div><div>}</div></div><div><br></div><div><br></div><div>volga629</div></blockquote><div><br></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"johan" <johan@democon.be><br><b>To: </b>"OpenSIPS users mailling list" <users@lists.opensips.org><br><b>Sent: </b>Friday, June 11, 2021 6:05:39 AM<br><b>Subject: </b>[OpenSIPS-Users] Dumb ass question<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Hello,<br><br><br>is there somebody that can help me with rewriting the sdp when you<br>receive 0.0.0.0 ?<br><br>I kind of like tried a bunch of variations on this<br>fix_nated_sdp(0x12,"1.2.3.4");, but obviously I do something wrong. <br><br>wkr, Johan.<br><br><br>_______________________________________________<br>Users mailing list<br>Users@lists.opensips.org<br>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br></div></div></body></html>