<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I am now able to call a extension from
      a remote server, for those who are interested i used theses
      options on freeswitch2 public dialplan<br>
      <br>
      &lt;action application="set" data="call_direction=inbound"/&gt;<br>
      &lt;action application="set" data="domain_name=${sip_to_host}"
      &gt;<br>
      &lt;action application="set" data="domain=${sip_to_host}"/&gt;<br>
      &lt;action application="transfer" data="${sip_to_user} XML
      ${sip_to_host}" /&gt;<br>
      <br>
      <br>
      On 16/09/2015 19:39, Tanguy wrote:<br>
    </div>
    <blockquote cite="mid:55F9A936.5020700@vfemail.net" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hello Sergey<br>
        <br>
        Thanks for your reply but i am not sure to userstand what you
        mean. What is <a moz-do-not-send="true"
          href="mailto:reg_user@mydomain.org">reg_user@mydomain.org</a>
        ? I don't want to call a locally registered user.<br>
        <br>
        Alternatively i tried to mix my original idea and yours<br>
        <br>
        <tt>&lt;action application="bridge"
data="{sip_invite_to_uri=&lt;sip:${destination_number}@somedomain&gt;}sofia/internal/${<a
            moz-do-not-send="true" class="moz-txt-link-abbreviated"
            href="mailto:destination_number%7D@freeswitch2.company.com">destination_number}@freeswitch2.company.com</a>"
          /&gt;</tt><br>
        <br>
        I will probably able to parse the To header on freeswitch2
        dialplan.<br>
        <br>
        <font face="Courier New, Courier, monospace">INVITE <a
            moz-do-not-send="true" class="moz-txt-link-abbreviated"
            href="mailto:sip:5003@freeswitch2.company.com">sip:5003@freeswitch2.company.com</a>
          SIP/2.0
          <br>
          Via: SIP/2.0/UDP 94.125.x.x;rport;branch=z9hG4bK5F1Z6rc8jK96H
          <br>
          Max-Forwards: 69
          <br>
          From: "Tanguy bureau" <a moz-do-not-send="true"
            class="moz-txt-link-rfc2396E"
            href="mailto:sip:5002@94.125.x.x">&lt;sip:5002@94.125.x.x&gt;</a>;tag=D5978NDrZ39ae
          <br>
          To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
            href="mailto:sip:5003@somedomain.voip.company.com">&lt;sip:5003@somedomain.voip.company.com&gt;</a></font><br>
        <br>
        Regards<br>
        <br>
        <br>
        On 16/09/2015 04:36, Sergey Safarov wrote:<br>
      </div>
      <blockquote
cite="mid:CAHtxdDdivBapF+S2YHE5R7nvyuL=Ru1-JRJ6qHRRmXrU+FHEDA@mail.gmail.com"
        type="cite">
        <p dir="ltr">Try dial as&nbsp;</p>
        <p dir="ltr">originate {sip_invite_to_uri=&lt;sip:${<a
            moz-do-not-send="true"
            href="mailto:destination_number%7D@mydomain.org">destination_number}@mydomain.org</a>&gt;}user/<a
            moz-do-not-send="true" href="mailto:reg_user@mydomain.org">reg_user@mydomain.org</a>&nbsp;&amp;

          park</p>
        <p dir="ltr">or&nbsp;</p>
        <p dir="ltr">&lt;action application="bridge"
          data="{sip_invite_to_uri=&lt;sip:${<a moz-do-not-send="true"
            href="mailto:destination_number%7D@mydomain.org">destination_number}@mydomain.org</a>&gt;}user/<a
            moz-do-not-send="true" href="mailto:reg_user@mydomain.org">reg_user@mydomain.org</a>"/&gt;<br>
        </p>
        <p dir="ltr">Also check sip_invite_req_uri variable. <br>
        </p>
        <br>
        <div class="gmail_quote">
          <div dir="ltr">On Tue, Sep 15, 2015, 23:50&nbsp;Tanguy &lt;<a
              moz-do-not-send="true" href="mailto:phenix@vfemail.net">phenix@vfemail.net</a>&gt;

            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
            <br>
            I have two multi-domains freeswitch servers 1 and 2 and i
            want to<br>
            interconnect them for internal calls<br>
            <br>
            I read <a moz-do-not-send="true"
              href="https://wiki.freeswitch.org/wiki/Connect_Two_FreeSWITCH_Boxes"
              rel="noreferrer" target="_blank">https://wiki.freeswitch.org/wiki/Connect_Two_FreeSWITCH_Boxes</a>
            but<br>
            it did not fully fit to my need because I want to call from
            freeswitch1<br>
            a specific extension of freeswitch2 on a specific domain (
            and not just<br>
            default ). In short i want to tell to freeswitch2: Connect
            me with<br>
            extension 1000@domain-name and not just connect me with
            extension 1000<br>
            <br>
            My guess is send custom sip headers from freeswitch1 and
            parse<br>
            X-domainname on freeswitch2 dialplan<br>
            <br>
            &lt;action application="set"
            data="sip_h_X-domainname=somedomain"/&gt;<br>
            &lt;action application="bridge"<br>
            data="sofia/internal/${<a moz-do-not-send="true"
              href="mailto:destination_number%7D@freeswitch2.company.com"
              target="_blank">destination_number}@freeswitch2.company.com</a>
            "/&gt;<br>
            <br>
            This will probably work, but is there a clean way to do it
            without using<br>
            non standard headers ?<br>
            <br>
            Best Regards<br>
            <br>
            <br>
            <br>
_________________________________________________________________________<br>
            Professional FreeSWITCH Consulting Services:<br>
            <a moz-do-not-send="true"
              href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://www.freeswitchsolutions.com" rel="noreferrer"
              target="_blank">http://www.freeswitchsolutions.com</a><br>
            <br>
            Official FreeSWITCH Sites<br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://confluence.freeswitch.org" rel="noreferrer"
              target="_blank">http://confluence.freeswitch.org</a><br>
            <a moz-do-not-send="true" href="http://www.cluecon.com"
              rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
            <br>
            FreeSWITCH-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:FreeSWITCH-users@lists.freeswitch.org"
              target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
              rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
            UNSUBSCRIBE:<a moz-do-not-send="true"
              href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
              rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a moz-do-not-send="true" href="http://www.freeswitch.org"
              rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
          </blockquote>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a></pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>