Hi,you can use the avpops module for this http://www.kamailio.org/docs/modules/devel/modules/ .avpops.html Regards,FedericoOn Mon, Aug 7, 2017 at 9:52 AM, Logeshwaran G <logeshwarangs@gmail.com> wrote:Do i need to implement something for reading that database.$avp(credits) is not reading the credits value from the subscriber table,Yes, I am using the script which I have sent you in the Previous mail,But That if($avp(credits) < 30On Mon, Aug 7, 2017 at 1:14 PM, Federico Cabiddu <federico.cabiddu@gmail.com> wrote:Hi,so you don't need any credentials in cnxcc.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.Cheers,FedericoOn Mon, Aug 7, 2017 at 9:38 AM, Logeshwaran G <logeshwarangs@gmail.com> wrote:Correct me if I am wrong!!with the below codes:I am trying to disallow the calls to the user whom they have low credits balance.Hi ,I do have one column name Credits in the kamailio table subscriber,
if($avp(credits) < 30) {
xlog("L_ALERT", "ALERT: Credit balance is less");
sl_send_reply("403", "Forbidden");
drop;
}On Mon, Aug 7, 2017 at 12:37 PM, Federico Cabiddu <federico.cabiddu@gmail.com> wrote:Hi,maybe I don't understand your question, but cnxcc does not make any usage nor requires credential.What are you trying to achieve exactly?Cheers,FedericoOn Mon, Aug 7, 2017 at 8:21 AM, Logeshwaran G <logeshwarangs@gmail.com> wrote:______________________________Like the above one , I need it for CNXCCIs there any possibility of loading credential from the db in the cnxcc module.For Example: modparam("auth_db", "load_credentials", "$avp(status)=status")_________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr- users