<div dir="ltr"><p>Hi,</p><p>I&#39;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="">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;include&gt;
  &lt;context name=&quot;<a href="http://mydomain.com">mydomain.com</a>&quot;&gt;
    &lt;extension name=&quot;Internal Call&quot;&gt;
                &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d\d\d\d)$&quot;&gt;
                        &lt;action application=&quot;bridge&quot; data=&quot;sofia/<a href="http://mydomain.com/$1">mydomain.com/$1</a>&quot;/&gt;
                &lt;/condition&gt;
    &lt;/extension&gt;
  &lt;/context&gt;
&lt;/include&gt;
</pre>
<p>Here is my mydomain.com.xml in the directory directory:<br></p>
<pre class="">&lt;include&gt;
  &lt;domain name=&quot;<a href="http://mydomain.com">mydomain.com</a>&quot;&gt;
    &lt;params&gt;
      &lt;param name=&quot;dial-string&quot; value=&quot;{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}&quot;/&gt;
    &lt;/params&gt;
    &lt;variables&gt;
      &lt;variable name=&quot;record_stereo&quot; value=&quot;true&quot;/&gt;
      &lt;variable name=&quot;default_gateway&quot; value=&quot;$${default_provider}&quot;/&gt;
      &lt;variable name=&quot;default_areacode&quot; value=&quot;$${default_areacode}&quot;/&gt;
      &lt;variable name=&quot;transfer_fallback_extension&quot; value=&quot;operator&quot;/&gt;
      &lt;variable name=&quot;user_context&quot; value=&quot;<a href="http://mydomain.com">mydomain.com</a>&quot;/&gt;
    &lt;/variables&gt;
    &lt;groups&gt;
      &lt;group name=&quot;<a href="http://mydomain.com">mydomain.com</a>&quot;&gt;
        &lt;users&gt;
          &lt;X-PRE-PROCESS cmd=&quot;include&quot; data=&quot;<a href="http://mydomain.com/*.xml">mydomain.com/*.xml</a>&quot;/&gt;
        &lt;/users&gt;
      &lt;/group&gt;
    &lt;/groups&gt;
  &lt;/domain&gt;
&lt;/include&gt;
</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="">&lt;include&gt;
  &lt;user id=&quot;6000&quot;&gt;
    &lt;params&gt;
      &lt;param name=&quot;password&quot; value=&quot;12345&quot;/&gt;
      &lt;param name=&quot;vm-password&quot; value=&quot;12345&quot;/&gt;
    &lt;/params&gt;
    &lt;variables&gt;
      &lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;
      &lt;variable name=&quot;accountcode&quot; value=&quot;6000&quot;/&gt;
      &lt;!--&lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;--&gt;
      &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;Mr. Teszt Elek&quot;/&gt;
      &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;6000&quot;/&gt;
      &lt;variable name=&quot;outbound_caller_id_name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;
      &lt;variable name=&quot;outbound_caller_id_number&quot; value=&quot;$${outbound_caller_id}&quot;/&gt;
      &lt;variable name=&quot;callgroup&quot; value=&quot;techsupport&quot;/&gt;
    &lt;/variables&gt;
  &lt;/user&gt;
&lt;/include&gt;
</pre>
<p>6001.xml:</p>
<pre class="">&lt;include&gt;
  &lt;user id=&quot;6001&quot;&gt;
    &lt;params&gt;
      &lt;param name=&quot;password&quot; value=&quot;12345&quot;/&gt;
      &lt;param name=&quot;vm-password&quot; value=&quot;12345&quot;/&gt;
    &lt;/params&gt;
    &lt;variables&gt;
      &lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;
      &lt;variable name=&quot;accountcode&quot; value=&quot;6001&quot;/&gt;
      &lt;!--&lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;--&gt;
      &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;Mekk Elek&quot;/&gt;
      &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;6001&quot;/&gt;
      &lt;variable name=&quot;outbound_caller_id_name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;
      &lt;variable name=&quot;outbound_caller_id_number&quot; value=&quot;$${outbound_caller_id}&quot;/&gt;
      &lt;variable name=&quot;callgroup&quot; value=&quot;techsupport&quot;/&gt;
    &lt;/variables&gt;
  &lt;/user&gt;
&lt;/include&gt;
</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 &lt;6000&gt;-&gt;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="">&lt;action application=&quot;bridge&quot; data=&quot;sofia/internal/$<a href="mailto:1@mydomain.com">1@mydomain.com</a>&quot;/&gt;
</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 &lt;6000&gt;-&gt;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>