Skip to content

Duplicate Authorization Header during retry #34

@manzonif

Description

@manzonif

hi,
I have problems in registering with my sip account. I guess it's due to the fact that, during the second retry, the authorization header is duplicated.

If I register the account through command line, the first attempt fails (Unauthorized)), but the second one has success:

REGISTER sip:sip.messagenet.it SIP/2.0
Via: SIP/2.0/UDP 192.168.1.235:5060;rport;branch=z9hG4bKPj1XrrxOPdbwSIIhBAVvlm.onYEoQnb.aN
Max-Forwards: 70
From: sip:5xxxxxxx@sip.messagenet.it;tag=GaP2SnBihhckA4ohyDt2R3dek70XQYfp
To: sip:5xxxxxxx@sip.messagenet.it
Call-ID: Ijefouh6.ptfvZnlNTC3iklkZbwDutVK
CSeq: 26520 REGISTER
User-Agent: PJSUA v2.6 Linux-4.9.35/armv7l/glibc-2.19
Contact: sip:5xxxxxxx@192.168.1.235:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username="5xxxxxxx", realm="sip.messagenet.it", nonce="WXIeUVlyHSVTcdQn/8lr0/Y/XEvQfkcvbmIEr4Zp0LzGPlrqh3AJKO0D38yA", uri="sip:sip.messagenet.it", response="5decad2161eec4c41905a3f331a778f6", cnonce="6LqUedwnQIrbPBuj1e7D2DzG4q5tO4lh", qop=auth, nc=00000001
Content-Length: 0

--end msg--
17:26:30.996 pjsua_core.c .RX 740 bytes Response msg 200/REGISTER/cseq=26520 (rdata0x74801294) from UDP 212.97.59.76:5060:
SIP/2.0 200 OK
....

With sipster, Authorization header is duplicated and fail:

REGISTER sip:sip.messagenet.it SIP/2.0
Via: SIP/2.0/UDP 192.168.1.235:5060;rport;branch=z9hG4bKPjYYxEtG9OCohuX2BLIegJKjQ0jYQEvK1p
Max-Forwards: 70
From: sip:5xxxxxxx@sip.messagenet.it;tag=lK0GQ-GFUROOYaDh90pOwFAjxyroxYL3
To: sip:5xxxxxxx@sip.messagenet.it
Call-ID: VbmrXY.RblC2vmrYrfQ-xbMEPGKiuIDc
CSeq: 60848 REGISTER
Authorization: digest username="5xxxxxxx", realm="*", nonce="", uri="sip:sip.messagenet.it", response=""
Contact: sip:5xxxxxxx@192.168.1.235:5060;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username="5xxxxxxx", realm="sip.messagenet.it", nonce="WXIx0llyMKZzuh9wmxmiqOlkAiqjPuN5bmIEr4Zp0LzGPlrqh3AJKPHXbNyB", uri="sip:sip.messagenet.it", response="9fad324af9e74f6c497853d8a3288eb8", cnonce="HbQAV56NE4cbzWN8daQfBnP0T37V95Q2", qop=auth, nc=00000001
Content-Length: 0

--end msg--
18:49:44.513 pjsua_core.c .RX 721 bytes Response msg 401/REGISTER/cseq=60848 (rdata0x73501294) from UDP 212.97.59.76:5060:
SIP/2.0 401 Unauthorized

Any idea to fix the problem?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions