[Freeswitch-users] Keeping local calls local

Avi Marcus avi at avimarcus.net
Mon Sep 24 13:26:16 MSD 2012


Brian, sorry, but mod_lcr for routing internal DIDs sounds like a terrible
idea.

a) it's not DRY -- you'll have to duplicate your internal routing tables.
b) if it fails to connect to the "local" endpoint.. then if you're using
mod_lcr for the routing too, it will then try the external carriers...
which come back in and it surely won't work better than connecting directly!

-Avi


On Mon, Sep 24, 2012 at 3:08 AM, Brian Foster <bdfoster at endigotech.com>wrote:

> Im still liking the mod_lcr idea since you should be doing it anyway for
> something like this.
> On Sep 23, 2012 7:41 PM, "Stanislav Sinyagin" <ssinyagin at yahoo.com> wrote:
>
>> going back to your original message,
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>>
>>
>>
>> >________________________________
>> > From: D'Arcy Cain <darcy at Vex.Net>
>> >To: FreeSWITCH-users at lists.freeswitch.org
>> >Sent: Sunday, September 23, 2012 5:01 PM
>> >Subject: [Freeswitch-users] Keeping local calls local
>> >
>> >The first thing I found with the basic setup of FreeSWITCH was that
>> >calls between my own clients still went to my provider.  This seemed
>> >like a waste to me.  To handle calls coming in I generate an XML file
>> >called dialplan/public/00_Local.xml.  Here is an example entry from it.
>> >
>> ><extension name="Local_4164251212">
>> >  <condition field="destination_number" expression="^(4164251212)$">
>> >    <action application="export" data="dialed_extension=$1"/>
>> >    <action application="bind_meta_app" data="1 b s
>> execute_extension::dx XML features"/>
>> >    <action application="bind_meta_app" data="2 b s
>> record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
>> >    <action application="bind_meta_app" data="3 b s
>> execute_extension::cf XML features"/>
>> >    <action application="bind_meta_app" data="4 b s
>> execute_extension::att_xfer XML features"/>
>> >    <action application="set" data="ringback=${us-ring}"/>
>> >    <action application="set" data="transfer_ringback=$${hold_music}"/>
>> >    <action application="set" data="call_timeout=30"/>
>> >    <action application="set" data="hangup_after_bridge=true"/>
>> >    <action application="set" data="continue_on_fail=true"/>
>> >    <action application="hash"
>> data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
>> >    <action application="hash"
>> data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
>> >    <action application="set"
>> data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name}
>> var callgroup)}"/>
>> >    <action application="hash"
>> data="insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
>> >    <action application="hash"
>> data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
>> >    <action application="hash"
>> data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
>> >    <action application="bridge" data="user/${dialed_extension}@
>> ${domain_name}"/>
>> >    <action application="answer"/>
>> >    <action application="sleep" data="1000"/>
>> >    <action application="bridge" data="loopback/app=voicemail:default
>> ${domain_name} ${dialed_extension}"/>
>> >  </condition>
>> ></extension>
>> >
>> >I am still trying to figure out exactly what everything in there does
>> >but it seems to do the job.  Calls originating outside get delivered to
>> >the correct client's phone.  Calls between clients go out to the
>> >provider and then come back in as if it was external.
>> >
>> >I worked around this by symlinking this file to the dialplan/default
>> >directory.  This works but I wonder if this is the best way to
>> >accomplish this.
>> >
>> >Side question, can I create a simple alias for all of my DIDs and make
>> >one condition that tests that alias somehow?
>> >
>> >Cheers.
>> >
>> >--
>> >D'Arcy J.M. Cain
>> >System Administrator, Vex.Net
>> >http://www.Vex.Net/ IM:darcy at Vex.Net
>> >
>> >_________________________________________________________________________
>> >Professional FreeSWITCH Consulting Services:
>> >consulting at freeswitch.org
>> >http://www.freeswitchsolutions.com
>> >
>> >
>> >
>> >
>> >Official FreeSWITCH Sites
>> >http://www.freeswitch.org
>> >http://wiki.freeswitch.org
>> >http://www.cluecon.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://wiki.freeswitch.org
>> http://www.cluecon.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://wiki.freeswitch.org
> http://www.cluecon.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/20120924/30b5eeb6/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list