Hi,
Some more INFO
kamialio.lua
sr.sqlops.query("cb", "select grp from address where id='1'",
"result");
sr.sqlops.column("result", index);
sr.sqlops.nrows("result");
sr.sqlops.ncols("result");
kamailio.cfg
modparam("sqlops","sqlcon","cb=>mysql://XXXX:XXXX@localhost/XXXX")
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Tue, Aug 22, 2017 at 6:18 PM, santosh gupta <santosh.gupta.g(a)gmail.com>
wrote:
Hi Robert,
Hope you are doing good.
You have helped me in the past.
I need to set LCR via app_lua, getting rates and destination from mysql.
Link which i am following is
https://www.kamailio.org/wiki/embeddedapi/4.0.x/lua
The issue is I am not able to get connect via sr commands for example
sr.sqlops.query("connection", "query", "result")
What should be exactly is "connection", "query", "result"
Error I am getting in syslog is
/usr/local/kamailio/etc/kamailio/kamailio.lua:1: attempt to index field 'sqlops'
(a nil value)
I am using kamailio 5.0.2
A little bit of headsup will help me.
Thanks a lot again.
--
Regards
Santosh Gupta
+91 9323043570
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_-6124904187259791916_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
--
Regards
Santosh Gupta
+91 9323043570