[OpenSIPS-Users] set_advertised_address usage

Alexey Kazantsev kurgan-rus at inbox.ru
Thu Jan 17 06:18:50 EST 2019

Hi list

I'm trying to use set_advertised_address(); function
in onreply_route

but I see that nothing changes.

[VoIP ISP] <--- [NAT box x.x.116.2] <--- [OpenSIPS] <--- [other VoIP server]

This is a sip debug, 180 Ringing, leaving OpenSIPS towards Internet:

I think some addresses should be re-written here, but they are not,
as we see in some headers.

By the way, the next 200 OK with SDP has correct IP address in SDP (as I set it
using rtpengine_answer(... media-address=x.x.116.2). So, I'm sure that I use
set_advertised_address() in the right place. But why it does not change the message?

onreply_route {
    if (has_body("application/sdp")) {
        # rewrite SDP for replies within calls from PBX
        if ($fd=="pbx. ... .ru") {
            rtpengine_answer("RTP/AVP replace-origin replace-session-connection ICE=remove to-tag");
        } else {
            # fix external address and rewrite SDP for replies within calls from VoIP ISP
        rtpengine_answer("RTP/AVP media-address=x.x.116.2 replace-origin replace-session-connection ICE=remove");

BR, Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190117/be46d25c/attachment.html>

More information about the Users mailing list