[asterisk-bugs] [Asterisk 0019333]: Asterisk to Asterisk multiple registration goes to "username mismatch"

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 19 15:14:04 CDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19333 
====================================================================== 
Reported By:                kovzol
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19333
Category:                   Channels/chan_sip/General
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.17.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:             2011-05-19 15:14 CDT
Last Modified:              2011-05-19 15:14 CDT
====================================================================== 
Summary:                    Asterisk to Asterisk multiple registration goes to
"username mismatch"
Description: 
I run two Asterisk servers, "A" as a general VoIP proxy, and "B" as a
smaller PBX.

Server "A" is configured to serve many different types of SIP clients,
including Asterisk clients as well. Server "B" is also a client for server
"A". On server "B" I use multiple SIP registrations with the following type
of SIP registry:

register => reg1:pass1 at serverA.ip/reg1
register => reg2:pass2 at serverA.ip/reg2
register => reg3:pass3 at serverA.ip/reg3

On server "A" I have the following configuration for each registration:

[reg1]
type=friend
secret=pass1
username=reg1
host=dynamic
nat=yes
callerid=reg1

Similar configurations are defined for reg2 and reg3, too.

On server "B" I use the following piece of code for extensions.conf to
make a difference among the incoming calls for the different
registrations:

[default]
exten => _X.,1,Set(INCOMING_LINE=${EXTEN})
exten => ...

As far as I know, this is the official way to handle what I'd like to.
This works properly in most cases, but sometimes I experience that the
registrations go wrong. Every time it happens I get this "well known" error
message:

[May 19 20:44:46] WARNING[24776] chan_sip.c: username mismatch, have
<reg2>, digest has <reg3>
[May 19 20:44:46] NOTICE[24776] chan_sip.c: Failed to authenticate device
"+XXXXXXXXXX" <sip:+XXXXXXXXXX at serverA.ip>;tag=as6e4a4ef9

All the time I get this error message, if I enter a "sip reload" on the
CLI on server "B", the registrations work properly again.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-19 15:14 kovzol         New Issue                                    
2011-05-19 15:14 kovzol         Asterisk Version          => 1.6.2.17.2      
2011-05-19 15:14 kovzol         Regression                => No              
2011-05-19 15:14 kovzol         SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list