title: How to solve NO_ROUTE_DESTINATION when connecting from two FreeSWITCH
body: <p>I am new to FreeSWITCH and I am trying to bridge a call from two different FreeSWITCH (SwitchA -&gt; SwitchB ).
  But when I am trying to make a call, It says <em>NO_ROUTE_DESTINATION</em> .</p>
  <p>Here is my current configuration for FreeSWITCH-A (the call originates)</p>
  <p><strong>My <strong>sip_profile/external</strong></strong></p>
  <pre><code>&lt;include&gt;
      &lt;gateway name=&quot;fs-test2&quot;&gt;
          &lt;param name=&quot;proxy&quot; value=&quot;ipOfSwitch-B:5080&quot;/&gt;
          &lt;param name=&quot;register&quot; value=&quot;false&quot;/&gt;
          &lt;param name=&quot;called-id-in-from&quot; value=&quot;true&quot;/&gt;
  
          &lt;variables&gt;
              &lt;variable name=&quot;verbose_sdb&quot; value=&quot;true&quot;/&gt;
              &lt;variable name=&quot;absolute_codec_string&quot; value=&quot;PCMU, PCMA&quot; direction=&quot;oubound&quot;/&gt;
          &lt;/variables&gt;
      &lt;/gateway&gt;
  &lt;/include&gt;
  </code></pre>
  <p><strong>My DialPlan</strong></p>
  <p><em>dialplan/default</em></p>
  <pre><code>&lt;include&gt;
  
      &lt;extension name=&quot;outbound_call&quot;&gt;
          &lt;condition field=&quot;destination_number&quot; expression=&quot;^(18881)$&quot;&gt;
              &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/fs-test2/$1&quot;/&gt;
          &lt;/condition&gt;
      &lt;/extension&gt;
  
  &lt;/include&gt;
  </code></pre>
  <p><em>dialplan/public</em></p>
  <pre><code>&lt;include&gt;
     &lt;extension name=&quot;public-did&quot;&gt;
          &lt;condition field=&quot;destination_number&quot; expression=&quot;^(19991)$&quot;&gt;
              &lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;
              &lt;action application=&quot;transfer&quot; data=&quot;1000 XML default&quot;/&gt;
              &lt;action application=&quot;answer&quot;/&gt;
              &lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;
          &lt;/condition&gt;
     &lt;/extension&gt;
  &lt;/include&gt;
  </code></pre>
  <p>And here is my current configuration for FreeSWITCH-B</p>
  <p><strong>My sip_profile/external</strong></p>
  <pre><code>&lt;include&gt;
     &lt;gateway name=&quot;fs-test1&quot;&gt;
          &lt;param name=&quot;proxy&quot; value=&quot;ipOfSwitch-A:5080&quot;/&gt;
          &lt;param name=&quot;register&quot; value=&quot;false&quot;/&gt;
          &lt;param name=&quot;caller-id-in-from&quot; value=&quot;true&quot;/&gt;
      &lt;/gateway&gt;
  &lt;/include&gt;
  </code></pre>
  <p><strong>My dialplan</strong></p>
  <p><em>dialplan/default</em></p>
  <pre><code>&lt;include&gt;
     &lt;extension name=&quot;outbound_call&quot;&gt;
          &lt;condition field=&quot;destination_number&quot; expression=&quot;^(18881)$&quot;&gt;
              &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/fs-test1/$1&quot;/&gt;
           &lt;/condition&gt;
      &lt;/extension&gt;
  &lt;/include&gt;
  </code></pre>
  <p><em>dialplan/public</em></p>
  <pre><code>&lt;include&gt;
      &lt;extension name=&quot;public-did&quot;&gt;
          &lt;condition field=&quot;destination_number&quot; expression=&quot;^(18881)$&quot;&gt;
              &lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;
              &lt;action application=&quot;transfer&quot; data=&quot;1000 XML default&quot;/&gt;
          &lt;/condition&gt;
      &lt;/extension&gt;
  &lt;/include&gt;
  </code></pre>
  <p><strong>This is my sofia status profile</strong> looks like in SWITCH A-</p>
  <pre><code>-----------------------------------------------------------------
  Profile::Gateway-Name|       Data                      | Status |
  -----------------------------------------------------------------
  external::fs-test2   | sip:FreeSWITCH@ipOfSwitchB:5080 | NOREG  | 
  -----------------------------------------------------------------
  </code></pre>
  <p><strong>This is my sofia status profile</strong> looks like in SWITCH B-</p>
  <pre><code>-----------------------------------------------------------------
  Profile::Gateway-Name|       Data                      | Status |
  -----------------------------------------------------------------
  external::fs-test1   | sip:FreeSWITCH@ipOfSwitchA:5080 | NOREG  | 
  -----------------------------------------------------------------
  </code></pre>
  <p>and when I type the command for <em><strong>sofia status gateway fs-test2</strong></em> in SWITCH A , the result looks like this:</p>
  <pre><code>Name       | fs-test2
  Profile    | external
  Scheme     | Digest
  Realm      | ipOfSwitchB:5080
  username   | FreeSWITCH
  Password   | no
  From       | &lt;sip:FreeSWITCH@ipOfSwitchB:5080&gt;
  Contact    | &lt;sip:gw+fs-test2@103.62.152.227:5080;transport=udp;gw=fs-test2&gt;
  Exten      | FreeSWITCH
  To         | sip:FreeSWITCH@ipOfSwitchB:5080
  Proxy      | sip:FreeSWITCH@ipOfSwitchB:5080
  Status     | UP
  State      | NOREG
  </code></pre>
  <p>After I've done all the changes , I run &quot;reloadxml&quot;, &quot;reload mod_sofia&quot;</p>
  <p>When I trigger a call(18881) from SWITCH A, there is a logs showing on SWITCH B, and it says  :</p>
  <pre><code>sofia.c:10362 sofia/external/FreeSWITCH@ipOfSWITCHB:5080 receiving invite from ipOfSWITCHB:5080 version: 1.10.6 -release-18-1ff9d0a60e 64bit call-id: fd37ba89-54d1-123a-db86-080027337ad5, 
  </code></pre>
  <p>and the moment the call ended from SWITCHA, the logs shows on SWITCHA as:</p>
  <pre><code>switch_core_state_machine.c:276 Dialplan [default] not found, skipping
  switch_core_state_machine.c:312 No Route, Aborting
   switch_core_state_machine.c:313 Hangup sofia/external/1000@ipOfSWITCHA [CS_ROUTING] [NO_ROUTE_DESTINATION]
  </code></pre>
  <p>there is also a log showing on SwitchB:</p>
  <pre><code>sofia.c:8641 Hangup sofia/external/18881 [CS_CONSUME_MEDIA] [NO_ROUTE_DESTINATION]
  mod_dptools.c:3643 Originate Failed.  Cause: NO_ROUTE_DESTINATION
  switch_channel.c:4942 Hangup sofia/external/FreeSWITCH@ipOfSwitchB:5080 [CS_EXECUTE] [NO_ROUTE_DESTINATION]
  </code></pre>
  <p>Am I missing something?
  Thanks in advance.</p>