[asterisk-bugs] [JIRA] (ASTERISK-26115) AMI Originate ignore "failed" extension on call failure

Nasir Iqbal (JIRA) noreply at issues.asterisk.org
Wed Jun 15 03:35:56 CDT 2016


Nasir Iqbal created ASTERISK-26115:
--------------------------------------

             Summary: AMI Originate ignore "failed" extension on call failure
                 Key: ASTERISK-26115
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26115
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Core/PBX
    Affects Versions: 13.0.2
         Environment: CentOS 7
            Reporter: Nasir Iqbal


We were using originate from AMI with target extension something like following
{quote}
\[my_dial\]
exten => failed,1,Set(_call_status=failed)
exten => failed,n,Macro(call_failed,$\{UNIQUEID\},$\{REASON\})
exten => failed,n,Hangup()

exten => \_X.,4,Goto(my\_context,$\{EXTEN\},1)

exten => h,1,Hangup()
{quote}
Please note *failed* extension above, we used it to do required work in case outgoing call fail. it worked good until we upgraded asterisk from 11 to 13. In Asterisk 13 *failed* extension is being ignored.

After some code reading I have concluded that "if" condition in "pbx.c:ast_pbx_outgoing_exten" is probably responsible for this error.
{quote}
	if (res < 0 /* Call failed to get connected for some reason. */
		&& 1 < synchronous
		&& ast_exists_extension(NULL, context, "failed", 1, NULL)) {
{quote}
As seen in above code _synchronous_ must be bigger then _1_ to execute *failed* extension code. However at the same time you can see that  *manager.c:fast_originate* call *pbx.c:ast_pbx_outgoing_exten* with _1_ as _synchronous_, so its obvious that above condition will fail and *failed* extension will not be called.

Note: the most similar issue which I can find is ASTERISK-13180 



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list