[asterisk-dev] asterisk-1.6.0-beta7.1 chan_sip.c authuser not found when not using deprecated username

Dennis DeDonatis asterisk at dennisd.com
Wed Apr 2 22:11:21 CDT 2008


After many hours of debugging, I found out that in build_reply_digest (in chan_sip.c) on line 
14065, if I don't have username=whatever but only have defaultuser=whatever, the check on line 
14069 will show that username has a length of zero.

Please add a warning message of some sort before the return -1.  That would have saved me a 
LOT of time trying to figure out what was going on.

The registration was successful, but I would get the notice:

chan_sip.c: Failed to authenticate on INVITE...

whenever I attempted to make a call.  That was the only message I had to go on.

My main post is to please add a message if chan_sip.c can't find a username for 
build_reply_digest, so feel free to ignore my next question, but it does directly apply.

Is there something else I should be doing in my sip.conf?

[callcentric]
type=friend
context=incoming
host=callcentric.com
username=1777xxx
;defaultuser=1777xxx
secret=xxx
fromdomain=callcentric.com
insecure=port,invite
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
;allow=g729
qualify=yes
fromuser=1777xxx
nat=route

Please let me know if you need more information to duplicate this or if you want me to try 
anything.

Thanks for all of your help.

Dennis




More information about the asterisk-dev mailing list