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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Mon Feb 13 07:14:10 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235157#comment-235157 ] 

Friendly Automation commented on ASTERISK-26115:
------------------------------------------------

Change 4915 merged by zuul:
manager: Restore Originate failure behavior from Asterisk 11

[https://gerrit.asterisk.org/4915|https://gerrit.asterisk.org/4915]

> pbx: 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.9.1
>         Environment: CentOS 7
>            Reporter: Nasir Iqbal
>         Attachments: asterisk-13.0.2-failed.patch
>
>
> We were using originate from AMI with target extension something like following
> {noformat}
> [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()
> {noformat}
> 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.
> {code}
> 	if (res < 0 /* Call failed to get connected for some reason. */
> 		&& 1 < synchronous
> 		&& ast_exists_extension(NULL, context, "failed", 1, NULL)) {
> {code}
> 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