[asterisk-dev] [Code Review]: Add F option from dial to app_queue

jrose reviewboard at asterisk.org
Thu Mar 1 09:03:53 CST 2012



> On Feb. 29, 2012, 6:45 p.m., rmudgett wrote:
> > /trunk/apps/app_queue.c, lines 886-887
> > <https://reviewboard.asterisk.org/r/1785/diff/2/?file=25167#file25167line886>
> >
> >     No need for trailing comma if it must be the last one.

check.


> On Feb. 29, 2012, 6:45 p.m., rmudgett wrote:
> > /trunk/apps/app_queue.c, line 910
> > <https://reviewboard.asterisk.org/r/1785/diff/2/?file=25167#file25167line910>
> >
> >     Unnecessary space.

check.


> On Feb. 29, 2012, 6:45 p.m., rmudgett wrote:
> > /trunk/apps/app_queue.c, lines 4630-4631
> > <https://reviewboard.asterisk.org/r/1785/diff/2/?file=25167#file25167line4630>
> >
> >     Cut-n-paste error.  CALLER/callee mismatch.

Ooops.  Didn't catch that from the original patch.


> On Feb. 29, 2012, 6:45 p.m., rmudgett wrote:
> > /trunk/apps/app_queue.c, line 5316
> > <https://reviewboard.asterisk.org/r/1785/diff/2/?file=25167#file25167line5316>
> >
> >     Call can fail so you should not run a pbx.

Hmmm.  This code is duplicated in the app_dial version of those code, so it might need changed there as well (not part of this patch probably).

I changed it to check the result of ast_parseable_goto before calling ast_pbx_start.


> On Feb. 29, 2012, 6:45 p.m., rmudgett wrote:
> > /trunk/apps/app_queue.c, lines 5320-5324
> > <https://reviewboard.asterisk.org/r/1785/diff/2/?file=25167#file25167line5320>
> >
> >     You should not start the pbx after a hangup because peer is invalid.

Fixed.


- jrose


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1785/#review5682
-----------------------------------------------------------


On Feb. 29, 2012, 3:25 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1785/
> -----------------------------------------------------------
> 
> (Updated Feb. 29, 2012, 3:25 p.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson and rmudgett.
> 
> 
> Summary
> -------
> 
> This adds the F option from dial to queue.  The idea is pretty simple.
> 
> If F is enabled, if the caller has connected to a queue member and hangs up, the queue member who was called will stay active and go to the indicated context/extension/priority.
> 
> If no arguments are set for F, then the called member will jump to the next priority as with Dial.
> 
> 
> This addresses bug ASTERISK-19283.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19283
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_queue.c 357541 
> 
> Diff: https://reviewboard.asterisk.org/r/1785/diff
> 
> 
> Testing
> -------
> 
> exten => 013,1,Answer()
> exten => 013,2,Set(_crunchbar=chocorice)
> exten => 013,n,NoOp(_crunchbar=${crunchbar})
> exten => 013,n,Queue(markq,F())
> exten => 013,n,Playback(tt-weasels)
> exten => 013,n,NoOp(_crunchbar=${crunchbar})
> 
> Tested to see if the member would be directed to Playback(tt-weasels) and then properly display the crunchbar variable which was documented as being supposed to be copied.
> 
> Also:
> 
> exten => 014,1,Answer()
> exten => 014,n,Set(_licorice=yuck)
> exten => 014,n,NoOp(_licorice=${licorice})
> exten => 014,n,Queue(markq,F(queuetestcontext^001^1))
> exten => 014,n,NoOp(Goldfishes \(love you\))
> 
> [queuetestcontext]
> exten => 001,1,NoOp()
> exten => 001,n,Playback(tt-weasels)
> exten => 001,n,NoOp(_licorice=${licorice})
> 
> To make sure it worked with all the arguments for F.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120301/9cd14a02/attachment-0001.htm>


More information about the asterisk-dev mailing list