[Freeswitch-users] Multi-tenant dilplans

Miha miha at softnet.si
Tue Jun 5 10:34:57 MSD 2012


Hi @Sean,

thanks:)

Regards,
Miha

On 6/4/2012 5:39 PM, Sean Devoy wrote:
> HI Miha,
>
> I can almost never answer a questi9on here, but this one I have working
> perfectly.
>
> In the user directory where you define you extensions, you must set the
> "context" for that user's/extension's dialplan:
> <variable name="user_context" value="from-COMPANY_A"/>   pick your own value,
> but match it in the dialplan.
>
> In the dialplan, you start with that context, and group your dialplan
> directives under inside it.  In this example someone from a Company_A
> extension dials extension 200.  You cann see how the context allows Company
> A users to dial 200 and Company B users to dial extension 200 and get
> different users.
>
> <context name="from-COMPANY_A">
>       <extension name="200">
>          <condition field="destination_number" expression="^200$">
>                <action application="set" data="ringback=${us-ring}"/>
>                <action application="set"
> data="effective_caller_id_number=${internal_caller_id_number}"/>
>                <action application="set"
> data="effective_caller_id_name=${internal_caller_id_name}"/>
>                <action application="set" data="hangup_after_bridge=true"/>
>                <action application="set" data="call_timeout=20"/>
>               <action application="bridge"
> data="{sip_invite_domain=company_a.com}user/200 at company_a.com"  />
>               <action application="answer"/>
>               <action application="voicemail" data="default
> voicemail_COMPANY_A 200"/>
>               <action application="hangup"/>
>            </condition>
>        </extension>
> ...
> </context>
>
> Just FYI, here is my full directory entry for extension 200 (which also has
> a Shared Call Appearance that you may not want/need).  I have changed the
> domain names and password:
>      <user id="200">
>          <variables>
>            <variable name="outbound_caller_id_name" value="Our Company
> name"/>
>            <variable name="outbound_caller_id_number" value="Our External
> Number"/>
>            <variable name="internal_caller_id_name" value="Shirley"/>
>            <variable name="internal_caller_id_number" value="200"/>
>            <variable name="user_context" value="from-COMPANY_A"/>
>            <variable name="user_originated" value="true"/>
>            <variable name="toll_allow" value="domestic"/>
>            <variable name="accountcode" value="200"/>
>            <variable name="mwi-account" value="200 at voicemail_COMPANY_A"/>
>          </variables>
>          <params>
>            <param name="password"  value="SomePasswordHere"/>
>            <param name="manage-shared-appearance" value-="true" />"
>            <param name="dial-string"
> value="{presence_id=200 at company_a.com}${sofia_contact(200 at company_a.com)}"/>
>            <param name="mwi-account" value="200 at voicemail_company_a"/>
>          </params>
>        </user>
>
> I hope that helps.
>
> Sean
> -----Original Message-----
> From: Miha [mailto:miha at softnet.si]
> Sent: Monday, June 04, 2012 6:45 AM
> To: FreeSWITCH Users Help
> Subject: Re: [Freeswitch-users] Multi-tenant dilplans
>
> On 6/4/2012 9:39 AM, Miha wrote:
>> Hi,
>>
>> I set multi tenat for two domains which is forking well. Now I would
>> like to seperate dialplans so that domain A will use default dialplan
>> in directory dialplan/a and domain B will use default dialplan in
>> directory dialplan/b.
>>
>> I have tried few things but every time fs use default dialplan.
>>
>> Thanks for help!
>>
>> Regards,
>> Miha
>>
>> ______________________________________________________________________
>> ___ 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
>>
>> Join Us At ClueCon - Aug 7-9, 2012
>>
>> 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-use
>> rs
>> http://www.freeswitch.org
>>
> Hi,
>
> I was having set wrong<variable name="user_context" value="domain" />  .
>
> THanks!
>
> Miha
>
>
>
>
>
> _________________________________________________________________________
> 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
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> 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
>




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