[Freeswitch-users] piped failover doesn't work in dialplan, but works from console
Brian West
brian at freeswitch.org
Thu Feb 19 23:00:52 MSK 2015
originate
{fail_on_single_reject='CALL_REJECTED\,NO_ANSWER'}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED
999
Where are you getting the idea you can use a colon to separate the causes?
/* When using the AND operator, the fail_on_single_reject flag may be
set in order to indicate that a single
rejections should terminate the attempt rather than a timeout,
answer, or rejection by all.
If the value is set to 'true' any fail cause will end the attempt
otherwise it can contain a comma (,) separated
list of cause names which should be considered fatal
*/
On Thu, Feb 19, 2015 at 10:38 AM, Mi Ke <mi.ke at null.net> wrote:
> Dear All,
>
> I'm experimenting with the piped failover on the latest master. I want a
> failover to stop gw hunting and return from bridge when B-leg receives a
> specific disconnect code e.g. USER_BUSY or NO_ANSWER, but while it works as
> expected with error channels in console i.e.:
>
> freeswitch at internal> originate
> {fail_on_single_reject=CALL_REJECTED:USER_BUSY}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED
> 999
> -ERR USER_BUSY
>
> freeswitch at internal> originate
> {fail_on_single_reject=CALL_REJECTED:NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED
> 999
> -ERR NO_ANSWER
>
> it does not work in dialplan:
>
> <extension name="outbound">
> <condition field="destination_number" expression="^\d{7}$">
> <action application="set"
> data="bridge_answer_timeout=120"/>
> <action application="set"
> data="continue_on_fail=NORMAL_TEMPORARY_FAILURE:NO_ROUTE_DESTINATION:CALL_REJECTED"/>
> <action application="set"
> data="fail_on_single_reject=USER_BUSY:NO_ANSWER:NO_USER_RESPONSE:RECOVERY_ON_TIMER_EXPIRE:ORIGINATOR_CANCEL"/>
> <action application="set" data="bridge_early_media=true"/>
> <action application="set" data="hangup_after_bridge=true"/>
> <action application="odbc_query" inline="true"
> data="route_out"/>
> <action application="bridge" data="${bridge_to}"/>
> <action application="hangup"
> data="${last_bridge_hangup_cause}"/>
> <anti-action application="hangup"
> data="INVALID_NUMBER_FORMAT"/>
> </condition>
> </extension>
>
> or when included in bridge dialstring:
>
> <action application="bridge"
> data="{fail_on_single_reject=USER_BUSY:NO_ANSWER}${bridge_to}"/>
>
> i.e. it tries *all* gateways in the dialstring and ignores returning codes
> completely.
>
> I tried the same test when remote gateways were just hanging up with
> USER_BUSY code on receiving calls, but it did not affect the same negative
> result - all remote peers were tried in order and return code were ignored.
>
> I had the same experience with ver 1.2, but that time set
> continue_on_single_reject=err1,err2,err3 in dialplan worked for me
> flawlessly. However the same approach does not work for 1.5 and 1.4. Has
> anyone succeded in getting it to work as expected?
>
> Thanks / Mike
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at 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 at 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 at freeswitch.org
*Twitter: @FreeSWITCH , @briankwest*
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
*iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150219/7b8dd16b/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list