Benoit Panizzon
2019-Nov-29 14:57 UTC
[asterisk-users] pjsip: How is asterisk choosing the IP address to put in the Contact header?
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 ______________________________________________________ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________
Benoit Panizzon
2019-Nov-29 15:30 UTC
[asterisk-users] 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 ______________________________________________________ Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________
George Joseph
2019-Dec-02 17:11 UTC
[asterisk-users] pjsip: How is asterisk choosing the IP address to put in the Contact header?
On Fri, Nov 29, 2019 at 8:30 AM Benoit Panizzon <benoit.panizzon at imp.ch> wrote:> 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? >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.> > Mit freundlichen Grüssen > > -Benoît Panizzon- > -- > I m p r o W a r e A G - Leiter Commerce Kunden > ______________________________________________________ > > Zurlindenstrasse 29 Tel +41 61 826 93 00 > CH-4133 Pratteln Fax +41 61 826 93 01 > Schweiz Web http://www.imp.ch > ______________________________________________________ > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- George Joseph Asterisk Software Developer direct/fax +1 256 428 6012 Check us out at www.sangoma.com and www.asterisk.org [image: image.png] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191202/33a21c58/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 5142 bytes Desc: not available URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191202/33a21c58/attachment.png>
Reasonably Related Threads
- On Register, run a script, validate source IP
- Solved: Re: Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?
- Global number rewriting rules affecting ALL headers?
- DUNDI anyone?
- pre-dial handler, how to access variables from calling channel?