cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2947
Views
3
Helpful
8
Replies

SIP Authorization header modification failed

sameul.mumbere
Level 1
Level 1

I have been setting up CUBE to register with a service provider. The provider expects:

Digest username="+25675440000@provider.com",.........

 

but CUBE is sending this:

Authorization: Digest username="+25675440000",realm="provider.com",uri="sip:provider:5060",response="17c1db1cf80b0c4c0252ada3745d4130",nonce="UQn9BVDZqPnER5PeQl8IfQ==",cnonce="FFFFFFFF",qop=auth,algorithm=MD5,nc=00000001

 

However when I modify the sip profile as below; It affects all values that have "" (quatations)

 

request REGISTER sip-header Authorization modify "Digest username=\"+25675440000\"" "Digest username=\"+25675440000@provider.com\""

 

the result is:

Authorization: Digest username="+25675440000@provider.com",qop=auth,algorithm=MD5,nc=00000001

 

When i run it as just below; it remains unchanged;

request REGISTER sip-header Authorization modify "+25675440000" "+25675440000@provider.com"

 

 

Kindly advise how I can modify just the Digest username field. Am really new to this. Thank you.

8 Replies 8

R0g22
Cisco Employee
Cisco Employee
Why does your ITSP need "+25675440000@provider.com" ? What is the username that they have provided for registration that you have added to sip-ua on CUBE ? Can you show the "401" challenge coming from the ITSP ?



Hi Nipun,

 

The username provided is +25675440000

But he needs +25675440000@provider.com in the Authorization header

 

Received:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.156.0.249:5060;branch=z9hG4bK11917B4
Call-ID: 2A459290-5E611E8-FFFFFFFF80028391-FFFFFFFF92276292
From: <sip:+25675440000@provider.com>;tag=2EB117E-11C8
To: <sip:+25675440000@provider.com>;tag=hywclbec
CSeq: 283 REGISTER
WWW-Authenticate: Digest realm="provider.com",nonce="XpFRIk4p1EWhylCF2tS5zg==",algorithm=MD5,qop="auth"
Content-Length: 0

You can have the username/credential configuration under sip-ua as "+25675440000@provider.com". See if it helps.

I have tried this but it affects the To, From and contact headers of the REGISTER message sent to the provider

The display becomes <sip:+25675440000@provider.com@provider.com>

 

This is not recognized by the provider

That's right. That is why my first question was why does your ITSP need it this way. Who is the ITSP ? CenturyLink/Level 3 ?
I can check if a SIP Profile can achieve it. I doubt. Else you can keep the sip-ua that I suggested and use a SIP Profile to modify the To, From and Contact headers.

Hello @sameul.mumbere  @R0g22 

 

I have the same problem.

Could you solve the problem? did you modify the Digest username field?

Can you post up your current sip-ua configuration, and your outbound Register and other messages where you need to modify the username?   I expect a SIP profile could do the trick but there may be better ways.

Really what we want to see is what you're actually sending, and a description of what your ITSP says you should be sending.

Hello @TONY SMITH 

 

Thanks for your reply, but I got the solution to my case:

 

I was useing this config normaly:

 

sip-ua

credentials username 123@test.com password 123456 realm test.com

 

and I changed with this:

credentials number 123456 username 123456@test.com password 123456 realm test.com