Hi Bogdan,<br><br> Thank You for reply. It was network mapping issue and not opensips issue. I solved it.<br><br><br><br><div class="gmail_quote">On Mon, Aug 24, 2009 at 4:09 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Ashwini,<br>
<br>
As your script shows, you do either IP auth (allow trusted) or digest<br>
auth , but "credentials" are present only after digest auth.<br>
<br>
So, if it is a trusted peer, there will be no digest auth, no<br>
credentials and is_user_in() will fail.<br>
<br>
My advice is to replace is_user_in("credentials"); with<br>
is_user_in("from"); - anyhow you required both FROM USERNAME and AUTH<br>
USERNAME to be the same when doing check_from().<br>
<div class="im"><br>
Regards,<br>
Bogdan<br>
<br>
ASHWINI NAIDU wrote:<br>
><br>
</div><div><div></div><div class="h5">> Hi Bogdan,<br>
><br>
> Authen tication is done<br>
><br>
> *# ----- auth_db params -----<br>
> /* uncomment the following lines if you want to enable the DB based<br>
> authentication */<br>
> modparam("auth_db", "calculate_ha1", yes)<br>
> modparam("auth_db", "password_column", "password")<br>
> modparam("auth_db", "db_url",<br>
> "mysql://opensips:opensipsrw@localhost/opensips")<br>
> modparam("auth_db", "load_credentials", "")<br>
> *<br>
><br>
> *if (is_from_local()){<br>
> # From an internal domain -> check the credentials and the FROM<br>
> if (method=="MESSAGE") {<br>
> log(1,"\n--------------------------------------> ROUTE<br>
> 3 MESSAGE Looop-----------------------\n");<br>
> route(17);<br>
> };<br>
> if(!allow_trusted()){<br>
> if (!proxy_authorize("","subscriber")) {<br>
> proxy_challenge("","0");<br>
> exit;<br>
> } else if(!check_from()) {<br>
> sl_send_reply("403", "Forbidden, use From=ID");<br>
> exit;<br>
> };<br>
> };<br>
> if (client_nat_test("3")) {<br>
> append_hf("P-hint: setflag7|forcerport|fix_contact\r\n");<br>
> setbflag(7);<br>
> force_rport();<br>
> fix_contact();<br>
> };<br>
> #unconditional call forward<br>
> if(avp_db_load("$ru/username","$avp(s:callfwd)")) {<br>
> avp_pushto("$ru", "$avp(s:callfwd)");<br>
> route(1);<br>
> exit;<br>
> }<br>
><br>
> * *consume_credentials();*<br>
><br>
> * if (uri=~"^sip:00[0-9]{6,20}@") {<br>
> if (is_user_in("Credentials","local")) {<br>
> route(6);<br>
> log(1,"\n*********************** I AM GOING TO ENTER ROUTE<br>
> 4");<br>
> route(4);<br>
> exit;<br>
> } else {<br>
> sl_send_reply("403", "No permissions for local calls");<br>
> exit;<br>
> };<br>
> };*<br>
><br>
><br>
> Can you tell me where i may be going wrong<br>
><br>
><br>
> This is the piece of script<br>
> On Fri, Aug 21, 2009 at 5:58 PM, Bogdan-Andrei Iancu<br>
</div></div><div><div></div><div class="h5">> <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>>> wrote:<br>
><br>
> HI Ashwini,<br>
><br>
> If you wan to used the Credentials, then you need to be sure you did<br>
> authentication before (in script).<br>
><br>
> Regards,<br>
> Bogdan<br>
><br>
> ASHWINI NAIDU wrote:<br>
> > Hi all,<br>
> ><br>
> > I have installed opensips-1.5. I have applied the required<br>
> patch<br>
> > for group. When i use<br>
> ><br>
> > * is_user_in("Credentials", "local") { *<br>
> ><br>
> > I get the following error<br>
> ><br>
> > *ERROR:auth:consume_credentials: no authorized credentials found<br>
> > (error in scripts)<br>
> > Aug 21 17:09:30 debian /sbin/opensips[18916]:<br>
> > ERROR:group:get_username_domain: no authorized credentials found<br>
> > (error in scripts)<br>
> > Aug 21 17:09:30 debian /sbin/opensips[18916]:<br>
> ERROR:group:is_user_in:<br>
> > failed to get username@domain*<br>
> ><br>
> > Can anyone say what may be the problem.<br>
> > --<br>
> > Thanking You,<br>
> > Ashwini BR Naidu<br>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
</div></div>> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div class="im">> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> ><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
</div>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div><div></div><div class="h5">> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Thanking You,<br>
> Ashwini BR Naidu<br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanking You,<br>Ashwini BR Naidu<br>