We need to review this and document it, its unclear.

On Wed, Nov 25, 2015 at 5:07 PM, Brian West <brian@freeswitch.org> wrote:
And for those wondering:

<extension name="call to 1234">

  <condition field="destination_number" expression="^(1234)$">

    <action application="set" data="orig_dest=$1"/>

    <action application="set" data="bypass_media=true"/>

    <action application="set" data="hangup_afer_bridge=true"/>

    <action application="set" data="transfer_on_fail=PROGRESS_TIMEOUT,USER_BUSY,NORMAL_TEMPORARY_FAILURE"/>

    <action application="bridge" data="{progress_timeout=2}sofia/external/sip:1234@192.168.1.123"/>

  </condition>

</extension>


<extension name="call to 1234">

  <condition field="destination_number" expression="^PROGRESS_TIMEOUT$">

    <action application="log" data="CRIT We can have progress timeouts?"/>

  </condition>

</extension>



See XML on https://freeswitch.org/jira/browse/FS-3193


I fear this isn't documented correctly.


On Wed, Nov 25, 2015 at 4:53 PM, Brian West <brian@freeswitch.org> wrote:
There is no such thing as hangup_on_bridge, and if you wish to try a different gateway if the first one doesn't respond quick enough with progress do this:

<extension name="call to 1234">

  <condition field="destination_number" expression="^1234$">

    <action application="set" data="bypass_media=true"/>

    <action application="set" data="hangup_after_bridge=true"/>

    <action application="bridge" data="{progress_timeout=2}sofia/internal/sip:1234@switch2-asdfa.com"/>

    <action application="bridge" data="{progress_timeout=10}sofia/internal/sip:1234@switch1-asdfa.com"/>

  </condition>

</extension>


There is no reason to do what you were doing in this case.


On Wed, Nov 25, 2015 at 12:42 PM, Gabriel Kuri <gkuri@ieee.org> wrote:
I can't seem to get transfer_on_fail to work. I'm not sure what I'm doing wrong, it just doesn't transfer to the transfer_on_fail extension. The dialplan is below.

The idea is to set leg_progress_timeout = 3, so that if the device isn't responding to INVITEs, we use transfer_on_fail with the cause PROGRESS_TIMEOUT to send the call somewhere else. But transfer_on_fail never seems to get executed when we test it out. The FS logs show that we're hitting PROGRESS_TIMEOUT when the device doesn't respond to INVITEs, so I'm pretty sure we have the right hangup cause, but it's just not catching transfer_on_fail ...

<document type="freeswitch/xml">
  <section name="dialplan" description="Dial Plan for FreeSWITCH">
    <context name="default">
      <extension name="call to 12225551212">
        <condition field="destination_number" expression="12225551212">
          <action application="set" data="bypass_media=true"/>
          <action application="set" data="continue_on_fail=true"/>
          <action application="set" data="hangup_on_bridge=true"/>
      <action application="export" data="leg_progress_timeout=3"/>
          <action application="set" data="transfer_on_fail=PROGRESS_TIMEOUT NETWORK_UNAVAIL xml error"/>
          <action application="bridge" data="${sofia_contact(12225551212@switch.local)"/>
        </condition>
      </extension>
    </context>
    <context name="error">
      <extension name="NETWORK_UNAVAIL">
        <condition field="${originate_disposition}" expression="PROGRESS_TIMEOUT" continue="false" break="on-true">
          <action application="bridge" data="sofia/external/12345551212@switch2.local"/>
        </condition>
      </extension>
    </context>
  </section>
</document>

Here's a small snippet of the logs when leg_progress_timeout expires ...

b54a79cd-85f1-4c15-929d-15b1654ff1de 2015-11-24 22:06:21.021538 [DEBUG] switch_ivr_originate.c:3727 Originate Resulted in Error Cause: 607 [PROGRESS_TIMEOUT]
b54a79cd-85f1-4c15-929d-15b1654ff1de 2015-11-24 22:06:21.021538 [INFO] mod_dptools.c:3333 Originate Failed.  Cause: PROGRESS_TIMEOUT


Thanks ...



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest




--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest




--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest