Benoit Panizzon
2020-Jan-10 16:24 UTC
[asterisk-users] Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?
Hi List I have been pondering over a problem to use an asterisk server behind an SBC unable to successfully handle registrations. Now I observed something strange which I suspect might be a bug on the asterisk side. The SBC originates is register from Port 6011 to Port 5060 on the Asterisk. The Contact Header of the REGISTER contains: Contact: user at SBC-IP:6011 The Asterisk is sending the 200 OK to back from it's port 5060 to SBC-IP:6011 nothing wrong with it. But when I looked at the Contact Header, which indicates a successful 'binding' I see: Contact: user at ASTERISK-IP:6011 It looks like the SBC discards this Contact header as invalid and returning the 200 OK without contact to the registering client, indicating an unsuccessful registration. All other clients I have tried registering directly to asterisk seem to ignore this port and just accept the 200OK. Only our SBC causes this problem. I have attempted rewrite_contact yes and no, both with the same result. So from my point of view, Asterisk is putting the 'remote' port instead of it's own SIP port into the Contact Header. Can anyone confirm this is misbehavior be pjsip? Could this be a known bug? A quick google search did not return any hits. 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 ______________________________________________________
Joshua C. Colp
2020-Jan-10 16:49 UTC
[asterisk-users] Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?
On Fri, Jan 10, 2020 at 12:25 PM Benoit Panizzon <benoit.panizzon at imp.ch> wrote:> Hi List > > I have been pondering over a problem to use an asterisk server behind > an SBC unable to successfully handle registrations. > > Now I observed something strange which I suspect might be a bug on the > asterisk side. > > The SBC originates is register from Port 6011 to Port 5060 on the > Asterisk. > > The Contact Header of the REGISTER contains: > > Contact: user at SBC-IP:6011 > > The Asterisk is sending the 200 OK to back from it's port 5060 to > SBC-IP:6011 nothing wrong with it. But when I looked at the Contact > Header, which indicates a successful 'binding' I see: > > Contact: user at ASTERISK-IP:6011 > > It looks like the SBC discards this Contact header as invalid and > returning the 200 OK without contact to the registering client, > indicating an unsuccessful registration. > > All other clients I have tried registering directly to asterisk seem to > ignore this port and just accept the 200OK. Only our SBC causes this > problem. > > I have attempted rewrite_contact yes and no, both with the same result. > > So from my point of view, Asterisk is putting the 'remote' port instead > of it's own SIP port into the Contact Header. > > Can anyone confirm this is misbehavior be pjsip? Could this be a known > bug? A quick google search did not return any hits. >The Contact header in the 200 OK should contain that of the remote side. If rewrite_contact is set to "yes" it would be the source IP address and port. If set to "no" it would be the URI provided in the REGISTER. The problem doesn't ring any bells, but the version is old and my memory of the past fuzzy so it's possible it was a problem and was subsequently fixed. I also haven't seen anyone report this in recent times and haven't seen it myself. -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200110/d55905b9/attachment.html>
Benoit Panizzon
2020-Jan-13 14:45 UTC
[asterisk-users] Solved: Re: Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?
Hi Joshua Thank you for your reply. Indeed, Ubuntu only ships with this old version. Upgraded to 16.2. via PPA. Problem persisted. Well, I already mentioned that this is a machine with two physical interfaces with different routes which on the 'external' side handles SIP customer registrations and has an 'internal' IC Trunk to a commercial Voice Switch via private IP Range. I had the problem, that some of the packets sent out on the 'external' side contained 'private' IP addresses in either signaling or SDP. So I threw all options I could find into the config to bind transports, endpoints, media and so on to the corresponding interface ip address. First this looked good. I had the correct IP in every header and SDP I expected. well setting under transport: external_signaling_address=[local IP] Assuming this is the own interface IP that would be told to external endpoints was obviously wrong. In the end this caused the Proxy-SBC to believe it was not getting an OK to it's forwarded registration and discard this session. 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 ______________________________________________________
Reasonably Related Threads
- pjsip: How is asterisk choosing the IP address to put in the Contact header?
- On Register, run a script, validate source IP
- Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?
- Global number rewriting rules affecting ALL headers?
- DUNDI anyone?