Unregistered SIP 'username'

So this seems to me like something that would have been discussed before but neither google, bing nor the built in search here in the forum turned up anything.

So I am new to Asterisk and am going through the basic PBX tutorial section. I have configured the first two users. I registered to one just fine using a SIP app on my android phone. The other user (configured identically with the exception of the username), I am trying to connect the second user with an unlocked Vonage router (RT31P2). I have connected this router successfully to other SIP endpoint (freeswitch).

But it never seems to register. All I see in the CLI (at verbosity of 3 and greater) is:

This just contunuously scolls down the CLI. Looking at the peers (sip show peers) shows my android registered and connected but it shows nothing for the second user.

I can’t get any clues as to what is wrong and I have tried just about every setting available within the UI of the RT32P2. Any ideas?

Thanks.

Registration is done for users, not peers.

Thanks for your response David. But, as I am a new user, I am not sure what to do with your comment. I am just following the tutorial which told me to run the “sip show peers” command to see if my sip phones have registered (with the users I created). One was showing registered but the other is not showing anything and I am getting the error/warning/output I mentioned above.

As a side note, I ended up using a soft phone on my laptop to test the second user. Everything is set up just fine, I was able to make calls between the two clients. Now it is just a matter of finding out how to get my Linksys device (the vonage box) to register completely with one of those users.

A user isn’t necessarily a peer. I don’t have an example here, but I think it is possible to have a phone configured as a pure user that can only make outgoing calls.

To find out why the registration is failing, you need to get a trace of the SIP protocol during the REGISTER.

It is possible that your phone is set up as a pure user, and is not actually trying to register.

I don’t know anything about Vonage routers or their locking.

From my research I think the guts of the linksys box is related to the sipura devices out there (but I don’t know much more than that). I think the reason they had us use the peers command is that it shows if the device is connected or not (as well as the IP it is connectd on and the port). It was good info and made it easy to see that the first device was connected.

But I am getting nothing to help me with the second (I even set the verbosity to 9 to see if more info appeared). Could you point me in the right direction to learn how to set up the trace?

Thanks again.

Uncomment full in logger.conf, and make sure it includes debug and verbose

core set verbose 9
core set debug 9
sip set debug on

Using wireshark may produce less noise.

This is what i am seeing now in the full log.

[Apr 8 15:51:45] DEBUG[1033] chan_sip.c: = Looking for Call ID: ed42cc25-fc0dcd4c@192.168.2.5 (Checking From) --From tag 4d05e3d9e6747928o1 --To-tag [Apr 8 15:51:45] DEBUG[1033] netsock2.c: Splitting '192.168.2.100' gives... [Apr 8 15:51:45] DEBUG[1033] netsock2.c: ...host '192.168.2.100' and port '(null)'. [Apr 8 15:51:45] DEBUG[1033] netsock2.c: Splitting '192.168.2.100' gives... [Apr 8 15:51:45] DEBUG[1033] netsock2.c: ...host '192.168.2.100' and port '(null)'. [Apr 8 15:51:45] DEBUG[1033] chan_sip.c: **** Received REGISTER (2) - Command in SIP REGISTER [Apr 8 15:51:45] DEBUG[1033] netsock2.c: Splitting '192.168.2.5:5060' gives... [Apr 8 15:51:45] DEBUG[1033] netsock2.c: ...host '192.168.2.5' and port '5060'. [Apr 8 15:51:45] DEBUG[1033] chan_sip.c: Trying to put 'SIP/2.0 401' onto UDP socket destined for 192.168.2.5:5060 [Apr 8 15:51:45] DEBUG[1033] chan_sip.c: = Looking for Call ID: ed42cc25-fc0dcd4c@192.168.2.5 (Checking From) --From tag 4d05e3d9e6747928o1 --To-tag [Apr 8 15:51:45] DEBUG[1033] netsock2.c: Splitting '192.168.2.100' gives... [Apr 8 15:51:45] DEBUG[1033] netsock2.c: ...host '192.168.2.100' and port '(null)'. [Apr 8 15:51:45] DEBUG[1033] netsock2.c: Splitting '192.168.2.100' gives... [Apr 8 15:51:45] DEBUG[1033] netsock2.c: ...host '192.168.2.100' and port '(null)'. [Apr 8 15:51:45] DEBUG[1033] chan_sip.c: **** Received REGISTER (2) - Command in SIP REGISTER [Apr 8 15:51:45] DEBUG[1033] netsock2.c: Splitting '192.168.2.5:5060' gives... [Apr 8 15:51:45] DEBUG[1033] netsock2.c: ...host '192.168.2.5' and port '5060'. [Apr 8 15:51:45] DEBUG[1033] db.c: Unable to find key 'home-phone' in family 'SIP/Registry' [Apr 8 15:51:45] DEBUG[1033] db.c: Unable to find key 'home-phone' in family 'SIP/PeerMethods' [Apr 8 15:51:45] VERBOSE[1033] chan_sip.c: -- Unregistered SIP 'home-phone' [Apr 8 15:51:45] DEBUG[1033] chan_sip.c: Trying to put 'SIP/2.0 200' onto UDP socket destined for 192.168.2.5:5060 [Apr 8 15:51:45] DEBUG[986] devicestate.c: No provider found, checking channel drivers for SIP - home-phone [Apr 8 15:51:45] DEBUG[986] chan_sip.c: Checking device state for peer home-phone [Apr 8 15:51:45] DEBUG[986] devicestate.c: Changing state for SIP/home-phone - state 5 (Unavailable) [Apr 8 15:51:45] DEBUG[986] devicestate.c: device 'SIP/home-phone' state '5' [Apr 8 15:51:45] DEBUG[1043] app_queue.c: Device 'SIP/home-phone' changed to state '5' (Unavailable) but we don't care because they're not a member of any queue.

