[Freeswitch-users] domain

Boris Kovalenko boris at tagnet.ru
Sat Jun 4 10:51:19 MSD 2011


Hello!

     No, You can't use it this way. There are 2 possibilites:
1. You have one context (dialplan) and use something like

<extension name="ext_01">
<condition field="${domain_name}" expression="^xyz.com$"/>
<condition filed="destination_number" expression="^(1001)$">
<action application="voicemail" data="default $${domain name} 
${sip_to_host}"/>
</condition>
</extension>

2. I prefer the way to have separate contexts (dialplans) for each 
domain. So in the main context You do something like:
<action application="tranfser" data="${destination_number} XML 
context_${domain_name}"/>
And after that You know that is context_${domain_name} (context_xyz.com 
as in your example) You have o
> Hello,
>
> After doing this ,
>
> <action application="set" data="domain 
> name=${regex(${sip_from_uri}|^.*@(.*)$|%1)}" inline="true"/>
>
> i get domain name = xyz.com <http://xyz.com>
>
> Now how can i use the fundas of identified domain and using below to 
> execute .
>
> <domain name="xyz.com <http://xyz.com>">
> <condition field="destination_number" expression="^(1001)$">
> <action application="voicemail" data="default $${domain name} 
> ${sip_to_host}"/>
> </domain>
>
>
>
> Is that possible.
>
>
> Regards
> Sam
>
>
> On Fri, Jun 3, 2011 at 2:46 PM, Boris Kovalenko <boris at tagnet.ru 
> <mailto:boris at tagnet.ru>> wrote:
>
>     Hello!
>
>         There is a variable named ${sip_from_user}. You may do
>     something like
>
>     <action application="set"
>     data="from_domain=${regex(${sip_from_user}|^.*@(.*)$|%1)}"
>     <mailto:from_domain=$%7Bregex%28$%7Bsip_from_user%7D%7C%5E.*@%28.*%29$%7C%251%29%7D>
>     inline="true"/>
>     <action application="transfer" data="${from_domain} XML
>     domain_context"/>
>
>
>>     The call would be coming from outside to FS and not within , so
>>     the call would be routed from public to different domains ,
>>
>>     and after that following the doc
>>     http://wiki.freeswitch.org/wiki/Multi-tenant
>>
>>     Here how can we recognized from the header on which domain is it
>>     ?  like if we get an from header as 1001 at xyz.com
>>     <mailto:1001 at xyz.com>
>>     how can we recognized the domain and route the call accordingly
>>     ... when an outside system sends a call via acl .
>>
>>     regards
>>     Sam
>>
>>     On Fri, Jun 3, 2011 at 1:51 PM, Boris Kovalenko <boris at tagnet.ru
>>     <mailto:boris at tagnet.ru>> wrote:
>>
>>         Hello!
>>
>>             What do You mean? You may (for example) set the domain
>>         variable for a user and test it inside condition.
>>
>>>         Hello,
>>>
>>>         I have a user registered by domain (1001 at xyz.com
>>>         <mailto:1001 at xyz.com>) and when the invite comes to my FS
>>>         server it should recognize the domain and route
>>>         the calls accordingly to the group <domain name="xyz.com
>>>         <http://xyz.com>">  ... </domain> .
>>>         The call would be entering via the acl to public.xml. Here i
>>>         want to route the call according to domain names, how will i
>>>         do that.
>>>
>>>         Any suggestions...
>>>
>>>
>>>         Regards
>>>         Sam
>>>
>>>
>>>
>>>         _______________________________________________
>>>         FreeSWITCH-users mailing list
>>>         FreeSWITCH-users at lists.freeswitch.org  <mailto: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
>>
>>
>>         -- 
>>         Regards,
>>         Boris
>>
>>
>>
>>         _______________________________________________
>>         FreeSWITCH-users mailing list
>>         FreeSWITCH-users at lists.freeswitch.org
>>         <mailto: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
>>
>>
>>
>>     _______________________________________________
>>     FreeSWITCH-users mailing list
>>     FreeSWITCH-users at lists.freeswitch.org  <mailto: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
>
>
>     -- 
>     Regards,
>     Boris
>
>
>
>     _______________________________________________
>     FreeSWITCH-users mailing list
>     FreeSWITCH-users at lists.freeswitch.org
>     <mailto: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
>
>
>
> _______________________________________________
> 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


-- 
Regards,
Boris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110604/4b9146a0/attachment-0001.html 


More information about the FreeSWITCH-users mailing list