[asterisk-bugs] [JIRA] (ASTERISK-29018) Channel redirect might be missed if redirected channel is executing dialplan

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue Aug 4 02:37:43 CDT 2020


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

Asterisk Team commented on ASTERISK-29018:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

> Channel redirect might be missed if redirected channel is executing dialplan
> ----------------------------------------------------------------------------
>
>                 Key: ASTERISK-29018
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29018
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Channels, Core/PBX
>    Affects Versions: 16.8.0
>            Reporter: Patrick Wakano
>            Severity: Minor
>
> When using the Channel Redirect feature (either the dialplan app ChannelRedirect or the CLI channel redirect) it has been observed that the redirection might just not work in case the channel being redirected is executing something else in the dialplan.
> Take for example the dialplan below just to simulate the issue. If while the channel is looping, the channel redirect command is issued for that channel from the CLI, the redirect might simply not work and the channel keeps executing the loop.
> Given the channel redirect is an explicit action to alter the channel execution, I think it should always override whatever dialplan execution the channel is doing, so it should just terminate the current priority and then immediately go to where the channel redirect determined. However there are cases where the next dialplan priority gets executed and so the redirection silently fails to happen even tough it says the redirection was successful.
> The problem does not happen every time, it seems to be a 30% chance of having the issue for the example below.
> {noformat}
> [pstn-outgoing]
> exten => 8888,1,Answer()
> same => n,Set(i=0)
> same => n,While($[${i} < 10000])
> same => n,Set(Dummy=${PRIORITY})
> same => n,Set(i=$[${i}+1])
> same => n,EndWhile
> same => n,NoOp(Loop end)
> same => n,Hangup()
> same => n(end),NoOp(Terminated)
> same => n,Hangup()
> {noformat}
> Logs:
> {noformat}
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=69") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=70") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
> pstn8*CLI> channel redirect SIP/9000-0000000f pstn-outgoing,8888,end
> Channel 'SIP/9000-0000000f' successfully redirected to pstn-outgoing,8888,end
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=287") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=288") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=289") in new stack
> .....
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=9997") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=9998") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=9999") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "1") in new stack
>     -- Executing [8888 at pstn-outgoing:4] Set("SIP/9000-0000000f", "Dummy=4") in new stack
>     -- Executing [8888 at pstn-outgoing:5] Set("SIP/9000-0000000f", "i=10000") in new stack
>     -- Executing [8888 at pstn-outgoing:6] EndWhile("SIP/9000-0000000f", "") in new stack
>     -- Executing [8888 at pstn-outgoing:3] While("SIP/9000-0000000f", "0") in new stack
>     -- Executing [8888 at pstn-outgoing:7] NoOp("SIP/9000-0000000f", "Loop end") in new stack
>     -- Executing [8888 at pstn-outgoing:8] Hangup("SIP/9000-0000000f", "") in new stack
>   == Spawn extension (pstn-outgoing, 8888, 8) exited non-zero on 'SIP/9000-0000000f'
> pstn8*CLI> 
> {noformat}



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



More information about the asterisk-bugs mailing list