2014-10-20 12:22:08.594859 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua, generated XML: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
<?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><action application="set" data="effective_caller_id_number=${outbound_caller_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@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.-MCOn Fri, Oct 17, 2014 at 8:33 AM, Joel White <joelewhite@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 flowOn Wed, Oct 15, 2014 at 2:53 PM, Steven Schoch <schoch+freeswitch.org@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_caller_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 simulateringback 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.--SteveOn Wed, Oct 15, 2014 at 9:06 AM, Joel White <joelewhite@gmail.com> wrote:How can I implement this? And can it be done using Lua to dynamically lookup in the DB for each users CID?I want the extension to display internally, but to add CID when calling outside of the systemI have a column in the table for CID, but have been unsuccessful in implementing CID for outbound callingUsing Lua I am dynamically generating the DirectoryI am having an issue setting up CID for individual extensionsI am running out of a PostgreSQL DB and have created a Users Table
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@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@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@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@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org