Thanks David! I did look at continue_on_fail before asking but it doesn't see to work for originate. I did find a solution though. I made the originate call to execute inline and then check for the value of api_result variable which in my dialplan gets assigned the return of the originate function. This conditions seems to tell me that the originate was successful <condition field="${api_result}" expression="^\+OK "> On Wed, Jan 14, 2015 at 9:16 AM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
Take a look at "continue_on_fail":Hangup Causesbridge_hangup_cause <https://wiki.freeswitch.org/wiki/Variable_bridge_hangup_cause>
This is set to the hangup cause of the last bridged B leg of the call. If you have continue_on_fail=true and hangup_after_bridge=false you can do checks on this to see what "really" happened to the call. You can for instance do execute_extension after bridge, do a condition check on ${bridge_hangup_cause} to see if it contains MEDIA_TIMEOUT and then trigger a redial of the call or transfer to a cell phone. For a list of hangup causes, see Hangup Causes <https://wiki.freeswitch.org/wiki/Hangup_Causes> .
On Wed, Jan 14, 2015 at 6:16 PM, David Villasmil Govea < david.villasmil@gmail.com> wrote:
take a look at "continue_on_fail":
On Wed, Jan 14, 2015 at 6:05 PM, Oleg Stolyar <olegstolyar@gmail.com> wrote:
Hi guys,
I have a line like this in my dialplan:
<action inline="true" application="set" data="api_result=${originate(sofia/external/<phone number>@2.3.4.5:5060 <extension> XML <profile>
How can I know if the originate failed? For example the number is unreacheable or invalid or the trunk is down. In this case the <extension> will not be executed.
It seems that my dialplan continues to execute even if originate failed but is there something I can do to check for that?
_________________________________________________________________________ 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
-- DVG
-- Imagination is more important than knowledge Albert Einstein
-- DVG
-- Imagination is more important than knowledge Albert Einstein
_________________________________________________________________________ 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