<div dir="ltr"><div><div><div><div><div><div><div><div>I am trying to get the caller id to change on the channel when it comes on to label it depending on the DID it came in on, my goal is to prefix the caller id, say i have a DID that is in a Phone book, and i want to prefix "PB:" to the caller id (without the quotes) in order to know which DID this call came in on before answering the call.<br>
<br></div>Version: FreeSWITCH Version 1.5.8b+git~20140202T113337Z~9059fb91cc~64bit (git 9059fb9 2014-02-02 11:33:37Z 64bit)<br><br></div>INFO output: <a href="http://pastebin.freeswitch.com/21926">http://pastebin.freeswitch.com/21926</a><br>
<br></div>lua script (with attempts) to change this attribute: <a href="http://pastebin.freeswitch.com/21928">http://pastebin.freeswitch.com/21928</a><br><br></div><div>get_variable (and set_variable) are references to the session:setVariable and session:getVariable commands.<br>
</div><div><br></div>In my case, i can clearly see if i output the value of caller_id_name, that its changed, if i turn ignore_display_updates to false (or not set it at all) i can see in my dial plan that its updating the caller id, and erasing the Prefix i added to it. (well ignoring my set CID is probably a better way of putting it).<br>
<br></div><div>Regardless of what variables are set on the incoming call/channel the extension shows the original caller id.<br></div><div><br></div>I apologize if I'm doing something incredibly stupid, or missing something small, but I've spend a solid 8 hours trying to work through this.<br>
<br></div>Calls are handled via a lua script on the inbound per instructions found here: <a href="http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration#dialplan">http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration#dialplan</a><br>
<br></div>Which is why I'm using an actions table to do things.<br><br></div><div>This is using lua and MySQL (odbc) to handle a large number of look ups on the fly.<br></div><div><br></div>If you need anything more from me, let me know.<br>
</div>