<div dir="ltr">Hello,<div><br></div><div>I have several Asterisk sending calls to a centralizad Kamailio.</div><div>I would like this Kamailio to set up the caller id number of the calls.<br></div><div><br></div><div>I am using the uac_replace_from function but I would like to pull the caller id from a database to set up the number based on the sip vendor the call is forwarded</div><div><br>What would be the correct way to do that?</div><div><br></div><div>I was thinking of: </div><div><br></div><div><span style="color:rgb(38,50,56);font-size:13px">sql_query("ca", "select ddi from ddi_table where xxx= $rU limit 1", "ra");</span><br style="color:rgb(38,50,56);font-size:13px"><span style="color:rgb(38,50,56);font-size:13px">$avp(dnis) = $dbr(ra=>[0,0]);</span><br style="color:rgb(38,50,56);font-size:13px"><span style="color:rgb(38,50,56);font-size:13px">sql_result_free("ra");  </span><br></div><div><br></div><div>But I am afraid of causing a bottheneck on the database.</div><div><br>As usual, thank you for the help.</div><div><br></div><div>Regards,</div><div><br>Nelson.-</div></div>