[SR-Users] SIP Status: 401 Unauthorized (0 bindings)

Saul Waizer saulwaizer at gmail.com
Tue Apr 17 20:44:58 CEST 2012


Thank you, I enabled higher verbosity and got the following:

 7(29749) DEBUG: tm [t_lookup.c:1148]: DEBUG: t_check_msg: msg id=2 global
id=2 T end=(nil)

 7(29749) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=470 a=6
n=route

 7(29749) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=763 a=17
n=if

 7(29749) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=698 a=26
n=is_method

 7(29749) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=707 a=17
n=if

 7(29749) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=701 a=27
n=www_authorize

 7(29749) DEBUG: auth_db [authorize.c:303]: realm value [1.1.1.1]

 7(29749) DEBUG: auth [api.c:95]: auth: digest-algo: MD5 parsed value: 1

 7(29749) DEBUG: <core> [db_res.c:118]: allocate 28 bytes for result set at
0xb7209040

 7(29749) DEBUG: db_mysql [km_res.c:68]: 1 columns returned from the query

 7(29749) DEBUG: <core> [db_res.c:155]: allocate 4 bytes for result names
at 0xb7209118

 7(29749) DEBUG: <core> [db_res.c:165]: allocate 4 bytes for result types
at 0xb720908c

 7(29749) DEBUG: db_mysql [km_res.c:85]: allocate 8 bytes for RES_NAMES[0]
at 0xb7209ce4

 7(29749) DEBUG: db_mysql [km_res.c:92]: RES_NAMES(0xb7209ce4)[0]=[password]

 7(29749) DEBUG: db_mysql [km_res.c:136]: use DB1_STRING result type

 7(29749) DEBUG: <core> [db_res.c:184]: allocate 8 bytes for rows at
0xb7209d1c

 7(29749) DEBUG: <core> [db_row.c:119]: allocate 20 bytes for row values at
0xb7209d54

 7(29749) DEBUG: <core> [db_val.c:117]: converting STRING [abc123]

 7(29749) DEBUG: auth [api.c:210]: check_response: Our result =
'8077c41df1fac7cf3bdc69f13268d82b'

 7(29749) DEBUG: auth [api.c:220]: check_response: Authorization failed

 7(29749) DEBUG: <core> [db_res.c:81]: freeing 1 columns

 7(29749) DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[0] at 0xb7209ce4

 7(29749) DEBUG: <core> [db_res.c:94]: freeing result names at 0xb7209118

 7(29749) DEBUG: <core> [db_res.c:99]: freeing result types at 0xb720908c

 7(29749) DEBUG: <core> [db_res.c:54]: freeing 1 rows

 7(29749) DEBUG: <core> [db_row.c:97]: freeing row values at 0xb7209d54

 7(29749) DEBUG: <core> [db_res.c:62]: freeing rows at 0xb7209d1c

 7(29749) DEBUG: <core> [db_res.c:136]: freeing result set at 0xb7209040

 7(29749) ERROR: *** cfgtrace: c=[/etc/kamailio/kamailio.cfg] l=703 a=27
n=www_challenge

 7(29749) DEBUG: auth [challenge.c:102]: build_challenge_hf: realm='1.1.1.1'

 7(29749) DEBUG: auth [challenge.c:244]: auth: 'WWW-Authenticate: Digest
realm="1.1.1.1", nonce="T42590+NuMv/Z+tJt2jKl5A1XJ49feO7"


I know the user/pass is correct as i set it to something very simple, I
still dont understand what is wrong...

On Tue, Apr 17, 2012 at 2:29 PM, Stoyan Mihaylov <
stoyan.v.mihaylov at gmail.com> wrote:

> You have to check username, password, realm. Also - whether password is
> plaintext or not.
> If this do not work, you can put debug=4 or even more. Then you will
> receive plenty of messages, but may be you will see what is wrong.
>
> On Tue, Apr 17, 2012 at 9:16 PM, Saul Waizer <saulwaizer at gmail.com> wrote:
>
>> Hello List,
>>
>> I have a fresh install kamailio 3.2.0 running on ubuntu. Everything seems
>> to work fine according to the logs, I have enabled support for the
>> following:
>>
>>
>>    - enabled support to connect to MySQL server
>>    - enabled user authentication
>>    - enabled persistent user location service
>>    - enabled NAT traversal and updated RTPProxy control socket parameter
>>
>>    I added a few users with kamctl add user pass but when I try to
>>    register with my client I get the following:
>>
>>
>>   8.257745 x.x.x.x -> 10.62.99.103 SIP Request: REGISTER sip:x.x.x.x
>>   8.258462 10.62.99.103 -> x.x.x.x SIP Status: 401 Unauthorized    (0
>> bindings)
>>
>> Here are some detailed logs for the reg process:
>>
>> T x.x.x.x:63171 -> 10.62.99.103:5060 [AP]
>>
>> REGISTER sip:x.x.x.x SIP/2.0.
>>
>> Via: SIP/2.0/TCP 192.168.126.19:4369;rport;branch=z9hG4bK239028812.
>>
>> From: <sip:daniel at x.x.x.x>;tag=303867081.
>>
>> To: <sip:daniel at x.x.x.x>.
>>
>> Call-ID: 1300614569.
>>
>> CSeq: 7 REGISTER.
>>
>> Contact: <sip:daniel at x.x.x.x:63171;transport=tcp;line=5a9552052fb65c8>.
>>
>> Max-Forwards: 70.
>>
>> User-Agent: Linphone/3.5.0 (eXosip2/3.6.0).
>>
>> Expires: 600.
>>
>> Content-Length: 0.
>>
>> .
>>
>>
>>
>> T 10.62.99.103:5060 -> x.x.x.x:63171 [AP]
>>
>> SIP/2.0 401 Unauthorized.
>>
>> Via: SIP/2.0/TCP 192.168.126.19:4369
>> ;rport=63171;branch=z9hG4bK239028812;received=x.x.x.x.
>>
>> From: <sip:daniel at x.x.x.x>;tag=303867081.
>>
>> To: <sip:daniel at x.x.x.x>;tag=b27e1a1d33761e85846fc98f5f3a7e58.b260.
>>
>> Call-ID: 1300614569.
>>
>> CSeq: 7 REGISTER.
>>
>> WWW-Authenticate: Digest realm="x.x.x.x",
>> nonce="T42z9U+NssnZP82+sdkwPgl1nRk61QDm".
>>
>> Server: kamailio (3.2.0 (i386/linux)).
>>
>> Content-Length: 0.
>>
>>
>> Any help is greatly appreciated.
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120417/be4df3e5/attachment.htm>


More information about the sr-users mailing list