<div dir="ltr"><div>2014-10-20 12:22:08.594859 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua, generated XML:<br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;<br>&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>  &lt;section name=&quot;directory&quot;&gt;<br>    &lt;domain name=&quot;192.168.1.2&quot;&gt;<br>      &lt;user id=&quot;XXXX&quot; mailbox=&quot;&quot;&gt;<br>        &lt;params&gt;<br>          &lt;param name=&quot;password&quot; value=&quot;XXXX&quot;/&gt;<br>          &lt;param name=&quot;vm-password&quot; value=&quot;XXXX&quot;/&gt;<br>          &lt;param name=&quot;vm-enabled&quot; value=&quot;false&quot;/&gt;<br>          &lt;param name=&quot;dial-string&quot; value=&quot;{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}&quot;/&gt;<br>    &lt;/params&gt;<br>        &lt;variables&gt;<br>          &lt;variable name=&quot;toll_allow&quot; value=&quot;local,domestic&quot;/&gt;<br>          &lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;<br>      &lt;variable name=&quot;outbound_caller_id_name&quot; value=&quot;NAME&quot;/&gt;<br>          &lt;variable name=&quot;outbound_caller_id_number&quot; value=&quot;14075555512&quot;/&gt;<br>        &lt;/variables&gt;<br>      &lt;/user&gt;<br>    &lt;/domain&gt;<br>  &lt;/section&gt;<br>&lt;/document&gt;<br><br><br></div>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<br><br><div>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_call</div><div>er_id_number}&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller</div><div>_name}&quot;/&gt;<br><br><br></div><div>I am still seeing the extension as the CID.  What is missing here?<br><br></div><div>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.<br><br><br><br></div><div>What is missing?<br><br></div><div>Also, is there a way to look at all variables set on a specific extension?<br><br><br></div><br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 17, 2014 at 11:59 AM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The bridge app doesn&#39;t care whether it&#39;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&#39;re setting the effective_caller_id_number (and _name, if necessary) variable.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">-MC<br><br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 17, 2014 at 8:33 AM, Joel White <span dir="ltr">&lt;<a href="mailto:joelewhite@gmail.com" target="_blank">joelewhite@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Will this work well when we are talking about perhaps 100 departments and 4000 users?<br><br></div>I am trying to make it all run out of the database as changes can be made on the fly without disrupting call flow<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 15, 2014 at 2:53 PM, Steven Schoch <span dir="ltr">&lt;<a href="mailto:schoch+freeswitch.org@xwin32.com" target="_blank">schoch+freeswitch.org@xwin32.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It should just work with the example dialplan, if you set the variables.<div>In my default dialplan, in an outbound file, I have this extension:</div><div><br></div><div><div>   &lt;extension name=&quot;domestic 10-digit&quot;&gt;</div><div>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^\+?1?([2-9]\d\d[2-9]\d\d\</div><div>d{4})$&quot;&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_call</div><div>er_id_number}&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller</div><div>_name}&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;effective_callee_id_number=$1&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;effective_callee_id_name=${cidlookup(1$1)}</div><div>&quot;/&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;ignore_display_updates=true&quot;/&gt;</div><div>      &lt;!-- If your provider does not provide ringback (180 or 183) you may simul</div><div>ate</div><div>        ringback by uncommenting the following line. --&gt;</div><div>      &lt;!-- action application=&quot;ringback&quot; /--&gt;</div><div>      &lt;!-- try an E.164 route --&gt;</div><div>      &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;</div><div>      &lt;action application=&quot;enum&quot; data=&quot;1$1 <a href="http://e164.org" target="_blank">e164.org</a>&quot;/&gt;</div><div>      &lt;action application=&quot;bridge&quot; data=&quot;${enum_auto_route}&quot;/&gt;</div><div>      &lt;action application=&quot;enum&quot; data=&quot;1$1 e164.arpa&quot;/&gt;</div><div>      &lt;action application=&quot;bridge&quot; data=&quot;${enum_auto_route}&quot;/&gt;</div><div>      &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/$${default_provider}/1$1&quot;</div><div>/&gt;</div><div>     &lt;/condition&gt;</div><div>   &lt;/extension&gt;</div><div><br></div><div>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:</div><div><br></div><div><div>&lt;include&gt;</div><div>  &lt;user id=&quot;516&quot;&gt;</div><div>    &lt;params&gt;</div><div>...user stuff here...</div><div>    &lt;/params&gt;<br></div><div>    &lt;variables&gt;</div><div>      &lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;</div><div>      &lt;variable name=&quot;accountcode&quot; value=&quot;516&quot;/&gt;</div><div>      &lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;</div><div>      &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;Damian Mendola&quot;/&gt;</div><div>      &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;516&quot;/&gt;</div><div>      &lt;variable name=&quot;outbound_caller_id_name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;</div><div>      &lt;variable name=&quot;outbound_caller_id_number&quot; value=&quot;$${outbound_caller_id}&quot;/&gt;</div><div>      &lt;variable name=&quot;callgroup&quot; value=&quot;sales&quot;/&gt;</div><div>    &lt;/variables&gt;</div><div>  &lt;/user&gt;</div><div>&lt;/include&gt;</div></div><div><br></div><div>Some phones have a different outbound_caller_id, but most use our main line, which is set in vars.xml.</div><span><font color="#888888"><div><br></div><div>-- </div><div>Steve</div></font></span><div><div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 15, 2014 at 9:06 AM, Joel White <span dir="ltr">&lt;<a href="mailto:joelewhite@gmail.com" target="_blank">joelewhite@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>I am having an issue setting up CID for individual extensions<br><br><br></div>I am running out of a PostgreSQL DB and have created a Users Table<br><br></div>Using Lua I am dynamically generating the Directory<br><br></div>I have a column in the table for CID, but have been unsuccessful in implementing CID for outbound calling<br><br><br></div>I want the extension to display internally, but to add CID when calling outside of the system<br><br><br></div>How can I implement this?  And can it be done using Lua to dynamically lookup in the DB for each users CID?<br></div></blockquote></div><br></div></div></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>