[Freeswitch-users] Outbound Caller ID in a multi-Department environment

Chris Tunbridge blasterjr at gmail.com
Wed Oct 29 02:25:08 MSK 2014


You need to set Effective Caller ID effective_caller_id_number and
effective_caller_id_name

On Mon, Oct 20, 2014 at 10:26 AM, Joel White <joelewhite at gmail.com> wrote:

> 2014-10-20 12:22:08.594859 [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="192.168.1.2">
>       <user id="XXXX" mailbox="">
>         <params>
>           <param name="password" value="XXXX"/>
>           <param name="vm-password" value="XXXX"/>
>           <param name="vm-enabled" value="false"/>
>           <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="NAME"/>
>           <variable name="outbound_caller_id_number" value="14075555512"/>
>         </variables>
>       </user>
>     </domain>
>   </section>
> </document>
>
>
> Michael, this is what I am dynamically generating using Postgres and Lua.
> I put the lines of code for the variables wanted in my outbound dialplan
>
>       <action application="set"
> data="effective_caller_id_number=${outbound_call
> er_id_number}"/>
>       <action application="set"
> data="effective_caller_id_name=${outbound_caller
> _name}"/>
>
>
> I am still seeing the extension as the CID.  What is missing here?
>
> This is why I asked if it was possible to write a lua script to do the db
> lookup and insert while progressing through the dialplan.
>
>
>
> What is missing?
>
> Also, is there a way to look at all variables set on a specific extension?
>
>
>
>
>
> On Fri, Oct 17, 2014 at 11:59 AM, Michael Collins <msc at freeswitch.org>
> wrote:
>
>> The bridge app doesn't care whether it's static XML or dynamically
>> generated. It only cares about the channel variables being populated. It
>> will be the same whether you make 100 calls all with the same OB CID or 100
>> calls each with 100 different OB CID values. Just make sure that you're
>> setting the effective_caller_id_number (and _name, if necessary) variable.
>>
>> -MC
>>
>>
>> On Fri, Oct 17, 2014 at 8:33 AM, Joel White <joelewhite at gmail.com> wrote:
>>
>>> Will this work well when we are talking about perhaps 100 departments
>>> and 4000 users?
>>>
>>> I am trying to make it all run out of the database as changes can be
>>> made on the fly without disrupting call flow
>>>
>>> On Wed, Oct 15, 2014 at 2:53 PM, Steven Schoch <
>>> schoch+freeswitch.org at xwin32.com> wrote:
>>>
>>>> It should just work with the example dialplan, if you set the variables.
>>>> In my default dialplan, in an outbound file, I have this extension:
>>>>
>>>>    <extension name="domestic 10-digit">
>>>>     <condition field="destination_number"
>>>> expression="^\+?1?([2-9]\d\d[2-9]\d\d\
>>>> d{4})$">
>>>>       <action application="set"
>>>> data="effective_caller_id_number=${outbound_call
>>>> er_id_number}"/>
>>>>       <action application="set"
>>>> data="effective_caller_id_name=${outbound_caller
>>>> _name}"/>
>>>>       <action application="set" data="effective_callee_id_number=$1"/>
>>>>       <action application="set"
>>>> data="effective_callee_id_name=${cidlookup(1$1)}
>>>> "/>
>>>>       <action application="set" data="ignore_display_updates=true"/>
>>>>       <!-- If your provider does not provide ringback (180 or 183) you
>>>> may simul
>>>> ate
>>>>         ringback by uncommenting the following line. -->
>>>>       <!-- action application="ringback" /-->
>>>>       <!-- try an E.164 route -->
>>>>       <action application="set" data="continue_on_fail=true"/>
>>>>       <action application="enum" data="1$1 e164.org"/>
>>>>       <action application="bridge" data="${enum_auto_route}"/>
>>>>       <action application="enum" data="1$1 e164.arpa"/>
>>>>       <action application="bridge" data="${enum_auto_route}"/>
>>>>       <action application="bridge"
>>>> data="sofia/gateway/$${default_provider}/1$1"
>>>> />
>>>>      </condition>
>>>>    </extension>
>>>>
>>>> This sets the CID number to the outbound_caller_id_number, which is a
>>>> variable for each entry in the directory. A typical directory entry will
>>>> look like this:
>>>>
>>>> <include>
>>>>   <user id="516">
>>>>     <params>
>>>> ...user stuff here...
>>>>     </params>
>>>>     <variables>
>>>>       <variable name="toll_allow" value="domestic,international,local"/>
>>>>       <variable name="accountcode" value="516"/>
>>>>       <variable name="user_context" value="default"/>
>>>>       <variable name="effective_caller_id_name" value="Damian Mendola"/>
>>>>       <variable name="effective_caller_id_number" value="516"/>
>>>>       <variable name="outbound_caller_id_name"
>>>> value="$${outbound_caller_name}"/>
>>>>       <variable name="outbound_caller_id_number"
>>>> value="$${outbound_caller_id}"/>
>>>>       <variable name="callgroup" value="sales"/>
>>>>     </variables>
>>>>   </user>
>>>> </include>
>>>>
>>>> Some phones have a different outbound_caller_id, but most use our main
>>>> line, which is set in vars.xml.
>>>>
>>>> --
>>>> Steve
>>>>
>>>>
>>>> On Wed, Oct 15, 2014 at 9:06 AM, Joel White <joelewhite at gmail.com>
>>>> wrote:
>>>>
>>>>> I am having an issue setting up CID for individual extensions
>>>>>
>>>>>
>>>>> I am running out of a PostgreSQL DB and have created a Users Table
>>>>>
>>>>> Using Lua I am dynamically generating the Directory
>>>>>
>>>>> I have a column in the table for CID, but have been unsuccessful in
>>>>> implementing CID for outbound calling
>>>>>
>>>>>
>>>>> I want the extension to display internally, but to add CID when
>>>>> calling outside of the system
>>>>>
>>>>>
>>>>> How can I implement this?  And can it be done using Lua to dynamically
>>>>> lookup in the DB for each users CID?
>>>>>
>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> 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-powered IP PBX: The CudaTel Communication Server
>>>> http://www.cudatel.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-powered IP PBX: The CudaTel Communication Server
>>> http://www.cudatel.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-powered IP PBX: The CudaTel Communication Server
>> http://www.cudatel.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-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.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/20141028/a1429120/attachment.html 


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