[Freeswitch-users] Caller ID - Not Defined when executing dialplan, although Lua script is pulling CID from Database

Michael Jerris mike at jerris.com
Thu Dec 11 18:34:48 MSK 2014


you should be looking at the origination_caller_id_* vars, not effective

> On Dec 11, 2014, at 10:26 AM, Chris Tunbridge <blasterjr at gmail.com <mailto:blasterjr at gmail.com>> wrote:
> 
> The variable outbound_caller_id_number and outbound_caller_id_name are not related to the caller id on outbound calls.  
> 
> On your outbound dial plan you need to set something like the following
> 
>       <action application="export" data="effective_caller_id_name=${user_data(${username}@${domain_name} var outbound_caller_id_name)}"/>
>       <action application="export" data="effective_caller_id_number=${user_data(${username}@${domain_name} var outbound_caller_id_number)}"/>
> 
> This will cause the system to pull the settings from the users profile and use it for the outgoing call.
> 
> On Wed, Dec 10, 2014 at 12:27 PM, Joel White <joelewhite at gmail.com <mailto:joelewhite at gmail.com>> wrote:
> I have gone over the config with a fine tooth comb, it matches another config of a server in which the caller id works fine.  What I am seeing however is that in this system the variable is not exported to the dialplan.  I may be missing something, and most likely I am.  I do have a question though.  Is there a way to see what variables are defined for a particular user in the FreeSWITCH console?
> 
> 
> Here is some output of the Lua script on the server not pushing caller id
> 
> 2014-12-09 16:54:22.819251 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua, generated XML:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
>   <section name="directory">
>     <domain name="voip.net <http://voip.net/>">
>       <user id="26342" mailbox="26342">
>         <params>
>           <param name="password" value="XXXXXX"/>
>           <param name="vm-password" value="26342"/>
>           <param name="vm-enabled" value="true"/>
>           <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
>     </params>
>         <variables>
>           <variable name="toll_allow" value="local,domestic"/>
>           <variable name="user_context" value="default"/>
>           <variable name="outbound_caller_id_name" value="Michelle"/>
>           <variable name="outbound_caller_id_number" value="1321XXXXXXX"/>
>       <variable name="accountcode" value="PA"/>
>       <!--<variable name="callgroup" value="techsupport"/>-->
>         </variables>
>       </user>
>     </domain>
>   </section>
> </document>
> 
> 
> And some output from the Lua script on the server with CID functioning
> 
> 2014-12-09 21:50:55.458996 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua, generated XML:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
>   <section name="directory">
>     <domain name="sip.voice.com <http://sip.voice.com/>">
>       <user id="53201" mailbox="53201">
>         <params>
>           <param name="password" value="XXXXXXX"/>
>           <param name="vm-password" value="53201"/>
>           <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
>         </params>
>         <variables>
>           <variable name="toll_allow" value="local,domestic"/>
>           <variable name="user_context" value="default"/>
>           <variable name="outbound_caller_id_name" value="Voice.com <http://voice.com/>"/>
>           <variable name="outbound_caller_id_number" value="1303XXXXXX"/>
>           <!--<variable name="callgroup" value="techsupport"/>-->
>         </variables>
>       </user>
>     </domain>
>   </section>
> </document>
> 
> 
> Of course I removed any identifiable information, but it looks like the CID is being set.  What am I missing here that is not allowing for the variable to be passed to the dialplan?
> 
> 
> This is what I get when the dialplan executes
> 
> EXECUTE sofia/internal/26342 at voip.net <mailto:26342 at voip.net> 
> set(effective_caller_id_number=)
> 2014-12-09 17:00:24.839237 [DEBUG] mod_dptools.c:1435 sofia/internal/26342 at voip.net <mailto:26342 at voip.net> SET [effective_caller_id_number]=[UNDEF]
> 
> 
> Kinda strange and I could not find a discrepancy between the dialplan configuration of the working server vs the non-working server
> 
> 
> 
> Here is the version running on the server that works properly
> 
> FreeSWITCH Version 1.4.13+git~20141103T195300Z~b942d0faa8~64bit (git b942d0f 2014-11-03 19:53:00Z 64bit)
> 
> And the version of the server having issue with CID
> 
> FreeSWITCH Version 1.4.13+git~20141103T195300Z~
> b942d0faa8~64bit (git b942d0f 2014-11-03 19:53:00Z 64bit)
> 
> 
> 
> I used diff and compared both servers conf directory recursively.  I could not find a discrepancy in the files aside from Switch name, etc.
> 
> 
> What am I missing?
> 
> Could there be anything that that would overwrite the CID variable after it is set by Lua (Generating the user profile)?
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141211/a033879d/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list