[Freeswitch-users] Freeswitch Multi-Tenant Dialplan
Christian Tari
ctpi.list at gmail.com
Wed Jun 26 13:26:42 MSD 2013
Hey,
1. You should have authentication on the profile to use "user_context"
parameter in the directory.
2. I'd change the dial string in the bridge application to
"user/6001 at mydomain.com".
In this thread
<http://osdir.com/ml/telephony.freeswitch.user/2008-07/msg00679.html>
Brian explains the reason for #1.
Wiki page
<http://wiki.freeswitch.org/wiki/FreeSwitch_Dialplan_XML#SIP-Specific_Dialstrings>
describes sip-specific dialstrings.
Regards,
Christian
On 2013-06-25 16:37, Peter Blackford wrote:
> sorry that last command should be:
> freeswitch at internal> sofia status profile mydomain.com
> <http://mydomain.com> reg
>
> It should return both extensions with the status registered
>
>
> On 26 June 2013 00:35, Peter Blackford <peter at onemetric.com
> <mailto:peter at onemetric.com>> wrote:
>
> Have you set the force-register-domain and
> force-register-db-domain variables in the sip
> profile (http://wiki.freeswitch.org/wiki/Multi-tenant#SIP_Profiles)
>
> Another thing to check is to make sure they are registered with
> freeswitch:
> freeswitch at internal> sofia status profile mydomain.com.xml reg
>
>
> On 25 June 2013 22:25, Zoltán Szabó <zzoell at gmail.com
> <mailto:zzoell at gmail.com>> wrote:
>
> Hi,
>
> I'm trying to set up a multi tenant config with FS. At the
> moment i configured only one domain, lets say it is
> mydomain.com <http://mydomain.com>
>
> This is my mydomain.com.xml in dialplan directory:
>
> <?xml version="1.0" encoding="utf-8"?>
> <include>
> <context name="mydomain.com <http://mydomain.com>">
> <extension name="Internal Call">
> <condition field="destination_number" expression="^(\d\d\d\d)$">
> <action application="bridge" data="sofia/mydomain.com/$1 <http://mydomain.com/$1>"/>
> </condition>
> </extension>
> </context>
> </include>
>
> Here is my mydomain.com.xml in the directory directory:
>
> <include>
> <domain name="mydomain.com <http://mydomain.com>">
> <params>
> <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
> </params>
> <variables>
> <variable name="record_stereo" value="true"/>
> <variable name="default_gateway" value="$${default_provider}"/>
> <variable name="default_areacode" value="$${default_areacode}"/>
> <variable name="transfer_fallback_extension" value="operator"/>
> <variable name="user_context" value="mydomain.com <http://mydomain.com>"/>
> </variables>
> <groups>
> <group name="mydomain.com <http://mydomain.com>">
> <users>
> <X-PRE-PROCESS cmd="include" data="mydomain.com/*.xml <http://mydomain.com/*.xml>"/>
> </users>
> </group>
> </groups>
> </domain>
> </include>
>
> The directory/mydomain.com <http://mydomain.com> contains two
> users (i dont configured user_context here because its
> configured in the previous config already):
>
> 6000.xml:
>
> <include>
> <user id="6000">
> <params>
> <param name="password" value="12345"/>
> <param name="vm-password" value="12345"/>
> </params>
> <variables>
> <variable name="toll_allow" value="domestic,international,local"/>
> <variable name="accountcode" value="6000"/>
> <!--<variable name="user_context" value="default"/>-->
> <variable name="effective_caller_id_name" value="Mr. Teszt Elek"/>
> <variable name="effective_caller_id_number" value="6000"/>
> <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
> <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
> <variable name="callgroup" value="techsupport"/>
> </variables>
> </user>
> </include>
>
> 6001.xml:
>
> <include>
> <user id="6001">
> <params>
> <param name="password" value="12345"/>
> <param name="vm-password" value="12345"/>
> </params>
> <variables>
> <variable name="toll_allow" value="domestic,international,local"/>
> <variable name="accountcode" value="6001"/>
> <!--<variable name="user_context" value="default"/>-->
> <variable name="effective_caller_id_name" value="Mekk Elek"/>
> <variable name="effective_caller_id_number" value="6001"/>
> <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
> <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
> <variable name="callgroup" value="techsupport"/>
> </variables>
> </user>
> </include>
>
> I can login with softphones to 6000 and 6001. Now im trying to
> call from 6000 to 6001 and it seems not working for some
> reason. First of all every time i call it tries to get
> dialplan from the public context. I changed the context
> parameter in the interlan sip profile so it is now looking for
> the dialplan in my mydomain.com <http://mydomain.com> contexts
>
> 2013-06-25 01:59:32.470028 [NOTICE] switch_channel.c:968 New Channel sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060> [ffc81a48-2c77-4797-8f96-fcf291fc6da3]
> 2013-06-25 01:59:32.650035 [INFO] mod_dialplan_xml.c:557 Processing 6000 <6000>->6001 in contextmydomain.com <http://mydomain.com>
> 2013-06-25 01:59:32.650035 [WARNING] mod_sofia.c:4839 Cannot locate registered user6001 at mydomain.com <mailto:6001 at mydomain.com>
> 2013-06-25 01:59:32.650035 [NOTICE] mod_sofia.c:5079 Close Channel N/A [CS_NEW]
> 2013-06-25 01:59:32.650035 [NOTICE] switch_ivr_originate.c:2608 Cannot create outgoing channel of type [sofia] cause: [USER_NOT_REGISTERED]
> 2013-06-25 01:59:32.650035 [INFO] mod_dptools.c:3055 Originate Failed. Cause: USER_NOT_REGISTERED
> 2013-06-25 01:59:32.650035 [NOTICE] mod_dptools.c:3175 Hangup sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060> [CS_EXECUTE] [USER_NOT_REGISTERED]
> 2013-06-25 01:59:32.650035 [NOTICE] switch_core_session.c:1506 Session 4 (sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060>) Ended
> 2013-06-25 01:59:32.650035 [NOTICE] switch_core_session.c:1510 Close Channel sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060> [CS_DESTROY]
>
> By the way my default port is not 5060 as it is written in the
> log, its a totally different number.
>
> I tried with this bridge too:
>
> <action application="bridge" data="sofia/internal/$1 at mydomain.com <mailto:1 at mydomain.com>"/>
>
> The error now with this:
>
> 2013-06-25 02:04:06.910054 [NOTICE] switch_channel.c:968 New Channel sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060> [954bab64-1a79-4cd1-bab1-51d0f87410f2]
> 2013-06-25 02:04:07.090036 [INFO] mod_dialplan_xml.c:557 Processing 6000 <6000>->6001 in contextmydomain.com <http://mydomain.com>
> 2013-06-25 02:04:07.090036 [NOTICE] switch_channel.c:968 New Channel sofia/internal/6001 at mydomain.com <mailto:6001 at mydomain.com> [3f59b312-7b62-4757-87c4-ce737ea405b8]
> 2013-06-25 02:04:07.090036 [NOTICE] sofia.c:6383 Hangup sofia/internal/6001 at mydomain.com <mailto:6001 at mydomain.com> [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
> 2013-06-25 02:04:07.113421 [INFO] mod_dptools.c:3055 Originate Failed. Cause: NORMAL_TEMPORARY_FAILURE
> 2013-06-25 02:04:07.113421 [NOTICE] mod_dptools.c:3175 Hangup sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060> [CS_EXECUTE] [NORMAL_TEMPORARY_FAILURE]
> 2013-06-25 02:04:07.160607 [NOTICE] switch_core_session.c:1506 Session 9 (sofia/internal/6001 at mydomain.com <mailto:6001 at mydomain.com>) Ended
> 2013-06-25 02:04:07.160607 [NOTICE] switch_core_session.c:1510 Close Channel sofia/internal/6001 at mydomain.com <mailto:6001 at mydomain.com> [CS_DESTROY]
> 2013-06-25 02:04:07.223801 [NOTICE] switch_core_session.c:1506 Session 8 (sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060>) Ended
> 2013-06-25 02:04:07.223801 [NOTICE] switch_core_session.c:1510 Close Channel sofia/internal/6000 at mydomain.com:5060 <http://6000@mydomain.com:5060> [CS_DESTROY]
>
> Have two questions. Why is this error happening? From my
> asterisk experiences maybe i have to create a context where my
> extensions can receive the calls? Other question is how can i
> tell the mydomain.com <http://mydomain.com> domain to use the
> mydomain.com.xml dialplan not the public?
>
> Thanks,
> Zoltan
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto: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
> <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
>
>
>
>
>
>
> _________________________________________________________________________
> 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/20130626/c605cf44/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list