IP Phone registration problem


#1

Hi Friends,

        While i am trying to connect Cisco IP Phone to Asterisk server, the IP Phone is not able to register with server. 

I enabled SIP SET DEBUG ON. i got the following debug messages.

<— SIP read from UDP:192.168.1.12:50201 —>
REGISTER sip:192.168.1.162 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:121@192.168.1.12:5060;user=phone;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001a2f53cae1”;+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

<------------->
— (11 headers 0 lines) —
Sending to 192.168.1.12 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.168.1.12:50201 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470;received=192.168.1.12
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162;tag=as035ecbac
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
CSeq: 101 REGISTER
Server: Asterisk PBX 1.6.2.18
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7d3d7b6e"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.12:50201 —>
REGISTER sip:192.168.1.162 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:121@192.168.1.12:5060;user=phone;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001a2f53cae1”;+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

<------------->
— (11 headers 0 lines) —
Sending to 192.168.1.12 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.168.1.12:50201 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470;received=192.168.1.12
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162;tag=as035ecbac
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
CSeq: 101 REGISTER
Server: Asterisk PBX 1.6.2.18
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7d3d7b6e"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.12:50201 —>
REGISTER sip:192.168.1.162 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:121@192.168.1.12:5060;user=phone;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001a2f53cae1”;+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

<------------->
— (11 headers 0 lines) —
Sending to 192.168.1.12 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.168.1.12:50201 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470;received=192.168.1.12
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162;tag=as035ecbac
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
CSeq: 101 REGISTER
Server: Asterisk PBX 1.6.2.18
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7d3d7b6e"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.12:50201 —>
REGISTER sip:192.168.1.162 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:121@192.168.1.12:5060;user=phone;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001a2f53cae1”;+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

<------------->
— (11 headers 0 lines) —
Sending to 192.168.1.12 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.168.1.12:50201 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470;received=192.168.1.12
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162;tag=as035ecbac
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
CSeq: 101 REGISTER
Server: Asterisk PBX 1.6.2.18
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7d3d7b6e"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.12:50201 —>
REGISTER sip:192.168.1.162 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
Max-Forwards: 70
CSeq: 101 REGISTER
User-Agent: Cisco-CP7960G/8.0
Contact: sip:121@192.168.1.12:5060;user=phone;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-001a2f53cae1”;+u.sip!model.ccm.cisco.com="7"
Content-Length: 0
Expires: 120

<------------->
— (11 headers 0 lines) —
Sending to 192.168.1.12 : 5060 (no NAT)

<— Transmitting (no NAT) to 192.168.1.12:50201 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK43540470;received=192.168.1.12
From: sip:121@192.168.1.162;tag=001a2f53cae100022e9e94bf-04650c1f
To: sip:121@192.168.1.162;tag=as035ecbac
Call-ID: 001a2f53-cae10002-452f4e9b-3f9ab967@192.168.1.12
CSeq: 101 REGISTER
Server: Asterisk PBX 1.6.2.18
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7d3d7b6e"
Content-Length: 0

Can any one tell me what might be wrong in registration.

Regards,
Nagavardhan.


#2

Are you sure that your UN and PASS are correctly set on the IP Phone?


#3

It’s behaving as though they are not set at all, rather than set wrongly. That’s on the Cisco.


#4

Hi David,

        I think i set the UN and PASS correctly. Because, i am using SJPhone as soft phone. But it is registering properly and i can able to call between sjphone. But only the problem is with the Cisco IP Phone.
  
        Here i am sending my sip.conf, extensions.conf and SIP<MAC>.cnf files. Can please tell what might be wrong that i have done.

sip.conf
[121]
context=sipphone
type=peer
host=dynamic
username=121
secret=121

[122]
context=sipphone
type=friend
host=dynamic
username=122
secret=122

[277]
context=sipphone
type=friend
host=dynamic
username=277
secret=277

[278]
context=sipphone
type=friend
host=dynamic
username=278
secret=278

[279]
context=sipphone
type=friend
host=dynamic
username=279
secret=279

[280]
context=sipphone
type=friend
host=dynamic
username=280
secret=280

[111]
context=sipphone
type=friend
host=dynamic
username=111
secret=111

[222]
context=sipphone
type=friend
host=dynamic
username=222
secret=222

[333]
context=sipphone
type=friend
host=dynamic
username=333
secret=333

