[Home]

Summary:ASTERISK-18646: App Dial using Option F: Proceed with dialplan execution at the next priority in the current extension if the source channel hangs up.
Reporter:Physis Heckman (physis)Labels:
Date Opened:2011-09-29 09:45:06Date Closed:2011-10-03 15:39:12
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_dial
Versions:1.8.7.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Linux NPX01 2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux Asterisk 1.8.7.0Attachments:( 0) __20111003-app_dial-F-option-doc-update.txt
( 1) __20111003-app_dial-F-option-doc-update-2.txt
( 2) __20111003-app_dial-F-option-doc-update-3.txt
( 3) __20111003-app_dial-F-option-doc-update-4.txt
Description:When asterisk call application dial using option 'F', the source channel hangs up and asterisk proceed with dialplan execution at the next priority but don't saved arg's and var's from macro or from app dial it self.

SIP/6000 call to SIP/6001

[example]
exten => s,1,Dial(SIP/${ARG1},30,F)
same => n,NoOp(${DIALSTATUS})
same => n,NoOp(${ARG1})
same => n,Hangup

Return Nothing:
NoOp("SIP/6000-0000001b", "")
NoOp("SIP/6000-0000001b", "")
Comments:By: Richard Mudgett (rmudgett) 2011-09-29 14:29:34.669-0500

This looks to be a misunderstanding of Dial option F.  Option F and its cousin F(goto-here) cause the *called* channel to start executing dialplan if the *caller* hangs up the bridge.  It is *start* executing and not *continue* executing because it is a different channel executing dialplan.  Any channel variables you want the called channel to inherit from the caller channel must be prefixed with one or two underbars ('_').

That option could use a better description.

By: Physis Heckman (physis) 2011-09-29 15:36:05.575-0500

Using the Dial with a g option in the same example, the arguments and variables in this macro are saved!

g: Proceed with dialplan execution at the next priority in the current
   extension if the destination channel hangs up.

SIP/6000 call to SIP/6001

[example]
exten => s,1,Dial(SIP/${ARG1},30,g)
same => n,NoOp(${DIALSTATUS})
same => n,NoOp(${ARG1})
same => n,Hangup

Return:
NoOp("SIP/6000-0000001b", "ANSWER")
NoOp("SIP/6000-0000001b", "6001")


By: Richard Mudgett (rmudgett) 2011-09-29 20:33:43.112-0500

Comparing apples to oranges doesn't work.

The g option works that way because it is the *same* channel that was running the dialplan before the dial that is *continuing* to execute the dialplan where it left off.

The F option is a *different* channel *starting* to execute dialplan as if it were a new call.  Since the *called* channel is *starting* to execute dialplan, there is no macro or gosub return points either.  Any channel variables you want the *called* channel to inherit from the *caller* channel must be prefixed with one or two underbars ('_').

By: Leif Madsen (lmadsen) 2011-10-03 13:41:30.780-0500

Added some documentation updates as a patch here for review. Tested using 'make validate-docs' and it throws no errors. :)

By: Leif Madsen (lmadsen) 2011-10-03 13:52:32.967-0500

Updated per Richard.

By: Leif Madsen (lmadsen) 2011-10-03 14:24:49.388-0500

More tweaks per Richard.

By: Leif Madsen (lmadsen) 2011-10-03 14:30:39.856-0500

Bah reverted part of the patch that was wrong.

By: Richard Mudgett (rmudgett) 2011-10-03 15:39:12.713-0500

Documentation updated.