<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 class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Steve</div></font></span><div><div class="h5"><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">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>