Hi all,
I have tried to use sofia sip to make register process into kamailio server.
But I always get 401 back from kamailio. I can register direct to kamailio by
using xlite or another softphone.
This is message capture. Please suggest to get it work or which value need to
be send with register message include authorization.
send 565 bytes to udp/[192.168.1.161]:5060 at 08:32:14.343288:
------------------------------------------------------------------------
REGISTER sip:192.168.1.161 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.112;rport;branch=z9hG4bKDgpc4rg780jHF
Max-Forwards: 70
From: <sip:12345@192.168.1.161>;tag=F2BmgNDa8m4NN
To: <sip:12345@192.168.1.161>
Call-ID: YzhjY2QwZjU4ZmViMmExODY2MmZjMWVjNmJiZWQwMTg.
CSeq: 46991303 REGISTER
Contact: <sip:12345@192.168.1.112>
Expires: 3600
User-Agent: FreeSWITCH-mod_sofia/1.5.3b+git~20130711T011704Z~cb554fb023
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, precondition, path, replaces
Content-Length: 0
recv 451 bytes from udp/[192.168.1.161]:5060 at 08:32:14.353074:
------------------------------------------------------------------------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.112;rport=5060;branch=z9hG4bKDgpc4rg780jHF
From: <sip:12345@192.168.1.161>;tag=F2BmgNDa8m4NN
To: <sip:12345@192.168.1.161>;tag=b27e1a1d33761e85846fc98f5f3a7e58.ec82
Call-ID: YzhjY2QwZjU4ZmViMmExODY2MmZjMWVjNmJiZWQwMTg.
CSeq: 46991303 REGISTER
WWW-Authenticate: Digest realm="192.168.1.161",
nonce="Ue3nGFHt5ewVs4++za3Fb4SfCBeC94vq"
Server: kamailio (3.2.4 (i386/linux))
Content-Length: 0
------------------------------------------------------------------------
send 811 bytes to udp/[192.168.1.161]:5060 at 08:32:14.559345:
------------------------------------------------------------------------
REGISTER sip:192.168.1.161 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.112;rport;branch=z9hG4bKeSF55K1a6983a
Max-Forwards: 70
From: <sip:12345@192.168.1.161>;tag=F2BmgNDa8m4NN
To: <sip:12345@192.168.1.161>
Call-ID: YzhjY2QwZjU4ZmViMmExODY2MmZjMWVjNmJiZWQwMTg.
CSeq: 46991303 REGISTER
Contact: <sip:12345@192.168.1.112>
Expires: 3600
User-Agent: FreeSWITCH-mod_sofia/1.5.3b+git~20130711T011704Z~cb554fb023
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, precondition, path, replaces
Authorization: Digest username="12345", realm="192.168.1.161",
nonce="Ue3nGFHt5ewVs4++za3Fb4SfCBeC94vq", uri="sip:192.168.1.112",
response="5f8a19d6ad00de2838a932d498a82674",
cnonce="d4f646c295c209b6e83f4a59fcea4ee8", nc=00000001, algorithm=MD5
Content-Length: 0
------------------------------------------------------------------------
recv 451 bytes from udp/[192.168.1.161]:5060 at 08:32:14.560922:
------------------------------------------------------------------------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.112;rport=5060;branch=z9hG4bKeSF55K1a6983a
From: <sip:12345@192.168.1.161>;tag=F2BmgNDa8m4NN
To: <sip:12345@192.168.1.161>;tag=b27e1a1d33761e85846fc98f5f3a7e58.02f3
Call-ID: YzhjY2QwZjU4ZmViMmExODY2MmZjMWVjNmJiZWQwMTg.
CSeq: 46991303 REGISTER
WWW-Authenticate: Digest realm="192.168.1.161",
nonce="Ue3nGFHt5ewVs4++za3Fb4SfCBeC94vq"
Server: kamailio (3.2.4 (i386/linux))
Content-Length: 0
------------------------------------------------------------------------
This is message send and receive from my code.
I have tried with wrong password but always get 401 from kamailio, not get 403,
or another message.
Thank all,
ThanhTruong
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel