Yealink Forums

Full Version: 401/403 authorization error on remote asterisk from T46G over VPN
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I managed to get my T46G to connect to my company VPN using openvpn. It was verified on the server side that my vpn connection is up, running and normal.

However, I cannot register with the asterisk server. The errors I get are described in this log:

Code:
Jul  5 15:27:12 sua [570]: NET <5+notice> [255] <<<<=== UDP socket xxx.xx.xxx.xx:5060: read 545 bytes
Jul  5 15:27:12 sua [570]: SIP <6+info  > [SIP] match line:name:user host:xxx.xx.xxx.xx
Jul  5 15:27:12 sua [570]: DLG <5+notice> [000] Message recv: (from src=xxx.xx.xxx.xx:5060 len=545)
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000]
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] SIP/2.0 401 Unauthorized^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Via: SIP/2.0/UDP xxx.xx.xxx.xx:5060;branch=z9hG4bK504951337;received=xxx.xx.xxx.xx;rport=5060^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] From: "XXXX" <sip:user@xxx.xx.xxx.xx:5060>;tag=2191594142^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] To: "XXXX" <sip:user@xxx.xx.xxx.xx:5060>;tag=as104a9ba3^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Call-ID: 0_3713105589@xxx.xx.xxx.xx^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] CSeq: 1 REGISTER^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Server: Asterisk PBX 1.8.32.1^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Supported: replaces^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] WWW-Authenticate: Digest algorithm=MD5, realm="voip.xxxx.xx", nonce="7db21461"^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Content-Length: 0^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] ^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000]
Jul  5 15:27:12 sua [570]: SUA <6+info  > [000] ****eCore event:(0x0002)ECORE_REGISTRATION_FAILURE       ****
Jul  5 15:27:12 sua [570]: REG <6+info  > [000] Register: get expires:3600
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] have find the authentication info of <authinfo->username:user> , <wwwauth->realm:"voip.xxxx.xx"> !
Jul  5 15:27:12 sua [570]: FSM <6+info  > [000] allocating transaction ressource 30 0_3713105589
Jul  5 15:27:12 sua [570]: FSM <6+info  > [000] allocating NICT context
Jul  5 15:27:12 sua [570]: DLG <5+notice> [000] Message sent: (to dest=xxx.xx.xxx.xx:5060 len=752)
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000]
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] REGISTER sip:xxx.xx.xxx.xx:5060 SIP/2.0^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Via: SIP/2.0/UDP xxx.xx.xxx.xx:5060;branch=z9hG4bK135264429^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] From: "XXXX" <sip:user@xxx.xx.xxx.xx:5060>;tag=2191594142^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] To: "XXXX" <sip:user@xxx.xx.xxx.xx:5060>^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Call-ID: 0_3713105589@xxx.xx.xxx.xx^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] CSeq: 2 REGISTER^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Contact: <sip:user@xxx.xx.xxx.xx:5060>^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Authorization: Digest username="voip.xxxx.xx", realm="xxxx.xxxx.xx", nonce="7db21461", uri="sip:xxx.xx.xxx.xx:5060", response="eba392172612479a457c55d6d8f3dcfd", algorithm=MD5^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Max-Forwards: 70^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] User-Agent: Yealink SIP-T46G 28.80.0.95^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Expires: 3600^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Allow-Events: talk,hold,conference,refer,check-sync^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] Content-Length: 0^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] ^M
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000]
Jul  5 15:27:12 sua [570]: NET <5+notice> [000] ===>>>> UDP socket xxx.xx.xxx.xx:5060: send 752 bytes
Jul  5 15:27:12 sua [570]: NET <5+notice> [255] <<<<=== UDP socket xxx.xx.xxx.xx:5060: read 462 bytes
Jul  5 15:27:12 sua [570]: SIP <6+info  > [SIP] match line:name:user host:xxx.xx.xxx.xx
Jul  5 15:27:12 sua [570]: DLG <5+notice> [000] Message recv: (from src=xxx.xx.xxx.xx:5060 len=462)
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000]
Jul  5 15:27:12 sua [570]: DLG <6+info  > [000] SIP/2.0 403 Forbidden^M

I verified with the administrator that the password I am entering is correct. We reduced the password length to 8 characters in case the T46G doens't support longer passwords, but that was apparently not the problem.

Can anybody think of what might be going wrong? Possibly an issue with how the password is transported/encrypted? The username seems to arrive correctly.? Is there anything I can do to test this more? Any configuration options that I should be modifying for asterisk?

We (the administrator and I) managed to get the phone registered on asterisk. The problem is, this was only possible by not requiring a password. Obviously, I can't leave it like this. I thought I'd share this to help zoom in on the issue. The phone seems to work (exceptionally well) with asterisk. The issue is the password. Any password fails. When none is required it registers.
We solved it! The trick is that the "Register Name" in the Account tab (i.e. where you configure your SIP connection) must be the username. Now it works.
Reference URL's