Ups Sorry#!ifdef WITH_MYSQLloadmodule "db_mysql.so"#!endifmodparam("sqlops","sqlcon","cb=>mysql://root:pass@IP/kamailio")if($rU=~"^1[0-9][0-9]$"){sql_query("cb", "select asterisk from x where extension='$rU'","valora");sql_result_free("valora");}With no issues..Any error on mysql¿BR2016-04-28 13:33 GMT+02:00 Alberto Sagredo <alberto.sagredo@avanzada7.com>:HiIm my casemodparam("sqlops","sqlcon","ca=>mysql://root:pass@IP/kamailio")2016-04-28 12:13 GMT+02:00 Shahid Mehmood <shahid.ge4@gmail.com>:_______________________________________________Dear All,
i am getting error when i trying to fetch data from mysql data base using kamailio.
i have following code into kamailio.cfg file
loadmodule "db_mysql.so"
loadmodule "sqlops.so"
................................
modparam("sqlops","sqlcon","ca=>mysql://root:123456@localhost/kamailio")
...............................
...............................
sql_query("ca", "select * from ext", "ra");
sql_result_free("ra");
Apr 24 06:30:31 kamalio /usr/sbin/kamailio[1385]: INFO: rr [rr_mod.c:160]: mod_init(): outbound module not available
Apr 24 06:30:31 kamalio /usr/sbin/kamailio[1385]: INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 1024
Apr 24 06:30:31 kamalio /usr/sbin/kamailio[1385]: ERROR: sqlops [sqlops.c:276]: fixup_sql_query(): invalid connection [ca]
Apr 24 06:30:31 kamalio /usr/sbin/kamailio[1385]: ERROR: <core> [route.c:1189]: fix_actions(): fixing failed (code=-1) at cfg://etc/kamailio/kamailio.cfg:514
Apr 24 06:30:31 kamalio /usr/sbin/kamailio[1385]: ERROR: <core> [route.c:1189]: fix_actions(): fixing failed (code=-1) at cfg://etc/kamailio/kamailio.cfg:534--Shahid Mehmood
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users