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

Joel White joelewhite at gmail.com
Mon Dec 15 20:47:24 MSK 2014


And how would I put a conditional if the CID is not specified to set it?



On Mon, Dec 15, 2014 at 12:46 PM, Joel White <joelewhite at gmail.com> wrote:
>
> I will definitely use use origination_caller_*
>
> Thank you again
>
> On Mon, Dec 15, 2014 at 12:40 PM, Michael Jerris <mike at jerris.com> wrote:
>>
>> If you are using effective, you will have issues related to transfers.
>> You should really be using the ones i mentioned.
>>
>> On Dec 15, 2014, at 12:31 PM, Joel White <joelewhite at gmail.com> wrote:
>>
>> I implemented the suggestion that Chris gave and it works fine.
>>
>> On Mon, Dec 15, 2014 at 11:48 AM, Michael Jerris <mike at jerris.com> wrote:
>>>
>>> Double check configs and the sip traffic for differences.  Also double
>>> check firmware on devices.
>>>
>>> On Dec 15, 2014, at 1:13 AM, Joel White <joelewhite at gmail.com> wrote:
>>>
>>> I will implement this tomorrow.  I do have a question though, with all
>>> that being said....  the system I have running in the cloud does send out
>>> the CID specified in the Database using this methodology.  Why would it
>>> work on one and not the other when their configs are identical?
>>>
>>> Just curious
>>>
>>> On Thu, Dec 11, 2014 at 1:51 PM, Chris Tunbridge <blasterjr at gmail.com>
>>> wrote:
>>>>
>>>> Errr yeah, sorry Michael is right they're origination not effective :P
>>>>
>>>> On Thu, Dec 11, 2014 at 8:34 AM, Michael Jerris <mike at jerris.com>
>>>> wrote:
>>>>
>>>>> 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>
>>>>> 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>
>>>>> 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">
>>>>>>       <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">
>>>>>>       <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
>>>>>> set(effective_caller_id_number=)
>>>>>> 2014-12-09 17:00:24.839237 [DEBUG] mod_dptools.c:1435 sofia/internal/
>>>>>> 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)?
>>>>>>
>>>>>>
>>>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141215/22be7584/attachment-0001.html 


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