[OpenSIPS-Users] Invalid Contact header after b2b generates invite with Authorization header
Grygoriy Dobrovolskyy
greg at netw.fr
Fri May 15 15:47:30 CEST 2015
Hello people, we've found some bug maybe with the following scenario:
When b2b bridge_extern generates INVITE and from another side 401 reply
comes in, opensips makes new INVITE with Authorization header with
broken Contact header.
While t_uac function (tm module) is processing INVITE it does not
refresh new_cell->uac[0].extra_headers to address inside buf1 if there
were some message changes inside route. In this case Contact header may
be cut or broken.
Example of first INVITE with correct Contact:
INVITE sip:0970999999 at YYY.YYY.YYY.YYY SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bKfcc7.d8c515f1.0
To: sip:0970999999 at YYY.YYY.YYY.YYY
From: <sip:123 at XXX.XXX.XXX.XXX>;tag=e7c478f6bb31847621ace8d23046543b
CSeq: 2 INVITE
Call-ID: B2B.147.5347903
Max-Forwards: 70
Content-Length: 0
User-Agent: OpenSIPS (1.11.3-notls (x86_64/linux))
Contact: <sip:cc at XXX.XXX.XXX.XXX:5060>
Then after adding Authorization header second INVITE goes with broken
Contact (without first 5 symbols) :
INVITE sip:0970999999 at YYY.YYY.YYY.YYY SIP/2.0
Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK0dc7.81301005.0
To: sip:0970999999 at YYY.YYY.YYY.YYY
From: <sip:123 at XXX.XXX.XXX.XXX>;tag=e7c478f6bb31847621ace8d23046543b
CSeq: 3 INVITE
Call-ID: B2B.147.5347903
Max-Forwards: 70
Content-Length: 0
User-Agent: OpenSIPS (1.11.3-notls (x86_64/linux))
Authorization: Digest username="auth_user", realm="YYY.YYY.YYY.YYY",
nonce="4d0dc469320266c4422eabecb853de5ded0a",
uri="sip:0970999999 at YYY.YYY.YYY.YYY",
response="868d4581634d6eebf47908ee0fba1339", algorithm=MD5
ct: <sip:cc at XXX.XXX.XXX.XXX:5060>
So i was wondering how can i fix that ? ;)
Thanks
More information about the Users
mailing list