[asterisk-bugs] [Asterisk 0013355]: Dial(SIP/exten at host:port) ignores port

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 27 09:57:06 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13355 
====================================================================== 
Reported By:                acunningham
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13355
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21.1 
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-08-21 09:02 CDT
Last Modified:              2008-08-27 09:57 CDT
====================================================================== 
Summary:                    Dial(SIP/exten at host:port) ignores port
Description: 
If you do a Dial to a non-standard port, for example:

Dial(SIP/conference at 1.2.3.4:5070)

the port (5070) is ignored by Asterisk.
====================================================================== 

---------------------------------------------------------------------- 
 (0091792) putnopvut (administrator) - 2008-08-27 09:57
 http://bugs.digium.com/view.php?id=13355#c91792 
---------------------------------------------------------------------- 
With the help of Josh Colp, I have figured out why it is that this was not
working for you, but it was working for me. The short answer is that your
peer's name is the same as its IP address.

When Dial is called, the string of the peer you are calling is passed to
the SIP channel driver (called chan_sip from here on). In this case, the
string is conference at 1.2.3.4:5070. chan_sip then looks for an '@' sign in
the string. If it is there, then it attempts to route the call based on
what is after the '@' sign. In your case, it tries to route based on
1.2.3.4:5070. In determining how to route the call, chan_sip first strips
off the port and tries to see if the part before the port is the name of a
peer in sip.conf. In your case, it is. Since there is a peer in sip.conf
called 1.2.3.4, it uses the host and port information from the peer entry
instead of what was passed in the Dial string. In other words, if you
wanted to have calls to 1.2.3.4 go to port 5070, then placing "port=5070"
in sip.conf for that peer should allow what you're trying to do to work.

However, I do think there is something lacking here because you should be
able to dial a peer but override the port specified in sip.conf. I will
work on a patch which will allow for this to happen. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-27 09:57 putnopvut      Note Added: 0091792                          
======================================================================




More information about the asterisk-bugs mailing list