Simply unable to register for unexplained reason

I’m at the end of my wits…
I simply can’t seem to get Asterisk to register to my router/modem.

I have a modem/router at home that also handles the voip traffic. It’s from my ISP and I can’t really do anything with it. The provider won’t disclose the sip settings so replacing it for a better piece of hardware is not possible either…

However, I can register softphones to that thing, and it’s pretty easy too.
So I thought I’d let Asterisk register itself to that router and let it answer calls, like some fancy answering machine (to start with).

I’ve been busy for 2 weeks now read every page google threw at me about the errors I get (even some russian ones, gotta love google translate) but no luck.
I’ve tried every possible combination I could find of the "register => " string but the thing refuses to register…
I don’t get it anymore… all I can find about it on the internet in combination with my hardware is that it no longer works but I refuse to believe that. If a softphone works then asterisk should be able to work with it too, right? But if Asterisk can’t register then it can never answer calls… well, not coming from the router…

I’m not even trying to let asterisk answer the calls… I just want it to register so it ‘can’ answer them once I edit the extensions.conf…

this is the registering part of my sip.conf. The way I understand it, this should be enough to at least let it show up in the router as a registered phone even though it can’t do anything yet… correct me if I’m wrong plz.

[general]
context=default
srvlookup=no
bindport=5060
bindaddr=192.168.2.100
;disallow=all
allow=alaw
canreinvite=no
localnet=192.168.2.0/255.255.255.0
defaultexpirey=3600
insecure=port,invite
register => *105@192.168.2.254:pass:*105@192.168.2.254/*105

Every combination of the register string I’ve tried but no luck…
the following errors show up:

[Nov 6 22:50:01] NOTICE[22488]: chan_sip.c:13273 sip_reg_timeout: -- Registration for '*105@192.168.2.254' timed out, trying again (Attempt #5) [Nov 6 22:50:01] NOTICE[22488]: chan_sip.c:20830 handle_response_register: Failed to authenticate on REGISTER to '*105@192.168.2.254' (Tries 3) [Nov 6 22:50:21] NOTICE[22488]: chan_sip.c:13273 sip_reg_timeout: -- Registration for '*105@192.168.2.254' timed out, trying again (Attempt #9) [Nov 6 22:50:21] NOTICE[22488]: chan_sip.c:20830 handle_response_register: Failed to authenticate on REGISTER to '*105@192.168.2.254' (Tries 3) [Nov 6 22:50:41] NOTICE[22488]: chan_sip.c:13273 sip_reg_timeout: -- Registration for '*105@192.168.2.254' timed out, trying again (Attempt #13) [Nov 6 22:50:41] NOTICE[22488]: chan_sip.c:20830 handle_response_register: Failed to authenticate on REGISTER to '*105@192.168.2.254' (Tries 3) [Nov 6 22:51:01] NOTICE[22488]: chan_sip.c:13273 sip_reg_timeout: -- Registration for '*105@192.168.2.254' timed out, trying again (Attempt #17) [Nov 6 22:51:01] WARNING[22488]: chan_sip.c:21345 handle_response: Remote host can't match request REGISTER to call '74671de231704c9c2d3967bd010ce6a0@192.168.2.100'. Giving up. [Nov 6 22:51:21] NOTICE[22488]: chan_sip.c:13273 sip_reg_timeout: -- Registration for '*105@192.168.2.254' timed out, trying again (Attempt #18) [Nov 6 22:51:21] WARNING[22488]: chan_sip.c:21345 handle_response: Remote host can't match request REGISTER to call '74671de231704c9c2d3967bd010ce6a0@192.168.2.100'. Giving up.

And all the router says is:

11/06/2012 22:52:11 [VoIP] SIP account 10 register fail(481) 11/06/2012 22:52:11 [VoIP] SIP account 9 register fail(481) 11/06/2012 22:51:41 [VoIP] SIP account 10 register fail(481) 11/06/2012 22:51:41 [VoIP] SIP account 9 register fail(481) 11/06/2012 22:51:11 [VoIP] SIP account 10 register fail(481) 11/06/2012 22:51:11 [VoIP] SIP account 9 register fail(481)
I checked the SIP rfc but I don’t understand a word about the explanation…
I tried a nonexisting username and the errors change, so the username is parsed correctly. I tried escape characters for the * just in case but that didn’t help either. Changing the password didn’t change anything in the error messages but that password works when I use it with a softphone.

This forum is my last hope. I’m a newbie. figuring stuff out by myself has always been a great way to learn a lot in a very short time but this simply seems impossible…

I hope somebody here can tell me what to try next.

try

if *105 is the user on the router

you have nothing set for outgoing I see

Tried that…
this is the outcome

[code][Nov 7 13:45:39] NOTICE[4973]: chan_sip.c:13273 sip_reg_timeout: – Registration for ‘*105@192.168.2.254’ timed out, trying again (Attempt #9)
[Nov 7 13:45:39] NOTICE[4973]: chan_sip.c:20830 handle_response_register: Failed to authenticate on REGISTER to ‘*105@192.168.2.254’ (Tries 3)
[Nov 7 13:45:59] NOTICE[4973]: chan_sip.c:13273 sip_reg_timeout: – Registration for ‘*105@192.168.2.254’ timed out, trying again (Attempt #13)
[Nov 7 13:45:59] WARNING[4973]: chan_sip.c:21345 handle_response: Remote host can’t match request REGISTER to call ‘05a169087641ed9862cc16fe12857c5d@192.168.2.100’. Giving up.
[Nov 7 13:46:19] NOTICE[4973]: chan_sip.c:13273 sip_reg_timeout: – Registration for ‘*105@192.168.2.254’ timed out, trying again (Attempt #14)
[Nov 7 13:46:19] WARNING[4973]: chan_sip.c:21345 handle_response: Remote host can’t match request REGISTER to call ‘05a169087641ed9862cc16fe12857c5d@192.168.2.100’. Giving up.

*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
192.168.2.254:5060 N *105 3600 Request Sent
1 SIP registrations.
*CLI>[/code]

*105 is the user yes. it works without a problem when using a softphone…
I don’t have anything for outgoing yet, that’s the next step. I want to have incoming working first.

I could post sip debug logs but that’s a whole lot of text

[quote=“possamai”][Nov 7 13:45:59] WARNING[4973]: chan_sip.c:21345 handle_response: Remote host can’t match request REGISTER to call ‘05a169087641ed9862cc16fe12857c5d@192.168.2.100’. Giving up.
[/quote]

This appears to be the result of getting an unexpected 481 (Call leg does not exist) response. I can’t see how that response would ever be valid for a REGISTER, as it is out of call. (Although note that some systems object if re-registers don’t have the same call-id, which can happen with Asterisk, but this would only apply to a re-register.)

I have no idea what you mean…
If it is registered then it should show up in the interface of the router and probably even give some debug logging on incoming calls but non of that happens.
The router does give that 481 error so that part fits but I still don’t understand why it won’t work.

Will some debug logs help?

Unfortunately, I couldn’t find a tabulation of permitted responses by method, but I feel that 481 is an illegal response for REGISTER.

That may explain why I can’t find a solution to my problem; it’s too weird…

but, softphones can connect so it should be possible… And while I think I learned a lot while searching for a solution I’m still a newbie and I don’t know where to search for answers anymore :frowning:

Here’s a debug log…
It looks absolutely fine to me so I still don’t understand where it’s going wrong :blush:

[code]REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 192.168.2.254:5060:
REGISTER sip:192.168.2.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK7fbc1938;rport
Max-Forwards: 70
From: sip:*105@192.168.2.254;tag=as7a6572c3
To: sip:*105@192.168.2.254
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 106 REGISTER
User-Agent: Asterisk PBX 1.8.16.0
Authorization: Digest username="*105", realm=“192.168.2.254”, algorithm=MD5, uri=“sip:192.168.2.254”, nonce=“1d94b363711fbb0034c3402203f82ba0”, response=“73603275a7a995d5a66fffabe8ce795d”, opaque=“cb153f607ee99984a60ea5b4f0bb256c”, qop=auth, cnonce=“6c234638”, nc=00000002
Expires: 3600
Contact: sip:*105@192.168.2.100:5060
Content-Length: 0


[Nov 8 10:56:29] NOTICE[3319]: chan_sip.c:13273 sip_reg_timeout: – Registration for ‘*105@192.168.2.254’ timed out, trying again (Attempt #5)

<— SIP read from UDP:192.168.2.254:5060 —>
SIP/2.0 401 Unauthorized
From: sip:*105@192.168.2.254;tag=as7a6572c3
To: sip:*105@192.168.2.254;tag=1787977912
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 106 REGISTER
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK7fbc1938;rport
WWW-Authenticate: Digest realm=“192.168.2.254”,nonce=“94248157de9d80405b5926b495c584bc”,opaque=“be95764bfba8e1c7167be4753db9b102”,stale=false,algorithm=MD5,qop="auth"
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Responding to challenge, registration to domain/host name 192.168.2.254
REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 192.168.2.254:5060:
REGISTER sip:192.168.2.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK1127b16d;rport
Max-Forwards: 70
From: sip:*105@192.168.2.254;tag=as65759093
To: sip:*105@192.168.2.254
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 107 REGISTER
User-Agent: Asterisk PBX 1.8.16.0
Authorization: Digest username="*105", realm=“192.168.2.254”, algorithm=MD5, uri=“sip:192.168.2.254”, nonce=“94248157de9d80405b5926b495c584bc”, response=“e84915e65b16109f1eeefef15d509c46”, opaque=“be95764bfba8e1c7167be4753db9b102”, qop=auth, cnonce=“60783e61”, nc=00000001
Expires: 3600
Contact: sip:*105@192.168.2.100:5060
Content-Length: 0


<— SIP read from UDP:192.168.2.254:5060 —>
SIP/2.0 401 Unauthorized
From: sip:*105@192.168.2.254;tag=as65759093
To: sip:*105@192.168.2.254;tag=1788515736
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 107 REGISTER
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK1127b16d;rport
WWW-Authenticate: Digest realm=“192.168.2.254”,nonce=“af00b91aa839b05e52cf83499c3a2ffe”,opaque=“a2748d2cb7c9255e61740f2592aa327f”,stale=false,algorithm=MD5,qop="auth"
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Responding to challenge, registration to domain/host name 192.168.2.254
REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 192.168.2.254:5060:
REGISTER sip:192.168.2.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK0f682815;rport
Max-Forwards: 70
From: sip:*105@192.168.2.254;tag=as03d1f398
To: sip:*105@192.168.2.254
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 108 REGISTER
User-Agent: Asterisk PBX 1.8.16.0
Authorization: Digest username="*105", realm=“192.168.2.254”, algorithm=MD5, uri=“sip:192.168.2.254”, nonce=“af00b91aa839b05e52cf83499c3a2ffe”, response=“1937a4965ccf3c4d0c50e957dec29211”, opaque=“a2748d2cb7c9255e61740f2592aa327f”, qop=auth, cnonce=“36452450”, nc=00000001
Expires: 3600
Contact: sip:*105@192.168.2.100:5060
Content-Length: 0


<— SIP read from UDP:192.168.2.254:5060 —>
SIP/2.0 401 Unauthorized
From: sip:*105@192.168.2.254;tag=as03d1f398
To: sip:*105@192.168.2.254;tag=1789070367
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 108 REGISTER
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK0f682815;rport
WWW-Authenticate: Digest realm=“192.168.2.254”,nonce=“924ae84ab7f25b4df5626254bfc33d38”,opaque=“0ead6ad6a56934ab10f16c2c3cc4abdc”,stale=false,algorithm=MD5,qop="auth"
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Responding to challenge, registration to domain/host name 192.168.2.254
REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 192.168.2.254:5060:
REGISTER sip:192.168.2.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK6b05341b;rport
Max-Forwards: 70
From: sip:*105@192.168.2.254;tag=as38559918
To: sip:*105@192.168.2.254
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 109 REGISTER
User-Agent: Asterisk PBX 1.8.16.0
Authorization: Digest username="*105", realm=“192.168.2.254”, algorithm=MD5, uri=“sip:192.168.2.254”, nonce=“924ae84ab7f25b4df5626254bfc33d38”, response=“adae03fbc3d6e36fe1f3fd0805f17a26”, opaque=“0ead6ad6a56934ab10f16c2c3cc4abdc”, qop=auth, cnonce=“66b2071b”, nc=00000001
Expires: 3600
Contact: sip:*105@192.168.2.100:5060
Content-Length: 0


<— SIP read from UDP:192.168.2.254:5060 —>
SIP/2.0 401 Unauthorized
From: sip:*105@192.168.2.254;tag=as38559918
To: sip:*105@192.168.2.254;tag=1789591384
Call-ID: 49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100
CSeq: 109 REGISTER
Via: SIP/2.0/UDP 192.168.2.100:5060;branch=z9hG4bK6b05341b;rport
WWW-Authenticate: Digest realm=“192.168.2.254”,nonce=“9874c0bc36700c44c34a7b2942caf7d7”,opaque=“14f85674e5431a14512d4cb7efb11c24”,stale=false,algorithm=MD5,qop="auth"
Content-Length: 0

<------------->
— (8 headers 0 lines) —
[Nov 8 10:56:30] NOTICE[3319]: chan_sip.c:20830 handle_response_register: Failed to authenticate on REGISTER to ‘*105@192.168.2.254’ (Tries 3)
Really destroying SIP dialog ‘49f3a68c2fddf71c6e2254a47c8b8807@192.168.2.100’ Method: REGISTER[/code]

so… I don’t suppose anyone can help me :cry:

The problem seems to lie outside Asterisk.

What’s the make and model of the device? Who is the ISP, if you don’t mind?

Sure, anything to get this working…

The device is an “Arcadyan ARV7519”.
Impossible to find on the Arcadyan website but that’s probably because it’s an ISP Branded model.
The outside looks similar to the VRV7510W2AC model on the Arcadyan website.

The isp is KPN (in the Netherlands).

Does anything on this page help?
http://kpn.gebruikers.eu/forum/viewthread.php?thread_id=885

Can you get into the router configuration webpage?

That website was the source for my initial attempt to get it working but it’s about a different router.
Completely different brand.

I can get into the web interface but it’s completely locked up by my ISP… some basic logging can be seen and some basic settings can be changed but the really useful stuff is hidden and not accessible.

I would replace the thing but my ISP also refuses to share the voip account information so I would lose voip when I change routers.

I’m having the exact same setup/isp/modem/router/behavior as described here. Softphones work, asterisks not, wireshark outputs for working softphone registration http://pastebin.com/F1TkvjhD and asterisk registration http://pastebin.com/1D6PNntW but not sure how to properly read them to figure out what is going wrong, would appreciate some help, thanks :smile:

fyi, i have also tried all sort of other registry strings like:

*105@router.webchilla:5060/*105~60 *105:kpn@router.webchilla/*105~60 *105:kpn@router.webchilla/*105 *105@192.168.2.254:kpn:*105@192.168.2.254:5060/*105 *105:kpn@192.168.2.254:5060/*105 *105:kpn@192.168.2.254/*105 udp://*105@router.webchilla:kpn:*105@192.168.2.254/*105~60 udp://*105@192.168.2.254:kpn:*105@192.168.2.254:5060/*105 udp://*105@192.168.2.254:kpn:*105@192.168.2.254/*105 udp://*105:kpn:*105@192.168.2.254/*105~3600

had the idea from http://forums.asterisk.org/viewtopic.php?f=14&t=86590

I’d try adding
Useragent=Twinkle/1.4.2

to the sip.conf general section - just in case some smart a** has decided that asterisk should not register to its box

thanks for the idea :smile: had the same thought and already tried that but did not change anything in behavior :frowning: any other ideas?

i think it might have something to do with the register string and the password, is there a way that i can check if the password is transmitted or even see what password is transmitted?

ok, after some talk on irc i tried sipp to see and get it registered with that, but am not really able to interpret the output.
sipp command i used: pastebin.com/q6UeqU0y
sipp error log: pastebin.com/jaMAzRNg
wireshark output: pastebin.com/2bDfaYNn

it seems to register but also give some 481 messages, which i also receive sometimes from softphone like twinkle but can make and receive calls on despite that msg sometimes showing.
in asterisk logs that 481 msg also shows up sometimes as you can see from posts above but it won’t register like the softphone, any more ideas?

still looking for a solution, now also posted on mailing list:
lists.digium.com/pipermail/aster … 82199.html

currently making use of a workaround, still had a SPA-3102 around that i was not using, this works well, the rj11 cable from modem/router goes into fxo port of SPA-3102, which connects/forwards to asterisk

but this is of course not ideal, still looking for solution, any help is much appreciated!! :smiley: