<div dir="ltr">Hi Nelson<div><br></div><div>Im using rpid column to set Name as follows</div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">  if(avp_db_query("select rpid from subscriber where username = '$rU'", "$avp(s:callerid)"))</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">      {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">      uac_replace_from("\"$avp(s:callerid)\"","");</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">      xlog(" Valor de RPID es  : $avp(s:callerid)");</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="">      }</span></p></div><div><span style=""><br></span></div><div><span style=""><br></span></div><div><span style="">Hope this helps</span></div><div><span style=""><br></span></div><div><span style="">Put that before relay</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-06 19:55 GMT+02:00 Nelson Migliaro <span dir="ltr"><<a href="mailto:eng.migliaro@gmail.com" target="_blank">eng.migliaro@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>I am planning to insert the caller id in my Kamailio before sending the call to sip vendor.<br><br></div>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: <br></div><div><div><div><div><br><div>
        <pre style="border:1px solid rgb(153,204,204);padding-left:15pt;background-color:rgb(254,254,238)">modparam("sqlops","sqlcon","cb=><a>mysql://kamailio:abc@10.10.1.1/testdb</a>")
modparam("sqlops","sqlcon","ca=><a>dbdriver://username:password@dbhost/dbname</a>")
...</pre>
      </div>
      
        <pre style="border:1px solid rgb(153,204,204);padding-left:15pt;background-color:rgb(254,254,238)">...
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");</pre>Question.....<br><br></div><div>¿Is there an specific module to do this or a there a better way?<br><br></div><div>Thank you<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Nelson.-<br></div></font></span></div></div></div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>