[asterisk-bugs] [Asterisk 0016827]: Asterisk does not honor the bindport.

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 17 14:19:46 CST 2010


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16827 
====================================================================== 
Reported By:                adahlquist
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16827
Category:                   Applications/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.2 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-02-15 11:58 CST
Last Modified:              2010-02-17 14:19 CST
====================================================================== 
Summary:                    Asterisk does not honor the bindport.
Description: 
I have run into an issue similar to the one seen here
https://issues.asterisk.org/view.php?id=16351.

I am upgrading from asterisk 1.4 to 1.6.2.2.

My provider bandtel requires us to specify the port that they communicate
with to be included in the contact header portion of the registration. In
1.4 i solved this by adding bindport=506X in my sip_general_custom.conf (i
am using freepbx). As soon as i upgraded to 1.6.2.2 (installing from source
and copying /etc/asterisk from 1.4) i noticed that their invites were
coming in on 5060 (default port) so i checked the contact header, and sure
enough it has reverted to blank (default 5060). I also noticed that the via
has changed to 5060 as well which seems to be causing cattelan (the similar
issue linked above) problems.

Is there another way to get the port number into the contact header to
satisfy bandtel, or is this an Asterisk 1.6 bug?

ebroad (manager) What port do you have Asterisk listening on?
Additionally, is NAT enabled?

adahlquist (reporter)Nat is enabled. With the bindport=5063 does that not
mean it's listening on 5063. All of my sip phones, and our application are
registered with it on 5063, and it only seems to accept invites on that
port as well. Let me know if there are any configs or packets you want to
see, and i can get them together.

ebroad (manager)Then it should use 5063, Ill look into why its not. In the
meantime, try setting externip/host with 5063 as the port.

adahlquist (reporter)I tried that and it didnt make a difference. I also
have port=5063 in peer details, and in the fromdomain i have host:5063.
Also have port=5063 in sip general. Here is my registration from a 1.4
asterisk box:

User Datagram Protocol, Src Port: 5061 (5061), Dst Port: sip (5060)
Session Initiation Protocol
    Request-Line: REGISTER sip:registrar.bandtel.com SIP/2.0
    Message Header
        Via: SIP/2.0/UDP my.ip.com:5061;branch=z9hG4bK3be99106;rport
            Transport: UDP
            Sent-by Address: my.ip.com
            Sent-by port: 5061
            Branch: z9hG4bK3be99106
            RPort: rport
        From: <sip:AOR at registrar.bandtel.com>;tag=as18fc8ea9
        To: <sip:AOR at registrar.bandtel.com>
        Call-ID: 5fd472234efe1da5762da6ef2842c4ea at 192.168.170.213
        CSeq: 784 REGISTER
            Sequence Number: 784
            Method: REGISTER
        User-Agent: Asterisk PBX
        Max-Forwards: 70
        Authorization: Digest username="AOR", realm="10.1.2.1",
algorithm=MD5, uri="sip:registrar.bandtel.com",
nonce="4b74955a810dd1992795b5b175596020aae65ca0",
response="af404f1d9aa3f34704278b3786ef91e2"
            Authentication Scheme: Digest
            Username: "AOR"
            Realm: "10.1.2.1"
            Algorithm: MD5
            Authentication URI: "sip:registrar.bandtel.com"
            Nonce Value: "4b74955a810dd1992795b5b175596020aae65ca0"
            Digest Authentication Response:
"af404f1d9aa3f34704278b3786ef91e2"
        Expires: 120
        Contact: <sip:AOR at my.ip.com:5061>
        Event: registration
        Content-Length: 0

And here is one from my 1.6 box which has the same config (VM image was
replicated and asterisk updated)

User Datagram Protocol, Src Port: 5063 (5063), Dst Port: sip (5060)
Session Initiation Protocol
    Request-Line: REGISTER sip:registrar.bandtel.com SIP/2.0
    Message Header
        Via: SIP/2.0/UDP my.ip.com:5060;branch=z9hG4bK14588a4e;rport
            Transport: UDP
            Sent-by Address: my.ip.com
            Sent-by port: 5060
            Branch: z9hG4bK14588a4e
            RPort: rport
        Max-Forwards: 70
        From: <sip:AOR at registrar.bandtel.com>;tag=as79b7fda4
        To: <sip:AOR at registrar.bandtel.com>
        Call-ID: 5f8d846018fe5bc579a77c025e60f8c7 at 192.168.170.171
        CSeq: 173 REGISTER
            Sequence Number: 173
            Method: REGISTER
        User-Agent: Asterisk PBX 1.6.2.2
        Authorization: Digest username="AOR", realm="10.1.12.1",
algorithm=MD5, uri="sip:registrar.bandtel.com",
nonce="4b75ac2cc400324fc2ab5f80e7d5ad072fbdfd33",
response="c5cd8f5bc3a5c6b134272b6b5987e328"
            Authentication Scheme: Digest
            Username: "AOR"
            Realm: "10.1.12.1"
            Algorithm: MD5
            Authentication URI: "sip:registrar.bandtel.com"
            Nonce Value: "4b75ac2cc400324fc2ab5f80e7d5ad072fbdfd33"
            Digest Authentication Response:
"c5cd8f5bc3a5c6b134272b6b5987e328"
        Expires: 120
        Contact: <sip:AOR at my.ip.com>
        Content-Length: 0

You can see that my source port is correct in both cases.

Please let me know as soon as you have an idea if this is a bug in
asterisk so i can set expectations as to where the roadblock is on my end.
Thanks a lot for your help and prompt replies on this issue.

ebroad (manager)Just to clarify, you are trying to contact Bandtel on 5063
as opposed to 5060? What does your register line look like?

adahlquist (reporter)I am communicating with Bandtel on their 5060, but am
receiving on my 5063. They require us to specify the port that we are
receiving on to be part of the contact header. Here is my register line:

AOR:password at registrar.bandtel.com/AOR 

You can see above that my 1.4 box has the bindport (5061 in this case) in
the contact header and the via line whereas my 1.6 box does not. You can
see that the src port is 5061 in the 1.4 packet and 5063 in the 1.6.

====================================================================== 

---------------------------------------------------------------------- 
 (0118187) lmadsen (administrator) - 2010-02-17 14:19
 https://issues.asterisk.org/view.php?id=16827#c118187 
---------------------------------------------------------------------- 
Can you reproduce this on a stock version of Asterisk? Using FreePBX could
introduce several issues that are not immediately apparent due to the way
it generates the configuration.

Does FreePBX support 1.6.x configurations yet?

I am going to guess this issue comes down to the way sip.conf etc... are
being generated, the the bindport settings are just different enough to
cause confusion with how FreePBX is generating the configurations. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-17 14:19 lmadsen        Note Added: 0118187                          
2010-02-17 14:19 lmadsen        Severity                 block => minor      
======================================================================




More information about the asterisk-bugs mailing list