Pjsip: How Is Asterisk Choosing The IP Address To Put In The Contact Header?

Home » Asterisk Users » Pjsip: How Is Asterisk Choosing The IP Address To Put In The Contact Header?
Asterisk Users 2 Comments

Hi Gang

Server, two interfaces, routing to two different networks.

Two transports defined, each bound to the corresponding ip assigned to the interface.

But still, especially when an 183 message is sent, the Contact header does contain the wrong IP Address.

Is this a known issue 13.18.3? Or is there a way to make absolutely sure the IP addresses within the Contact header is corresponding to the endpoint the packet is sent out?

Mit freundlichen Grüssen

-Benoît Panizzon-

I m p r o W a r e A G – Leiter Commerce Kunden

2 thoughts on - Pjsip: How Is Asterisk Choosing The IP Address To Put In The Contact Header?

  • Short update…

    After some more research I found:
    https://community.asterisk.org/t/box-with-2-interfaces-wrong-one-chosen-in-contact-header/74705/3

    And some more similar ones describing the same problem with chan_sip and pjsip.

    I attempted to set: external_signaling_address on my transports. Also trying to trick them there could be NAT (there is none) by setting. local_net=192.168.99.0/24

    Asterisk is still sending the wrong IP Address in the Contact header of
    183 or 200 messages.

    Can anyone confirm this is a bug?

    Mit freundlichen Grüssen

    -Benoît Panizzon-

    I m p r o W a r e A G – Leiter Commerce Kunden

  • –000000000000ab9cb30598bbab93
    Content-Type: text/plain; charset=”UTF-8″
    Content-Transfer-Encoding: quoted-printable

    There’s been a lot of work in this area since 13.18. Without seeing packet captures of the incoming request and the response and seeing the exact configuration of the endpoints and transports it’s hard to say what’s going on. One thing you can try is setting “symmetric_transport=yes” on the two transports. That should ensure that the responses go out the same transport as the one that received the request. That, in turn, should change the contact address accordingly.