<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">hej Sajjad,<br>If you mean the "username" in Authorization header is invalid in step-3 you can do:<br>adjust
your script to send "404 Not Found" since the proxy_authorize and www_
authorize return value is number and if this number is equal to <span class="yiv1131255492emphasis"><em>-1 (invalid user)</em></span> - authentication user does
                                        not exist.<br>http://www.opensips.org/html/docs/modules/devel/auth_db.html#id250235<br><br>//Binan<br><br>--- On <b>Fri, 9/7/12, sajjad purmohseni <i><spurmohseni@yahoo.com></i></b> wrote:<br><br>From: sajjad purmohseni <spurmohseni@yahoo.com><br>Subject: Re: [OpenSIPS-Users] I never see 404 not found<br>To: "Muhammad Shahzad" <shaheryarkh@googlemail.com>, "users@lists.opensips.org" <users@lists.opensips.org><br>Date: Friday, September 7, 2012, 7:45 AM<br><br><div style="font-family:tahoma, 'new york', times, serif;font-size:10pt;"><span>Hello </span><span style="font-family:Arial;font-size:13px;">Muhammad; thanks for your pursuing;</span></div><div style="color:rgb(0, 0,
0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;"><span style="font-family:Arial;font-size:13px;"><br></span></div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;">Yes, second Invite or Register contains authentication header; this is the scenario I mean</div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;"><br></div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;">1 <span class="yiv1131255492Apple-tab-span" style="white-space:pre;">                </span>client -------------------------------<span style="background-color:transparent;">Invite-----</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;">------------>
proxy</span></div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;">2<span class="yiv1131255492Apple-tab-span" style="white-space:pre;">                </span>client <-------------------<span style="background-color:transparent;">407 with nonce</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;"> Proxy</span></div><div><span style="font-family:Arial;font-size:13px;">3</span><span class="yiv1131255492Apple-tab-span" style="font-family:Arial;font-size:13px;white-space:pre;">                </span><span style="font-family:Arial;font-size:13px;">client ------------Invite with calculated nonce</span><span style="font-family:Arial;font-size:13px;">-----</span><span
style="font-family:Arial;font-size:13px;">-------</span><span style="font-family:Arial;font-size:13px;">-------> Proxy</span></div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;"><span style="font-family:Arial;font-size:13px;">4<span class="yiv1131255492Apple-tab-span" style="white-space:pre;">                </span><span>client <----------------100 giving a try---------------</span></span><span style="background-color:transparent;">-----</span><span style="background-color:transparent;">-------</span><span style="background-color:transparent;">------ Proxy</span></div><div style="font-family:tahoma, 'new york', times, serif;font-size:10pt;"><span style="font-size:18px;font-family:tahoma, times, serif;"></span></div><div style="font-size:10pt;"><div style="line-height:normal;font-size:16px;font-family:tahoma, 'new york', times, serif;"><span class="yiv1131255492yui_3_2_0_19_134694454405786
yiv1131255492yui_3_2_0_19_1347027985656323" style="font-family:tahoma, times, serif;font-size:13px;"><span style="font-family:Arial;">5<span class="yiv1131255492Apple-tab-span" style="white-space:pre;">                </span><span>client <----------------180 ringing---------------------</span></span><span style="font-family:Arial;background-color:transparent;">-----</span><span style="font-family:Arial;background-color:transparent;">-------</span><span style="font-family:Arial;background-color:transparent;">------ Proxy</span></span></div><div style="line-height:normal;color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;" class="yiv1131255492yui_3_2_0_19_134702798565685"><span class="yiv1131255492yui_3_2_0_19_134694454405786 yiv1131255492yui_3_2_0_19_1347027985656323" style="font-family:tahoma, times, serif;font-size:13px;"><span style="font-family:Arial;background-color:transparent;"><br></span></span></div><div
style="line-height:normal;color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;" class="yiv1131255492yui_3_2_0_19_134702798565685"><span class="yiv1131255492yui_3_2_0_19_134694454405786 yiv1131255492yui_3_2_0_19_1347027985656323" style="font-family:tahoma, times, serif;font-size:13px;"><span style="font-family:Arial;background-color:transparent;">I
mean when client uses invalid "From URI" in authentication header in
the third step; proxy should send an "404 not found"; but as I see;
server just sends
407 message. As you know, if URI is valid, and calculated
response in authentication header is invalid server sends 407 message
too. This causes I cannot understand the URI binding is valid or not. I
except if "from URI" binding is invalid in authentication process;
server send me an 404 not found message. Is it possible and typical
option in SIP proxy servers? </span></span></div><div style="line-height:normal;color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;" class="yiv1131255492yui_3_2_0_19_134702798565685"><span class="yiv1131255492yui_3_2_0_19_134694454405786 yiv1131255492yui_3_2_0_19_1347027985656323" style="font-family:tahoma, times, serif;font-size:13px;"><span style="font-family:Arial;background-color:transparent;"><br></span></span></div><div style="line-height:normal;color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;" class="yiv1131255492yui_3_2_0_19_134702798565685"><span class="yiv1131255492yui_3_2_0_19_134694454405786
yiv1131255492yui_3_2_0_19_1347027985656323" style="font-family:tahoma, times, serif;font-size:13px;"><span style="font-family:Arial;background-color:transparent;">Thank you</span></span></div><div style="line-height:normal;color:rgb(0, 0, 0);font-size:13px;font-family:Arial;background-color:transparent;font-style:normal;" class="yiv1131255492yui_3_2_0_19_134702798565685"><span class="yiv1131255492yui_3_2_0_19_134694454405786" style="font-size:13px;font-family:tahoma, times, serif;"><span style="font-family:Arial;"><br class="yiv1131255492Apple-interchange-newline"></span>--------------------------------------------------</span></div><div style="line-height:normal;background-color:transparent;font-size:16px;font-family:tahoma, times, serif;"><span class="yiv1131255492yui_3_2_0_19_134694454405786" style="font-size:13px;"><span class="yiv1131255492Apple-tab-span" style="white-space:pre;">        </span>kind regards;</span></div><div
style="line-height:normal;font-size:16px;font-family:tahoma, 'new york', times, serif;"><span class="yiv1131255492yui_3_2_0_19_134694454405790" style="font-size:13px;font-family:tahoma, times, serif;"><span class="yiv1131255492tab"> </span>Sajad Pourmohseni</span></div></div></td></tr></table>