<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hello!<br>
    <br>
    Ough! Thanks, I'll try this way!<br>
    <br>
    <blockquote
      cite="mid:AANLkTi=0m23x9qGfBhFP3ikGibwLJBvg=g7gLL47EP6_@mail.gmail.com"
      type="cite"><br>
      <div class="gmail_quote">On Wed, Nov 10, 2010 at 7:21 AM, Boris
        Kovalenko <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:boris@tagnet.ru">boris@tagnet.ru</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          Hello!<br>
          <br>
          &nbsp; &nbsp; No, Seven. I want tranfer the call to another context. If
          the call<br>
          may be served by this context it must be served, else transfer
          should<br>
          return to the same place and I'll tranfer the call to another
          context. E.g.:<br>
          <br>
          &lt;action application="tranfer" data="../context1"/&gt; (if
          call may be<br>
          served by context it must be served and stop processing, else
          return<br>
          from context and do next tranfer)<br>
          &lt;action application="tranfer" data="../context2"/&gt; and
          so on<br>
          <div>
            <div class="h5"><br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      all you need is to do is use execute_extension<br>
      <br>
      <br>
      <br>
      <br>
      &lt;?xml version="1.0" encoding="utf-8"?&gt;<br>
      &lt;!-- <a moz-do-not-send="true"
        href="http://wiki.freeswitch.org/wiki/Dialplan_XML">http://wiki.freeswitch.org/wiki/Dialplan_XML</a>
      --&gt;<br>
      &lt;include&gt;<br>
      &nbsp; &lt;context name="default"&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension name="context_lookup"&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- you can yout put an empty condition here if you like
      --&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="destination_number"
      expression="^.*$"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="execute_extension"
      data="service_lookup XML context1"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="execute_extension"
      data="service_lookup XML context2"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="execute_extension"
      data="service_lookup XML context3"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- do whatever you want here --&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- do whatever you want here --&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;extension&gt;<br>
      <br>
      &nbsp; &lt;/context&gt;<br>
      <br>
      <br>
      &nbsp; &lt;context name="context1"&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension name="service_lookup" continue="true"&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="log" data="INFO
      ######################## trying context1
      ########################\n"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- do whatever you want here --&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp; &lt;/context&gt;<br>
      <br>
      <br>
      <br>
      &nbsp; &lt;context name="context2"&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension name="service_lookup" continue="true"&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="log" data="INFO
      ######################## trying context2
      ########################\n"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- do whatever you want here --&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp; &lt;/context&gt;<br>
      <br>
      <br>
      <br>
      &nbsp; &lt;context name="default"&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension name="service_lookup" continue="true"&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="log" data="INFO
      ######################## trying context3
      ########################\n"/&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &lt;extension&gt;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- do whatever you want here --&gt;<br>
      &nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>
      <br>
      &nbsp; &lt;/context&gt;<br>
      <br>
      &lt;/include&gt;<br>
      <br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a 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 class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
&#1057; &#1091;&#1074;&#1072;&#1078;&#1077;&#1085;&#1080;&#1077;&#1084;,
  &#1041;&#1086;&#1088;&#1080;&#1089; &#1050;&#1086;&#1074;&#1072;&#1083;&#1077;&#1085;&#1082;&#1086;
  &#1047;&#1040;&#1054; "&#1058;&#1072;&#1075;&#1085;&#1077;&#1090;"
  (3435) 494991

</pre>
  </body>
</html>