<p dir="ltr">1) I recommend not use &quot;domain&quot; and dereviated variables. This variables may be used in bridge and other application.<br>
2) try send invite as in example provided early. </p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 17, 2015, 23:22 Tanguy &lt;<a 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">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>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=&quot;set&quot; data=&quot;call_direction=inbound&quot;/&gt;<br>
      &lt;action application=&quot;set&quot; data=&quot;domain_name=${sip_to_host}&quot;
      &gt;<br>
      &lt;action application=&quot;set&quot; data=&quot;domain=${sip_to_host}&quot;/&gt;<br>
      &lt;action application=&quot;transfer&quot; data=&quot;${sip_to_user} XML
      ${sip_to_host}&quot; /&gt;</div></div><div bgcolor="#FFFFFF" text="#000000"><div><br>
      <br>
      <br>
      On 16/09/2015 19:39, Tanguy wrote:<br>
    </div></div><div bgcolor="#FFFFFF" text="#000000">
    <blockquote type="cite">
      
      <div>Hello Sergey<br>
        <br>
        Thanks for your reply but i am not sure to userstand what you
        mean. What is <a href="mailto:reg_user@mydomain.org" target="_blank">reg_user@mydomain.org</a>
        ? I don&#39;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=&quot;bridge&quot;
data=&quot;{sip_invite_to_uri=&lt;sip:${destination_number}@somedomain&gt;}sofia/internal/${<a href="mailto:destination_number%7D@freeswitch2.company.com" target="_blank">destination_number}@freeswitch2.company.com</a>&quot;
          /&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 href="mailto:sip:5003@freeswitch2.company.com" target="_blank">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: &quot;Tanguy bureau&quot; <a href="mailto:sip:5002@94.125.x.x" target="_blank">&lt;sip:5002@94.125.x.x&gt;</a>;tag=D5978NDrZ39ae
          <br>
          To: <a href="mailto:sip:5003@somedomain.voip.company.com" target="_blank">&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 type="cite">
        <p dir="ltr">Try dial as </p>
        <p dir="ltr">originate {sip_invite_to_uri=&lt;sip:${<a href="mailto:destination_number%7D@mydomain.org" target="_blank">destination_number}@mydomain.org</a>&gt;}user/<a href="mailto:reg_user@mydomain.org" target="_blank">reg_user@mydomain.org</a> &amp;

          park</p>
        <p dir="ltr">or </p>
        <p dir="ltr">&lt;action application=&quot;bridge&quot;
          data=&quot;{sip_invite_to_uri=&lt;sip:${<a href="mailto:destination_number%7D@mydomain.org" target="_blank">destination_number}@mydomain.org</a>&gt;}user/<a href="mailto:reg_user@mydomain.org" target="_blank">reg_user@mydomain.org</a>&quot;/&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 Tanguy &lt;<a href="mailto:phenix@vfemail.net" target="_blank">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 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=&quot;set&quot;
            data=&quot;sip_h_X-domainname=somedomain&quot;/&gt;<br>
            &lt;action application=&quot;bridge&quot;<br>
            data=&quot;sofia/internal/${<a href="mailto:destination_number%7D@freeswitch2.company.com" target="_blank">destination_number}@freeswitch2.company.com</a>
            &quot;/&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 href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
            <a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
            <br>
            Official FreeSWITCH Sites<br>
            <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
            <a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
            <a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
            <br>
            FreeSWITCH-users mailing list<br>
            <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
            <a 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 href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
            <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
          </blockquote>
        </div>
        <br>
        <fieldset></fieldset>
        <br>
        <pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </div>

_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a 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 href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div>