[asterisk-bugs] [Asterisk 0012761]: chan_sip: build_contact() does not put alternate port setting in Contact header

noreply at bugs.digium.com noreply at bugs.digium.com
Fri May 30 14:39:56 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12761 
====================================================================== 
Reported By:                asbestoshead
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12761
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 118255 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             05-30-2008 03:04 CDT
Last Modified:              05-30-2008 14:39 CDT
====================================================================== 
Summary:                    chan_sip: build_contact() does not put alternate
port setting in Contact header
Description: 
build_contact() looks at the *other* end's port to decide whether there's a
non-standard port in use. If my end has bindport=5062 but the peer has
port=5060, when I send an invite to the peer, my Contact header doesn't
have ":5062".

initreqprep() has the same problem when setting the From: header.

chan_sip in Asterisk trunk and 1.6.0-beta8 (but not 1.4.19) have this
problem.

I have a trivial patch for this against Moy's mfcr2 branch off trunk, but
I can't find the link to sign the contributor's agreement. The patch also
applies to 1.6.0beta8, although I haven't tested it there...
====================================================================== 

---------------------------------------------------------------------- 
 asbestoshead - 05-30-08 14:39  
---------------------------------------------------------------------- 
The only remaining difference is the Asterisk where I had the problem is
running trunk, not 1.6.0.

Oh, wait, is your sipp in Asterisk's sip.conf as a peer? That's how mine
is set up. If Asterisk knows about a peer, it doesn't set p->socket.port
properly. (It sets it to the peer's port, I think.)

But if it doesn't find a peer and you just dial by IP, it properly sets
p->socket.port to ntohs(ourip.port). 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-30-08 14:39  asbestoshead   Note Added: 0087571                          
======================================================================




More information about the asterisk-bugs mailing list