Hello,
I am planning to insert the caller id in my Kamailio before sending the call to sip vendor.
I am planning to send a prefix before the number and use that prefix in the SQL query to select the CLID. I was thinking in the sqlops to select the CLID and then append the result in the Remote-Party-ID:
modparam("sqlops","sqlcon","cb=>mysql://kamailio:abc@10.10.1.1/testdb") modparam("sqlops","sqlcon","ca=>dbdriver://username:password@dbhost/dbname") ...
... sql_query("ca", "select clid from mitable where prefix = $var(prefix)", "ra"); xlog("number of rows in table domain: $dbr(ra=>rows)\n"); sql_result_free("ra");
Question.....
¿Is there an specific module to do this or a there a better way?
Thank you
Nelson.-
Hi Nelson
Im using rpid column to set Name as follows
if(avp_db_query("select rpid from subscriber where username = '$rU'", "$avp(s:callerid)"))
{
uac_replace_from(""$avp(s:callerid)"","");
xlog(" Valor de RPID es : $avp(s:callerid)");
}
Hope this helps
Put that before relay
2016-04-06 19:55 GMT+02:00 Nelson Migliaro eng.migliaro@gmail.com:
Hello,
I am planning to insert the caller id in my Kamailio before sending the call to sip vendor.
I am planning to send a prefix before the number and use that prefix in the SQL query to select the CLID. I was thinking in the sqlops to select the CLID and then append the result in the Remote-Party-ID:
modparam("sqlops","sqlcon","cb=>mysql://kamailio:abc@10.10.1.1/testdb") modparam("sqlops","sqlcon","ca=>dbdriver://username:password@dbhost/dbname") ...
... sql_query("ca", "select clid from mitable where prefix = $var(prefix)", "ra"); xlog("number of rows in table domain: $dbr(ra=>rows)\n"); sql_result_free("ra");
Question.....
¿Is there an specific module to do this or a there a better way?
Thank you
Nelson.-
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