[Freeswitch-users] is this possible to "return" from the transfer?

Tihomir Culjaga tculjaga at gmail.com
Wed Nov 10 01:42:10 PST 2010


On Wed, Nov 10, 2010 at 7:21 AM, Boris Kovalenko <boris at tagnet.ru> wrote:

> Hello!
>
>     No, Seven. I want tranfer the call to another context. If the call
> may be served by this context it must be served, else transfer should
> return to the same place and I'll tranfer the call to another context.
> E.g.:
>
> <action application="tranfer" data="../context1"/> (if call may be
> served by context it must be served and stop processing, else return
> from context and do next tranfer)
> <action application="tranfer" data="../context2"/> and so on
>
>

all you need is to do is use execute_extension




<?xml version="1.0" encoding="utf-8"?>
<!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
<include>
  <context name="default">

    <extension name="context_lookup">
      <!-- you can yout put an empty condition here if you like -->
      <condition field="destination_number" expression="^.*$"/>
        <action application="execute_extension" data="service_lookup XML
context1"/>
        <action application="execute_extension" data="service_lookup XML
context2"/>
        <action application="execute_extension" data="service_lookup XML
context3"/>
        <!-- do whatever you want here -->
      </condition>
    </extension>

    </extension>
      <!-- do whatever you want here -->
    <extension>

  </context>


  <context name="context1">

    <extension name="service_lookup" continue="true">
      <condition>
        <action application="log" data="INFO ######################## trying
context1 ########################\n"/>
      </condition>
    </extension>

    <extension>
      <!-- do whatever you want here -->
    </extension>

  </context>



  <context name="context2">

    <extension name="service_lookup" continue="true">
      <condition>
        <action application="log" data="INFO ######################## trying
context2 ########################\n"/>
      </condition>
    </extension>

    <extension>
      <!-- do whatever you want here -->
    </extension>

  </context>



  <context name="default">

    <extension name="service_lookup" continue="true">
      <condition>
        <action application="log" data="INFO ######################## trying
context3 ########################\n"/>
      </condition>
    </extension>

    <extension>
      <!-- do whatever you want here -->
    </extension>

  </context>

</include>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101110/962bb16e/attachment.html 


More information about the FreeSWITCH-users mailing list