[SR-Users] Insert callerid in Kamailio

Alberto Sagredo alberto.sagredo at avanzada7.com
Thu Apr 7 22:12:19 CEST 2016


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 at 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 at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160407/741baca3/attachment.html>


More information about the sr-users mailing list