[OpenSIPS-Users] Change Digest username in Authorization Header in Register

Bogdan-Andrei Iancu bogdan at opensips.org
Tue May 26 18:26:09 CEST 2015


Hi Nirali,

You could try to do it with some regexp and transformations, but your 
authentication will fail as the "response" will not match the username - 
the response is computed based in username, password, etc.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.05.2015 14:57, nirali soni wrote:
> Hi,
>
> I want to change Digest username in Register request.My use in 
> opensips Subscribe table as 1001 and in asterisk  sip.conf its lilke 
> *1001_cname. *when I try to register to asterisk it sends 403 
> Forbidden. with user name mismatch.
>
> REGISTER sip:192.168.50.123:5060;transport=UDP SIP/2.0
> Via: SIP/2.0/UDP 192.168.50.43:5060;branch=z9hG4bKfa0a.ff2f5601.0
> Via: SIP/2.0/UDP 
> 192.168.50.30:50413;received=192.168.50.30;branch=z9hG4bK-524287-1---8343a748155f5d1c;rport=50413
> Max-Forwards: 69
> Contact: 
> <sip:1006 at 192.168.50.30:50413;rinstance=bf3ed7694430b17a;transport=UDP>
> To: <sip:1006_cname at 192.168.50.123 
> <mailto:sip%3A1006_cname at 192.168.50.123>>
> From: <sip:1006_cname at 192.168.50.123 
> <mailto:sip%3A1006_cname at 192.168.50.123>>;tag=b223565f
> Call-ID: eODd20Lykxt_5QhbM49_hg..
> CSeq: 2 REGISTER
> Expires: 60
> Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, 
> INFO, SUBSCRIBE
> Supported: replaces, norefersub, extended-refer, timer, outbound, 
> path, X-cisco-serviceuri
> User-Agent: Zoiper r30798
> *Authorization: Digest 
> username="1006",realm="asterisk",nonce="50742ec9",uri="sip:192.168.50.123:5060;transport=UDP",response="c0409f4c7a960df17b24994aff6a9fa2",algorithm=MD5*
> Allow-Events: presence, kpml
> Content-Length: 0
> ==========
> I want Digest username= 1006_cname ..
> How can I do this?
>
>
>
> Thanks and Regards,
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150526/0c24f2d9/attachment.htm>


More information about the Users mailing list