<div dir="ltr"><p>Hi,</p><p>I'm trying to set up a multi tenant config with FS. At the moment i configured only one domain, lets say it is <a href="http://mydomain.com">mydomain.com</a><br></p>
<p>This is my mydomain.com.xml in dialplan directory:<br></p>
<pre class=""><?xml version="1.0" encoding="utf-8"?>
<include>
<context name="<a href="http://mydomain.com">mydomain.com</a>">
<extension name="Internal Call">
                <condition field="destination_number" expression="^(\d\d\d\d)$">
                        <action application="bridge" data="sofia/<a href="http://mydomain.com/$1">mydomain.com/$1</a>"/>
                </condition>
</extension>
</context>
</include>
</pre>
<p>Here is my mydomain.com.xml in the directory directory:<br></p>
<pre class=""><include>
<domain name="<a href="http://mydomain.com">mydomain.com</a>">
<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="<a href="http://mydomain.com">mydomain.com</a>"/>
</variables>
<groups>
<group name="<a href="http://mydomain.com">mydomain.com</a>">
<users>
<X-PRE-PROCESS cmd="include" data="<a href="http://mydomain.com/*.xml">mydomain.com/*.xml</a>"/>
</users>
</group>
</groups>
</domain>
</include>
</pre>
<p>The directory/<a href="http://mydomain.com">mydomain.com</a> contains two users (i dont configured user_context here because its configured in the previous config already):<br></p>
<p>6000.xml:</p>
<pre class=""><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>
</pre>
<p>6001.xml:</p>
<pre class=""><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>
</pre>
<p>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 <a href="http://mydomain.com">mydomain.com</a> contexts<br>
</p>
<pre class="">2013-06-25 01:59:32.470028 [NOTICE] switch_channel.c:968 New Channel sofia/internal/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a> [ffc81a48-2c77-4797-8f96-fcf291fc6da3]
2013-06-25 01:59:32.650035 [INFO] mod_dialplan_xml.c:557 Processing 6000 <6000>->6001 in context <a href="http://mydomain.com">mydomain.com</a>
2013-06-25 01:59:32.650035 [WARNING] mod_sofia.c:4839 Cannot locate registered user <a href="mailto:6001@mydomain.com">6001@mydomain.com</a>
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/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a> [CS_EXECUTE] [USER_NOT_REGISTERED]
2013-06-25 01:59:32.650035 [NOTICE] switch_core_session.c:1506 Session 4 (sofia/internal/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a>) Ended
2013-06-25 01:59:32.650035 [NOTICE] switch_core_session.c:1510 Close Channel sofia/internal/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a> [CS_DESTROY]
</pre>
<p>By the way my default port is not 5060 as it is written in the log, its a totally different number.</p>
<p>I tried with this bridge too:<br></p>
<pre class=""><action application="bridge" data="sofia/internal/$<a href="mailto:1@mydomain.com">1@mydomain.com</a>"/>
</pre>
<p>The error now with this:<br></p>
<pre class="">2013-06-25 02:04:06.910054 [NOTICE] switch_channel.c:968 New Channel sofia/internal/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a> [954bab64-1a79-4cd1-bab1-51d0f87410f2]
2013-06-25 02:04:07.090036 [INFO] mod_dialplan_xml.c:557 Processing 6000 <6000>->6001 in context <a href="http://mydomain.com">mydomain.com</a>
2013-06-25 02:04:07.090036 [NOTICE] switch_channel.c:968 New Channel sofia/internal/<a href="mailto:6001@mydomain.com">6001@mydomain.com</a> [3f59b312-7b62-4757-87c4-ce737ea405b8]
2013-06-25 02:04:07.090036 [NOTICE] sofia.c:6383 Hangup sofia/internal/<a href="mailto:6001@mydomain.com">6001@mydomain.com</a> [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/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a> [CS_EXECUTE] [NORMAL_TEMPORARY_FAILURE]
2013-06-25 02:04:07.160607 [NOTICE] switch_core_session.c:1506 Session 9 (sofia/internal/<a href="mailto:6001@mydomain.com">6001@mydomain.com</a>) Ended
2013-06-25 02:04:07.160607 [NOTICE] switch_core_session.c:1510 Close Channel sofia/internal/<a href="mailto:6001@mydomain.com">6001@mydomain.com</a> [CS_DESTROY]
2013-06-25 02:04:07.223801 [NOTICE] switch_core_session.c:1506 Session 8 (sofia/internal/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a>) Ended
2013-06-25 02:04:07.223801 [NOTICE] switch_core_session.c:1510 Close Channel sofia/internal/<a href="http://6000@mydomain.com:5060">6000@mydomain.com:5060</a> [CS_DESTROY]
</pre>
<p>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 <a href="http://mydomain.com">mydomain.com</a> domain to use the mydomain.com.xml dialplan not the public?<br>
</p><p>Thanks,<br>Zoltan<br></p></div>