Fred
2006-Nov-13 15:42 UTC
[asterisk-users] "Username/auth name mismatch" + SIP phone can't connect?
Hello I'm trying to set up Asterisk on an older AMD Duron 700MHz with Fedora 5 for use with SIP phones and the Linksys 3102 SIP gateway (ie. no FXO card, so no need for zaptel and libpri), but I'm stuck: The GrandStream BudgeTone phone fails registering with Asterisk :-/ Following the "Asterisk - The Future of Telephony.pdf", here's what I did: 1. Installed Fedora 5, and ran "yum update", followed by "rpm -Uvh kernel kernel-devel" (yum would download the i686 version of "kernel" but the i586 version of "kernel-devel"). I made sure it had all the requirements for Asterisk (ncurses + ncurses-devel, openssl + openssl-devel, zlib + zlib-devel, and bison) 2. Downloaded, unzipped, built, installed the following packages succesfully: asterisk-1.2.13 asterisk-sounds-1.2.1 3. Edited /etc/asterisk/sip.conf thusly: [200] ; extension 200 type=friend secret=test qualify=yes ; Qualify peer is no more than 2000 ms away nat=no ; This phone is not natted host=dynamic ; This device registers with us canreinvite=no ; Asterisk by default tries to redirect context=internal ; the internal context controls what we can do 4. Added an empty section at the bottom of /etc/asterisk/extensions.conf: [internal] ;later 5. Launched asterisk -vvvvvgc. Launches with no error message 6. Configured the GrandStream phone with user=200, authname=200, password=test, SIP server=192.168.0.252 (IP of Asterisk server), register=yes 7. When I plug/unplug the SIP phone, its network icon isn't displayed (ie. there's no connection with the SIP server, and no dial tone), and here's what /var/log/asterisk/messages says: Nov 13 19:52:33 NOTICE[17922] chan_sip.c: Registration from '<sip:200@192.168.0.252>' failed for '192.168.0.234' - Username/auth name mismatch => Is this due to wrong settings in sip.conf, the empty section in extensions.conf, the fact that I didn't add the Linksys gateway yet (how?), something else? Thank you for any tip Fred.
Anselm Martin Hoffmeister
2006-Nov-13 17:22 UTC
[asterisk-users] "Username/auth name mismatch" + SIP phone can't connect?
Am Montag, den 13.11.2006, 23:42 +0100 schrieb Fred:> Hello > > I'm trying to set up Asterisk on an older AMD Duron 700MHz with Fedora 5 > for use with SIP phones and the Linksys 3102 SIP gateway (ie. no FXO card, > so no need for zaptel and libpri), but I'm stuck: The GrandStream BudgeTone > phone fails registering with Asterisk :-/ > > Following the "Asterisk - The Future of Telephony.pdf", here's what I did: > > 1. Installed Fedora 5, and ran "yum update", followed by "rpm -Uvh kernel > kernel-devel" (yum would download the i686 version of "kernel" but the i586 > version of "kernel-devel"). I made sure it had all the requirements for > Asterisk (ncurses + ncurses-devel, openssl + openssl-devel, zlib + > zlib-devel, and bison) > > 2. Downloaded, unzipped, built, installed the following packages succesfully: > asterisk-1.2.13 > asterisk-sounds-1.2.1 > > 3. Edited /etc/asterisk/sip.conf thusly: > [200] ; extension 200 > type=friend > secret=test > qualify=yes ; Qualify peer is no more than 2000 ms away > nat=no ; This phone is not natted > host=dynamic ; This device registers with us > canreinvite=no ; Asterisk by default tries to redirect > context=internal ; the internal context controls what we can doTry adding username=200 which fixed things for me. Alternatively, Try using a username that does NOT begin with a digit - I saw a flaky softphone some time ago that would screw completely with a numeric username. Just to go sure, I use usernames "sip501"... BR Anselm
Dovid B
2006-Nov-13 19:22 UTC
[asterisk-users] "Username/auth name mismatch" + SIP phone can'tconnect?
----- Original Message ----- From: "Fred" <gkdsh0n02@sneakemail.com> To: <asterisk-users@lists.digium.com> Sent: Tuesday, November 14, 2006 12:42 AM Subject: [asterisk-users] "Username/auth name mismatch" + SIP phone can'tconnect?> Hello > > I'm trying to set up Asterisk on an older AMD Duron 700MHz with Fedora 5 > for use with SIP phones and the Linksys 3102 SIP gateway (ie. no FXO card, > so no need for zaptel and libpri), but I'm stuck: The GrandStream > BudgeTone phone fails registering with Asterisk :-/ > > Following the "Asterisk - The Future of Telephony.pdf", here's what I did: > > 1. Installed Fedora 5, and ran "yum update", followed by "rpm -Uvh kernel > kernel-devel" (yum would download the i686 version of "kernel" but the > i586 version of "kernel-devel"). I made sure it had all the requirements > for Asterisk (ncurses + ncurses-devel, openssl + openssl-devel, zlib + > zlib-devel, and bison) > > 2. Downloaded, unzipped, built, installed the following packages > succesfully: > asterisk-1.2.13 > asterisk-sounds-1.2.1 > > 3. Edited /etc/asterisk/sip.conf thusly: > [200] ; extension 200 > type=friend > secret=test > qualify=yes ; Qualify peer is no more than 2000 ms away > nat=no ; This phone is not natted > host=dynamic ; This device registers with us > canreinvite=no ; Asterisk by default tries to redirect > context=internal ; the internal context controls what we can do > > 4. Added an empty section at the bottom of /etc/asterisk/extensions.conf: > > [internal] > ;later > > 5. Launched asterisk -vvvvvgc. Launches with no error message > > 6. Configured the GrandStream phone with user=200, authname=200, > password=test, SIP server=192.168.0.252 (IP of Asterisk server), > register=yes > > 7. When I plug/unplug the SIP phone, its network icon isn't displayed (ie. > there's no connection with the SIP server, and no dial tone), and here's > what /var/log/asterisk/messages says: > > Nov 13 19:52:33 NOTICE[17922] chan_sip.c: Registration from > '<sip:200@192.168.0.252>' failed for '192.168.0.234' - Username/auth name > mismatch > > => Is this due to wrong settings in sip.conf, the empty section in > extensions.conf, the fact that I didn't add the Linksys gateway yet > (how?), something else? > > Thank you for any tip > Fred. > > _______________________________________________The error you are getting is that asterisk has recieved the wrong user name and or pass and is there for rejecting your registration. Your sip.conf seems to be fine (although you may want to add dtmf and codec settings. Test the same settings that you have now with a softphone and see if you recieve the same errors or not.
Fred
2006-Nov-14 15:00 UTC
[asterisk-users] Re: "Username/auth name mismatch" + SIP phone can't connect?
Hello, Anselm Martin Hoffmeister > Try adding username=200 which fixed things for me. Alternatively, Try using a username that does NOT begin with a digit - I saw a flaky softphone some time ago that would screw completely with a numeric username. Dovid B >The error you are getting is that asterisk has recieved the wrong user name and or pass and is there for rejecting your registration. Your sip.conf seems to be fine (although you may want to add dtmf and codec settings. Test the same settings that you have now with a softphone and see if you recieve the same errors or not. Since the SJPhone could register OK (although sip debug showed some 401 at some point: maybe SJPhone supports some features that Asterisk doesn't, or at least are not supported by default), I figured it had something to do with the GrandStream phone : I had forgotten to turn off its use of NAT (STUN) :-/ This combined with a basic dial plan solved the issue. For those interested, here's my basis sip.conf: -------------------------- sip.conf ----------------------- [general] context=default ; Default context for incoming calls bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls [200] ;username=200 type=friend secret=test qualify=yes ; Qualify peer is no more than 2000 ms away nat=no ; This phone is not natted host=dynamic ; This device registers with us canreinvite=no ; Asterisk by default tries to redirect context=internal ; the internal context controls what we can do [201] ;username=201 type=friend secret=test qualify=yes ; Qualify peer is no more than 2000 ms away nat=no ; This phone is not natted ;host=192.168.0.234 host=dynamic ; This device registers with us canreinvite=no ; Asterisk by default tries to redirect context=internal ; the internal context controls what we can do -------------------------- sip.conf ----------------------- ... and the basic extensions.conf: -------------------------- extensions.conf ----------------------- [general] static=yes writeprotect=no autofallthrough=yes clearglobalvars=no priorityjumping=no [globals] [internal] ;BAD exten => ${EXTEN},1,Dial(SIP/${EXTEN}) exten => 200,1,Dial(SIP/200) exten => 201,1,Dial(SIP/201) exten => 202,1,Dial(SIP/202) -------------------------- extensions.conf ----------------------- I'm pretty sure there's a way to simplify the above, but as you can see, my first attempt made Asterisk barf ;-) Thanks guys for your help Fred.