[444]
context=sipphone
type=friend
host=dynamic
username=444
secret=444

[mathew]
context=sipphone
type=friend
host=dynamic
username=mathew
secret=mathew

[365]
context=sipphone
type=friend
host=dynamic
username=365
secret=365

Extensions.conf
[sipphone]
exten => 101,1,Dial(SIP/jis)
exten => 100,1,Dial(SIP/prem)
exten => 102,1,Dial(SIP/sonu)
exten => 103,1,Dial(SIP/anush)
exten => 121,1,Dial(SIP/121)
exten => 122,1,Dial(SIP/122)
exten => 111,1,Dial(SIP/111)
exten => 222,1,Dial(SIP/222)
exten => 333,1,Dial(SIP/333)
exten => 444,1,Dial(SIP/444)
exten => 277,1,Dial(SIP/277)
exten => 278,1,Dial(SIP/278)
exten => 279,1,Dial(SIP/279)
exten => 280,1,Dial(SIP/280)
exten => 104,1,Dial(SIP/mathew)
exten => 365,1,Dial(SIP/365)

SIP.conf
proxy1_address: “192.168.1.162”

proxy2_address: “xxx.xxx.xxx.xxx

proxy3_address: “xxx.xxx.xxx.xxx

proxy4_address: “xxx.xxx.xxx.xxx

line1_name: “121”

line1_shortname: “121”

line1_displayname: “121”

line1_authname: “121”

line1_password: “121”

line2_name: “”

line2_shortname: “”

line2_displayname: “”

line2_authname: “UNPROVISIONED”

line2_password: “UNPROVISIONED”

line3_name: “”

line3_shortname: “”

line3_displayname: “” Name

line3_authname: “UNPROVISIONED”

line3_password: “UNPROVISIONED”

line4_name: “”

line4_shortname:

line4_displayname: “”

line4_authname: “UNPROVISIONED”

line4_password: “UNPROVISIONED”

line5_name: “”

line5_shortname: “”

line5_displayname: “”

line5_authname: “UNPROVISIONED”

line5_password: “UNPROVISIONED”

line6_name: “”

line6_shortname: “”

line6_displayname: “”

line6_authname: “UNPROVISIONED”

line6_password: “UNPROVISIONED”

proxy_emergency: “”

proxy_emergency_port: “5060”

proxy_backup: “”

proxy_backup_port: “5060”

outbound_proxy: “”

outbound_proxy_port: “5060”

nat_enable: “0”

nat_address: “”

voip_control_port: “5060”

start_media_port: “16348”

end_media_port: “20134”

nat_received_processing: “0”

phone_label: "Phone Title "

time_zone: CST

logo_url: “http://domain.ext/imagefile.bmp

telnet_level: “2”

phone_prompt: “Cisco7960”

phone_password: “password”

enable_vad: “0”

network_media_type: “auto”

user_info: phone

Regards,
Nagavardhan.


#5

Maybe the Cisco doesn’t like MD5 authentication?

In any case, Asterisk is operating correctly and it is the Cisco phone that is failing to authenticate itself.

You might also have one way routing, and the Cisco is never seeing the 401 responses.

At least some Cisco phones cannot cope with NAT, as they are intended for large company intranets.

There is something funny with the ports. The message has come from a non-standard port, bu the via is giving a standard one. Have you got a router that is trying to be “clever”?


#6

Hi David,

     If Cisco IP Phone is failing to MD5 algorithm. And not able to authenticate. Is there any other alternative to made work.
     I am not running the setup with router. I am jut directly connecting the Asterisk server and Cisco IP phone each other. 

Regards,
Nagavardhan.


#7

I would also investigate the possibility that it is never seeing the 401 responses. I do not know the capabilities of the SIP firmware in Ciscos, although I have heard that some versions cannot cope with NAT environments.

I would also question why Asterisk is not seeing a source port number of 5060. I would suggest that is something to do with your network, rather than the Cisco phones.

My suggestion would be to use Cisco phones with CUCM and not try and use them in a pure SIP environment.


#8

Hi David,

      Is this the problem with CTL file. Actually, while i was trying to load all files, in to Cisco IP Phone, i created a empty CTL file and i am loading the  files. When i am trying to change the configuration of CTL file it is not there in Security configuration menu.

Regards,
Nagavardhan.