Notifications

[Solved] Register from CUBE to ITSP  

  RSS

flatero87
(@flatero87)
Active Member
Joined: 3 months ago
Posts: 5
30/12/2019 10:02 pm  

Hello Team,

I have a problem to register my sip line account from my cisco cube, and this is my config:

cisco 2901 Version 15.0(1)M3

Account information

username: [email protected]

password: password

domain: test.com

registrar server: 201.217.0.1

---------------

voice service voip
mode border-element
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
sip
header-passing
early-offer forced
sip-profiles 1

sip-ua
credentials username +59521xxx password 0 password realm test.com
authentication username +59521xxx password 0 password realm test.com
registrar ipv4:201.217.53.225 expires 120

 

with this config I get this error message, because I dont use the correct username like [email protected]

Sent:
REGISTER sip:201.217.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK91D05
From: <sip:[email protected]>;tag=AAD4C-0
To: <sip:[email protected]>
Date: Mon, 30 Dec 2019 19:44:37 GMT
Call-ID: 208768E4-2A6D11EA-8007829B-A2644968
User-Agent: Cisco-SIPGateway/IOS-12.x
Max-Forwards: 70
Timestamp: 1577735077
CSeq: 5 REGISTER
Contact: <sip:[email protected]:5060>
Expires: 120
Authorization: Digest username="+595212379305",realm="test.com",uri="sip:201.217.0.1:5060",response="a8e3a962756b267885167ed396382da7",nonce="Sogu6FIc2Upq6iqcYYLb2Q==",cnonce="FEFB89B6",qop=auth,algorithm=MD5,nc=00000001
Content-Length: 0

 

*Dec 30 19:44:38.192: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK91D05
Call-ID: 208768E4-2A6D11EA-8007829B-A2644968
From: <sip:[email protected]>;tag=AAD4C-0
To: <sip:[email protected]>;tag=y16b5x4x
CSeq: 5 REGISTER
Warning: 399 0.0.S.260.5.103.255.255.5142.0.0.test.com "Authentication Failure"
Content-Length: 0

 

If I change my username in my sip-ua config, like this:

sip-ua
credentials username [email protected] password 0 password realm test.com
authentication username [email protected] password 0 password realm test.com
registrar ipv4:201.217.53.225 expires 120

I get this error message:

 

Sent:
REGISTER sip:201.217.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK101953
From: <sip:[email protected]>;tag=1827EC-B4
To: <sip:[email protected]>
Date: Mon, 30 Dec 2019 19:59:32 GMT
Call-ID: 60F760BA-2A7511EA-8008829B-A2644968
User-Agent: Cisco-SIPGateway/IOS-12.x
Max-Forwards: 70
Timestamp: 1577735972
CSeq: 3 REGISTER
Contact: <sip:[email protected]:5060>
Expires: 120
Supported: path
Content-Length: 0

Dec 30 19:59:32.487: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK101953
Call-ID: 60F760BA-2A7511EA-8008829B-A2644968
From: <sip:[email protected]>;tag=1827EC-B4
To: <sip:[email protected]>;tag=axu2631f
CSeq: 3 REGISTER
WWW-Authenticate: Digest realm="test.com",nonce="Ip1eIWIaz8obGy5zP+Yk/w==",algorithm=MD5,qop="auth"
Content-Length: 0

 

If I use a softphone like phoneline, my sip line work and register fine

 


Quote
Pasha Teplitsky
(@pasha)
Member Admin
Joined: 4 years ago
Posts: 23
31/12/2019 11:04 am  

Hi,

basically, as you can see, in the second example that you sent, the register message doesn't include the credentials.

What should happen is after receiving the 401 unauthorized, CUBE should make another attempt to register using the credentials matching the realm in the answer.

Can you please confirm that the reals in the WWW-Authenticate header matches your configured realm under SIP-UA?


ReplyQuote
flatero87
(@flatero87)
Active Member
Joined: 3 months ago
Posts: 5
02/01/2020 3:46 pm  

Hello @Pasha

Thanks for you reply:

Can you please confirm that the reals in the WWW-Authenticate header matches your configured realm under SIP-UA?

Yes, it match

--------------

sip-ua
credentials username [email protected] password 0 password realm test.com
authentication username [email protected] password 0 password realm test.com
registrar ipv4:201.217.53.225 expires 120

-------------

Kind regards

 

 


ReplyQuote
flatero87
(@flatero87)
Active Member
Joined: 3 months ago
Posts: 5
02/01/2020 4:14 pm  

Hello @Pasha,

 

When I debbuging I get this message:

 

Jan 2 14:12:35.103: Parse Error: url_parseSipUrl: Unexpected char @

 

I possible that my cube doennot support @ in the username?

 

Regards


ReplyQuote
Pasha Teplitsky
(@pasha)
Member Admin
Joined: 4 years ago
Posts: 23
02/01/2020 6:17 pm  

Interesting theory, I have to admit that I don't remember such a restriction.

It would probably help to see a bit more of the debug.

Did you run 'debug ccsip all'? (wouldn't recommend running in a live environment)
It would be interesting to see what exactly happens after the challenge response is received.


ReplyQuote
flatero87
(@flatero87)
Active Member
Joined: 3 months ago
Posts: 5
03/01/2020 1:22 am  

hello @pasha.

Thanks for you time. This is the the logs of debug ccsip all


ReplyQuote
flatero87
(@flatero87)
Active Member
Joined: 3 months ago
Posts: 5
03/01/2020 11:20 pm  

Hello @pasha,

I did find the magic command that resolved my issue:

credentials number +5551111username [email protected] password xxxx realm test.com

 

 

 


ReplyQuote
Pasha Teplitsky
(@pasha)
Member Admin
Joined: 4 years ago
Posts: 23
05/01/2020 11:39 am  

Nice job!
Thank you very much for sharing the solution with the community.

The number command changes the 'To' header in the register request, I guess that's what the ITSP was looking for.

 

 


flatero87 liked
ReplyQuote
Share: