<div dir="ltr">Brian, sorry, but mod_lcr for routing internal DIDs sounds like a terrible idea.<div><br></div><div>a) it&#39;s not DRY -- you&#39;ll have to duplicate your internal routing tables.</div><div>b) if it fails to connect to the &quot;local&quot; endpoint.. then if you&#39;re using mod_lcr for the routing too, it will then try the external carriers... which come back in and it surely won&#39;t work better than connecting directly!</div>

<div><br clear="all"><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small">-Avi</span></span></div>
<br><br><div class="gmail_quote">On Mon, Sep 24, 2012 at 3:08 AM, Brian Foster <span dir="ltr">&lt;<a href="mailto:bdfoster@endigotech.com" target="_blank">bdfoster@endigotech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<p>Im still liking the mod_lcr idea since you should be doing it anyway for something like this.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Sep 23, 2012 7:41 PM, &quot;Stanislav Sinyagin&quot; &lt;<a href="mailto:ssinyagin@yahoo.com" target="_blank">ssinyagin@yahoo.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


going back to your original message,<br>
<br>
1. having a separate condition for every user means that the switch will have to search through hundreds of regular expressions on every call. Not nice and a waste of cpu time. So, you need to look up some database instead.<br>



<br>
2. after an unsuccessful bridge, you resort in voicemail. Are you sure all your users want voicemail? Some will prefer the call to be unanswered, and some will want to forward the call if unsuccessful. Also some will want to always forward the calls. So, again you need to look up in user preferences database.<br>



<br>
also probably it makes sense to offload the user authentication and location database to an OpenSIPS or some other proxy, and let FreeSWITCH deal with call routing, media and voicemail.<br>
<br>
<br>
<br>
<br>
&gt;________________________________<br>
&gt; From: D&#39;Arcy Cain &lt;darcy@Vex.Net&gt;<br>
&gt;To: <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;Sent: Sunday, September 23, 2012 5:01 PM<br>
&gt;Subject: [Freeswitch-users] Keeping local calls local<br>
&gt;<br>
&gt;The first thing I found with the basic setup of FreeSWITCH was that<br>
&gt;calls between my own clients still went to my provider.  This seemed<br>
&gt;like a waste to me.  To handle calls coming in I generate an XML file<br>
&gt;called dialplan/public/00_Local.xml.  Here is an example entry from it.<br>
&gt;<br>
&gt;&lt;extension name=&quot;Local_<a href="tel:4164251212" value="+14164251212" target="_blank">4164251212</a>&quot;&gt;<br>
&gt;  &lt;condition field=&quot;destination_number&quot; expression=&quot;^<a href="tel:%284164251212" value="+14164251212" target="_blank">(4164251212</a>)$&quot;&gt;<br>
&gt;    &lt;action application=&quot;export&quot; data=&quot;dialed_extension=$1&quot;/&gt;<br>
&gt;    &lt;action application=&quot;bind_meta_app&quot; data=&quot;1 b s execute_extension::dx XML features&quot;/&gt;<br>
&gt;    &lt;action application=&quot;bind_meta_app&quot; data=&quot;2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav&quot;/&gt;<br>
&gt;    &lt;action application=&quot;bind_meta_app&quot; data=&quot;3 b s execute_extension::cf XML features&quot;/&gt;<br>
&gt;    &lt;action application=&quot;bind_meta_app&quot; data=&quot;4 b s execute_extension::att_xfer XML features&quot;/&gt;<br>
&gt;    &lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;set&quot; data=&quot;transfer_ringback=$${hold_music}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;set&quot; data=&quot;call_timeout=30&quot;/&gt;<br>
&gt;    &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
&gt;    &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>
&gt;    &lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;set&quot; data=&quot;called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial_ext/global/${uuid}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;bridge&quot; data=&quot;user/${dialed_extension}@${domain_name}&quot;/&gt;<br>
&gt;    &lt;action application=&quot;answer&quot;/&gt;<br>
&gt;    &lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;<br>
&gt;    &lt;action application=&quot;bridge&quot; data=&quot;loopback/app=voicemail:default ${domain_name} ${dialed_extension}&quot;/&gt;<br>
&gt;  &lt;/condition&gt;<br>
&gt;&lt;/extension&gt;<br>
&gt;<br>
&gt;I am still trying to figure out exactly what everything in there does<br>
&gt;but it seems to do the job.  Calls originating outside get delivered to<br>
&gt;the correct client&#39;s phone.  Calls between clients go out to the<br>
&gt;provider and then come back in as if it was external.<br>
&gt;<br>
&gt;I worked around this by symlinking this file to the dialplan/default<br>
&gt;directory.  This works but I wonder if this is the best way to<br>
&gt;accomplish this.<br>
&gt;<br>
&gt;Side question, can I create a simple alias for all of my DIDs and make<br>
&gt;one condition that tests that alias somehow?<br>
&gt;<br>
&gt;Cheers.<br>
&gt;<br>
&gt;--<br>
&gt;D&#39;Arcy J.M. Cain<br>
&gt;System Administrator, Vex.Net<br>
&gt;<a href="http://www.Vex.Net/" target="_blank">http://www.Vex.Net/</a> IM:darcy@Vex.Net<br>
&gt;<br>
&gt;_________________________________________________________________________<br>
&gt;Professional FreeSWITCH Consulting Services:<br>
&gt;<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
&gt;<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt;FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt;<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt;Official FreeSWITCH Sites<br>
&gt;<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt;<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt;FreeSWITCH-users mailing list<br>
&gt;<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<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>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.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>
</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>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.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>
<br></blockquote></div><br></div></div>