<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<br>
if you use default kamailio.cfg auth part, then besides checking the
auth response, the functions checks that From/To username are the
same as authentiaction username (to prevent caller id spoofing) --
see the parameters of auth_check() to adjust this behaviour in case
you need that those usernames are different.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 14/09/15 15:58, Austin Einter wrote:<br>
</div>
<blockquote
cite="mid:CANXt1k9HPGeNprzApZrABGBxVYswd=AUB=sXchmqvLgUUkKKmg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>I am trying to register with Kamailio server from my
custom endpoint.<br>
</div>
<div>I have below call flows<br>
</div>
<div><br>
</div>
Register -> 401 <br>
</div>
Register -> 401<br>
<br>
</div>
When I saw Kamailio log, I do not see any error.<br>
</div>
Looks auth response is fine. Then why 401 repeatedly.<br>
<div><br>
</div>
<div>Log is given blow.<br>
</div>
<div>Please guide to fix this issue.<br>
</div>
<div><br>
<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: auth_db
[authorize.c:208]: get_ha1(): HA1 string calculated:
8749f9da135d71526725a337008df1d5<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: auth
[api.c:211]: auth_check_response(): check_response: Our result
= '4aa70d676021329550b3d17e17238fac'<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: auth
[api.c:218]: auth_check_response(): check_response:
Authorization is OK<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:81]: db_free_columns(): freeing 1 columns<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:85]: db_free_columns(): freeing RES_NAMES[0] at
0x7f8a24d5e1d0<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:94]: db_free_columns(): freeing result names at
0x7f8a24d7ceb0<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:99]: db_free_columns(): freeing result types at
0x7f8a24d7cef0<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:54]: db_free_rows(): freeing 1 rows<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_row.c:97]: db_free_row(): freeing row values at
0x7f8a24d5e260<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:62]: db_free_rows(): freeing rows at 0x7f8a24d5e218<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[db_res.c:136]: db_free_result(): freeing result set at
0x7f8a24d7ce18<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: auth
[challenge.c:127]: get_challenge_hf(): build_challenge_hf:
realm='10.10.64.125'<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: auth
[challenge.c:269]: get_challenge_hf(): auth:
'WWW-Authenticate: Digest realm="10.10.64.125",
nonce="VfbImFX2x2yEeE8kEuL2IXqW2TgKu+eC"#015#012'<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: sl [sl.c:296]:
send_reply(): reply in stateless mode (sl)<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[msg_translator.c:206]: check_via_address():
check_via_address(10.3.2.18, 10.3.2.18, 0)<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[tcp_main.c:2283]: tcpconn_send_put(): tcp_send: send from
reader (2650 (9)), reusing fd<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[tcp_main.c:2518]: tcpconn_do_send(): tcp_send: sending...<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[tcp_main.c:2552]: tcpconn_do_send(): tcp_send: after real
write: c= 0x7f8a1c5dbe78 n=445 fd=9<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[tcp_main.c:2553]: tcpconn_do_send(): tcp_send:
buf=#012SIP/2.0 401 Unauthorized#015#012Via: SIP/2.0/TCP
10.3.2.18:6970;branch=z9hG4bK1875333638#015#012From: <<a
moz-do-not-send="true"
href="mailto:sip%3A262099922700000@10.10.64.125"><a class="moz-txt-link-freetext" href="sip:262099922700000@10.10.64.125">sip:262099922700000@10.10.64.125</a></a>;user=phone>;tag=209355482#015#012To:
<<a moz-do-not-send="true"
href="mailto:sip%3A%2B499922700000@10.10.64.125">sip:+499922700000@10.10.64.125</a>;user=phone>;tag=8345fd11d20ec1ca026994bf51313cb0.a2c6#015#012Call-ID:
<a moz-do-not-send="true"
href="http://1340939517@10.10.64.125#015#012CSeq">1340939517@10.10.64.125#015#012CSeq</a>:
3 REGISTER#015#012WWW-Authenticate: Digest
realm="10.10.64.125",
nonce="VfbImFX2x2yEeE8kEuL2IXqW2TgKu+eC"#015#012Server:
kamailio (4.2.5 (x86_64/linux))#015#012Content-Length:
0#015#012#015#012<br>
Sep 14 18:41:08 necs107 kamailio[2650]: DEBUG: <core>
[usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list:
destroying list (nil)<br>
Sep 14 18:41:08 necs107 kamailio[2650]: message repeated 5
times: [ DEBUG: <core> [usr_avp.c:643]:
destroy_avp_list(): DEBUG:destroy_avp_list: destroying list
(nil)]<br>
<br>
<div>
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a></pre>
</body>
</html>