<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Note also the is_subscriber() function from auth_db, it can be
used to load credentials without requiring the authentication
process.</p>
<p>Also, sqlops is a handy module for loading data from any sql
database table.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 07.08.17 10:04, Logeshwaran G wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALa2Qa87atGF-KP56jihTpV2YJB7k0xi2CYSxZ+K84=J=o1+nw@mail.gmail.com">
<div dir="ltr">
<div>Thanks a lot,<br>
<br>
</div>
Will refer the avpops module, If I need help, will get back to
you.<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Aug 7, 2017 at 1:24 PM,
Federico Cabiddu <span dir="ltr"><<a
href="mailto:federico.cabiddu@gmail.com" target="_blank"
moz-do-not-send="true">federico.cabiddu@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,
<div>you can use the avpops module for this <a
href="http://www.kamailio.org/docs/modules/devel/modules/avpops.html"
target="_blank" moz-do-not-send="true">http://www.kamailio.org/<wbr>docs/modules/devel/modules/<wbr>avpops.html</a>.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Federico</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Aug 7, 2017 at 9:52
AM, Logeshwaran G <span dir="ltr"><<a
href="mailto:logeshwarangs@gmail.com"
target="_blank" moz-do-not-send="true">logeshwarangs@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>Yes, I am using the script which I have
sent you in the Previous mail,<br>
<br>
</div>
But That if($avp(credits) < 30 <br>
</div>
$avp(credits) is not reading the credits value
from the subscriber table,<br>
<br>
</div>
Do i need to implement something for reading
that database.<br>
<br>
</div>
<div class="m_-1173744705796078736HOEnZb">
<div class="m_-1173744705796078736h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Aug 7, 2017
at 1:14 PM, Federico Cabiddu <span
dir="ltr"><<a
href="mailto:federico.cabiddu@gmail.com"
target="_blank" moz-do-not-send="true">federico.cabiddu@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div dir="ltr">Hi,
<div>so you don't need any credentials
in cnxcc.</div>
<div>Just do as you are doing, read
the subscriber's column which hold
the user's balance,and call or not
the cnxcc's functions according to
the value of the avp.</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Federico</div>
</div>
<div
class="m_-1173744705796078736m_4186234440680387081HOEnZb">
<div
class="m_-1173744705796078736m_4186234440680387081h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon,
Aug 7, 2017 at 9:38 AM,
Logeshwaran G <span dir="ltr"><<a
href="mailto:logeshwarangs@gmail.com" target="_blank"
moz-do-not-send="true">logeshwarangs@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi ,<br>
<br>
</div>
I do have one column
name Credits in the
kamailio table
subscriber, <br>
<br>
</div>
I am trying to disallow
the calls to the user
whom they have low
credits balance.<br>
<br>
</div>
with the below codes:<br>
<br>
if($avp(credits) < 30)
{<br>
xlog("L_ALERT", "ALERT:
Credit balance is less");<br>
sl_send_reply("403",
"Forbidden");<br>
drop; <br>
}<br>
<br>
</div>
Correct me if I am wrong!!<br>
</div>
<div
class="m_-1173744705796078736m_4186234440680387081m_7011690560046276596HOEnZb">
<div
class="m_-1173744705796078736m_4186234440680387081m_7011690560046276596h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On
Mon, Aug 7, 2017 at
12:37 PM, Federico
Cabiddu <span
dir="ltr"><<a
href="mailto:federico.cabiddu@gmail.com"
target="_blank"
moz-do-not-send="true">federico.cabiddu@gmail.com</a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div dir="ltr">Hi,
<div>maybe I don't
understand your
question, but
cnxcc does not
make any usage
nor requires
credential.</div>
<div>What are you
trying to
achieve exactly?</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Federico</div>
</div>
<div
class="gmail_extra"><br>
<div
class="gmail_quote">
<div>
<div
class="m_-1173744705796078736m_4186234440680387081m_7011690560046276596m_-5952759078695259098h5">On
Mon, Aug 7,
2017 at 8:21
AM,
Logeshwaran G
<span
dir="ltr"><<a
href="mailto:logeshwarangs@gmail.com" target="_blank"
moz-do-not-send="true">logeshwarangs@gmail.com</a>></span>
wrote:<br>
</div>
</div>
<blockquote
class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div
class="m_-1173744705796078736m_4186234440680387081m_7011690560046276596m_-5952759078695259098h5">
<div dir="ltr">
<div>
<div>Is there
any
possibility of
loading
credential
from the db in
the cnxcc
module.<br>
<br>
</div>
For Example:
modparam("auth_db",
"load_credentials", "$avp(status)=status")<br>
<br>
</div>
Like the above
one , I need
it for CNXCC<br>
</div>
<br>
</div>
</div>
______________________________<wbr>_________________<br>
Kamailio (SER)
- Users
Mailing List<br>
<a
href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) -
Users Mailing List<br>
<a
href="mailto:sr-users@lists.kamailio.org"
target="_blank"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer"
target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing
List<br>
<a
href="mailto:sr-users@lists.kamailio.org"
target="_blank"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer"
target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a
href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.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-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>