Please have a look into here http://wiki.freeswitch.org/wiki/Multi-tenant Lloyd * <http://www.sunteltech.ca/blog/>* On Tue, Oct 8, 2013 at 10:51 AM, Grant Bagdasarian <GB@cm.nl> wrote:
Hello,****
** **
I’m trying to configure FreeSWITCH to have multiple contexts per sip profile like below.****
** **
But this does not seem to work.****
The reason I want this, is to have each incoming called number to have its own context in which extensions can be created. ****
The problem with using extensions and only one context is I can’t defined more than one extension with the same name. FS seems to overwrite or ignore ones that do.****
** **
Is this even possible? If so, what do I need to change? Is there perhaps a better way for doing this?****
** **
*sip_profile/inbound.xml:*
** **
<profile name="inbound">****
** **
<settings>****
** **
<param name="context" value="inbound"/>****
<param name="dialplan" value="XML"/>****
** **
</settings>****
</profile>****
** **
*dialplan/inbound.xml:*
** **
<?xml version="1.0" encoding="utf-8"?>****
<include>****
<context name="inbound">****
<X-PRE-PROCESS cmd="include" data="inbound/*.xml"/>****
** **
<extension name="route_to_context">****
<condition field="destination_number" expression="^(\d+)$">****
<action application="transfer" data="start XML $1"/>****
</condition>****
</extension>****
****
</context>****
</include>****
** **
*dialplan/inbound/1000.xml:*
** **
<include>****
** **
<context name="1000">****
** **
<extension name="start">****
<condition field="destination_number" expression="^(\d+)">****
<action application="answer"/>****
<action application="transfer" data="playback"/>****
</condition>****
</extension>****
** **
** **
<extension name="playback">****
<condition>****
<action application="playback" data="/usr/src/freeswitch/sounds/fs-hello-world-for-1000.wav"/>****
</condition>****
</extension>****
** **
</context>****
</include>****
** **
*dialplan/inbound/1001.xml:*
** **
<include>****
** **
<context name="1001">****
** **
<extension name="start">****
<condition field="destination_number" expression="^(\d+)">****
<action application="answer"/>****
<action application="transfer" data="playback"/>****
</condition>****
</extension>****
** **
** **
<extension name="playback">****
<condition>****
<action application="playback" data="/usr/src/freeswitch/sounds/fs-hello-world-for-1001.wav"/>****
</condition>****
</extension>****
** **
</context>****
</include>****
** **
** **
** **
** **
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.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