[asterisk-bugs] [Asterisk 0013633]: Asterisk won't register if SIP-port at peer differ than local (5060)
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Dec 10 09:22:39 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13633
======================================================================
Reported By: performer
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13633
Category: Channels/chan_sip/Registration
Reproducibility: always
Severity: major
Priority: normal
Status: acknowledged
Asterisk Version: 1.6.0
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-10-07 00:37 CDT
Last Modified: 2008-12-10 09:22 CST
======================================================================
Summary: Asterisk won't register if SIP-port at peer differ
than local (5060)
Description:
The problem happens because Asterisk fills 'Contact' header in SIP-message
using remote port number instead local port number.
Example:
REGISTER sip:sip.asterisk.xxx.com:55060 SIP/2.0
Via: SIP/2.0/UDP 83.167.107.46:0;branch=z9hG4bK47cfc028
Max-Forwards: 70
From: <sip:12345678 at sip.asterisk.xxx.com>;tag=as5f389822
To: <sip:12345678 at sip.asterisk.xxx.com>
Call-ID: 099f43ef434287c457a3d793535e9df7 at yyy.ru
CSeq: 3084 REGISTER
User-Agent: SweetHome Agent
Expires: 120
Contact: <sip:s at 83.137.137.146:55060>
Event: registration
Content-Length: 0
My solution:
diff chan_sip.c.bak chan_sip.c
2628c2628
< p->socket.port = htons(r->portno);
---
> // p->socket.port = htons(r->portno);
======================================================================
----------------------------------------------------------------------
(0096078) svnbot (reporter) - 2008-12-10 09:22
http://bugs.digium.com/view.php?id=13633#c96078
----------------------------------------------------------------------
Repository: asterisk
Revision: 162619
U trunk/channels/chan_sip.c
------------------------------------------------------------------------
r162619 | file | 2008-12-10 09:22:38 -0600 (Wed, 10 Dec 2008) | 4 lines
When transmitting a register set the socket port to the local one for the
transport being used, not the port for the remote server.
(closes issue http://bugs.digium.com/view.php?id=13633)
Reported by: performer
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=162619
Issue History
Date Modified Username Field Change
======================================================================
2008-12-10 09:22 svnbot Checkin
2008-12-10 09:22 svnbot Note Added: 0096078
======================================================================
More information about the asterisk-bugs
mailing list