home-phone is what the linksys box is trying to authenticate as.

I am also seeing this now in the messages log

[Apr 8 16:00:29] NOTICE[1033] chan_sip.c: Correct auth, but based on stale nonce received from '<sip:home-phone@192.168.2.100>;tag=4d05e3d9e6747928o1'

and I got this on the CLI

[code]<— SIP read from UDP:192.168.2.5:5060 —>
REGISTER sip:192.168.2.100 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.5:5060;branch=z9hG4bK-5c718cf1
From: sip:home-phone@192.168.2.100;tag=4d05e3d9e6747928o1
To: sip:home-phone@192.168.2.100
Call-ID: ed42cc25-fc0dcd4c@192.168.2.5
CSeq: 56408 REGISTER
Max-Forwards: 70
Authorization: Digest username=“home-phone”,realm=“asterisk”,nonce=“3e3bca26”,uri=“sip:192.168.2.100”,algorithm=MD5,re sponse="a3aa633217f76e1efb9a5b3bd42209cc"
Contact: sip:home-phone@192.168.2.5:5060;expires=0
User-Agent: 0013101DFB5B Linksys/RT31P2-3.1.6(LI)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura

<------------->
— (13 headers 0 lines) —
Sending to 192.168.2.5:5060 (no NAT)
[Apr 8 16:00:38] NOTICE[1033]: chan_sip.c:13492 check_auth: Correct auth, but based on stale nonce received from ‘<si p:home-phone@192.168.2.100>;tag=4d05e3d9e6747928o1’

<— Transmitting (no NAT) to 192.168.2.5:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.5:5060;branch=z9hG4bK-5c718cf1;received=192.168.2.5
From: sip:home-phone@192.168.2.100;tag=4d05e3d9e6747928o1
To: sip:home-phone@192.168.2.100;tag=as55019a4e
Call-ID: ed42cc25-fc0dcd4c@192.168.2.5
CSeq: 56408 REGISTER
Server: Asterisk PBX 1.8.3.2-1digium1~lucid
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“3bee4c38”, stale=true
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘ed42cc25-fc0dcd4c@192.168.2.5’ in 32000 ms (Method: REGISTER)
[/code]

All of these things are being repeated over and over and over, etc.

Any ideas?

So I got it working. I changed two settings and am not sure which one did it (but to be honest it is working so I am not going to mess aroung with it to figure it out).

Basically I noticed that my working clients were sending a value for “Register Expires”. The linksys box by default was sending nothing so I added a value there.

The other thing I changed was a setting called “Reg Min Expires”. it was set to 1 second and it appeared to me that it was sending multiple registrations at a time and the responses where getting mixed up. I set this to a higher value.

Now the device connects; I get a dial tone and I am able to call an analog phone connected to it.

pls i need help,
i just installed asterisk 1.4 and freepbx 2.8 on centos 5.6 successfully but when i create extensions using the freepbx, my sip phone will not register but if create that same extension in sip.conf the phone will register.
i want to the create the extension using freepbx so how can i make it to register to my asterisk server.
thanks

castlehead: Please do not tail end existing threads with new questions.