Dear all,
I'm trying to register Kamailio (version 3.1.3) to different VoIP
provider but I always receive a 401 unauthorized even if I use valid
credentials.
I post below two different capture of the registration to the same
VoIP provider using the same credentials (SIP domain 94.23.56.123, SIP
auth username 1028), with a Blink softphone (successful) and with
Kamailio 3.1.3 (denied). The public IP address of my Kamailio is
anonymized with XXXXXXXX:
------ Blink softphone --------
REGISTER sip:94.23.56.123 SIP/2.0
Via: SIP/2.0/UDP
192.168.2.1:49186;rport;branch=z9hG4bKPjGtybPeuocgJbvOZlRNoWG3RPL0peCs31
Max-Forwards: 70
From: "ItaliADSL"
<sip:1028@94.23.56.123>;tag=Tid9EUBxo3Bc5Eo0xzaMg82Vk8q7J57j
To: "ItaliADSL" <sip:1028@94.23.56.123>
Contact: <sip:alybrkhq@192.168.2.115:49186>
Call-ID: cdr3Rr05eEs0voSSZ275zLxVF.Eo74mo
CSeq: 1 REGISTER
Expires: 600
User-Agent: Blink 0.22.2 (MacOSX)
Content-Length: 0
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
192.168.2.1:49186;branch=z9hG4bKPjGtybPeuocgJbvOZlRNoWG3RPL0peCs31;received=95.248.232.55;rport=49186
From: "ItaliADSL"
<sip:1028@94.23.56.123>;tag=Tid9EUBxo3Bc5Eo0xzaMg82Vk8q7J57j
To: "ItaliADSL" <sip:1028@94.23.56.123>;tag=as5a82d867
Call-ID: cdr3Rr05eEs0voSSZ275zLxVF.Eo74mo
CSeq: 1 REGISTER
User-Agent: MOR Softswitch
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="6afe07ca"
Content-Length: 0
REGISTER sip:94.23.56.123 SIP/2.0
Via: SIP/2.0/UDP
192.168.2.1:49186;rport;branch=z9hG4bKPj.JA-9Zf0dpKV6v0JmKtOGSMhyNw5ep1w
Max-Forwards: 70
From: "ItaliADSL"
<sip:1028@94.23.56.123>;tag=Tid9EUBxo3Bc5Eo0xzaMg82Vk8q7J57j
To: "ItaliADSL" <sip:1028@94.23.56.123>
Contact: <sip:alybrkhq@192.168.2.115:49186>
Call-ID: cdr3Rr05eEs0voSSZ275zLxVF.Eo74mo
CSeq: 2 REGISTER
Expires: 600
User-Agent: Blink 0.22.2 (MacOSX)
Authorization: Digest username="1028", realm="asterisk",
nonce="6afe07ca", uri="sip:94.23.56.123",
response="f3489b3c8510f39bcf3d1fd96b8836fb", algorithm=MD5
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.2.1:49186;branch=z9hG4bKPj.JA-9Zf0dpKV6v0JmKtOGSMhyNw5ep1w;received=95.248.232.55;rport=49186
From: "ItaliADSL"
<sip:1028@94.23.56.123>;tag=Tid9EUBxo3Bc5Eo0xzaMg82Vk8q7J57j
To: "ItaliADSL" <sip:1028@94.23.56.123>;tag=as5a82d867
Call-ID: cdr3Rr05eEs0voSSZ275zLxVF.Eo74mo
CSeq: 2 REGISTER
User-Agent: MOR Softswitch
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Expires: 600
Contact: <sip:alybrkhq@192.168.2.115:49186>;expires=600
Date: Sun, 08 May 2011 20:16:58 GMT
Content-Length: 0
----------- Kamailio 3.1.3 ----------------
REGISTER sip:94.23.56.123 SIP/2.0
Via: SIP/2.0/UDP XXXXXXXXXXX;branch=z9hG4bK58b4.3ac3b834.0
To: sip:1028@94.23.56.123
From: sip:1028@94.23.56.123;tag=464474ecb420f5357c1361be147933f0-45fd
CSeq: 10 REGISTER
Call-ID: 6efffe60-27704@XXXXXXXXXXXX
Content-Length: 0
User-Agent: kamailio (3.1.3 (i386/linux))
Contact: <sip:1028@XXXXXXXXXX>
Expires: 360
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP XXXXXXXXXX;branch=z9hG4bK58b4.3ac3b834.0;received=XXXXXXXXXX
From: sip:1028@94.23.56.123;tag=464474ecb420f5357c1361be147933f0-45fd
To: sip:1028@94.23.56.123;tag=as322a1728
Call-ID: 6efffe60-27704@XXXXXXXXXXX
CSeq: 10 REGISTER
User-Agent: MOR Softswitch
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="5f3ee3e8"
Content-Length: 0
REGISTER sip:94.23.56.123 SIP/2.0
Via: SIP/2.0/UDP XXXXXXXXXX;branch=z9hG4bK7666.c1b2e93.0
To: sip:1028@94.23.56.123
From: sip:1028@94.23.56.123;tag=464474ecb420f5357c1361be147933f0-1f9c
CSeq: 10 REGISTER
Call-ID: 6efffe60-27697@XXXXXXXXXXX
Content-Length: 0
User-Agent: kamailio (3.1.3 (i386/linux))
Contact: <sip:1028@XXXXXXXXXXX>
Expires: 360
Authorization: Digest username="1028", realm="asterisk",
nonce="5f3ee3e8", uri="sip:94.23.56.123",
response="df6ebfa9b5870b8b912d1e3b53eedc62", algorithm=MD5
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP XXXXXXXXX;branch=z9hG4bK7666.c1b2e93.0;received=XXXXXXXXX
From: sip:1028@94.23.56.123;tag=464474ecb420f5357c1361be147933f0-1f9c
To: sip:1028@94.23.56.123;tag=as529fc11d
Call-ID: 6efffe60-27697@XXXXXXXXXX
CSeq: 10 REGISTER
User-Agent: MOR Softswitch
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="41f3fe77"
Content-Length: 0
--------------------------------------
As you can see from the captures, Blink softphone successfully
registrates with VoIP provider while Kamailio's request is rejected. I
tried to analize the two flows of SIP messages but I didn't notice any
difference between them so I can't understand why Kamailio is not able
to register.
Can anybody help me to solve this issue?
greetings,
Pierpaolo