<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
<br>
the avp_db_query needs a db/connection to query. <br>
<br>
But what kind of db is the "internal" db , how did you add the users?<br>
<br>
If i remember correctly adding users via opensipsctl does always
write to a database (which is configured in opensipsctlrc file)? If
there is no connection how did you add the users? But maybe i am
missing something?<br>
<br>
<br>
<br>
Best Regards<br>
<br>
Max M.<br>
<br>
Am 15.06.2011 13:07, schrieb Tiberiu Breana:
<blockquote
cite="mid:BANLkTinQL9hej2TTrQS2sa2QgS3qGw-aGQ@mail.gmail.com"
type="cite">I know that, but how can I connect to the subscriber
table (the default "user list")? It's not a mysql db.<br>
I don't have a persistent database configured right now. Do I need
to configure one if I want to use avp_db_query?<br>
<br>
Thanks.<br>
<br>
<div class="gmail_quote">On 15 June 2011 13:35, Max Mühlbronner <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:mm@42com.com">mm@42com.com</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;">
<div bgcolor="#ffffff" text="#000000"> Hello,<br>
<br>
the avpops is missing the db connection / db_url modparam.<br>
<br>
<a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/devel/avpops.html#id249134"
target="_blank">http://www.opensips.org/html/docs/modules/devel/avpops.html#id249134</a><br>
<br>
<pre>modparam("avpops","db_url","mysql://user:passwd@host/database")
Best Regards
Max M.
</pre>
<br>
Am 14.06.2011 17:02, schrieb Tiberiu Breana:
<blockquote type="cite">
<div>
<div class="h5">Hello.<br>
<br>
I want to use some custom RADIUS authentication
requests with radius_send_auth, but it seems this
can't work without sending the user's password.<br>
I'm trying to extract user passwords from the
subscriber table using the example from the avpops
manual: <br>
<br>
avp_db_query("select password from subscriber where
username='$tu'", "$avp(i:678)");<br>
<br>
But I get this error:<br>
<br>
ERROR:avpops:fixup_db_query_avp: no db url defined to
be used by this function<br>
ERROR:core:fix_actions: fixing failed (code=-6) at cfg
line 308<br>
ERROR:core:main: failed to fix configuration with err
code -6<br>
<br>
I guess I need to add a db_url ID to the query's
parameters, but I don't know what the subscriber
table's ID is. What is it? Or, how can I set it?<br>
Is there a simpler way to obtain a user's password and
put it in a variable?<br>
<br>
<br>
Regards,<br>
Tiberiu<br>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>