[asterisk-dev] [Code Review] 2615: res_parking: Add dynamic parking back in

jrose reviewboard at asterisk.org
Fri Jun 14 11:11:43 CDT 2013



> On June 13, 2013, 10:30 p.m., Mark Michelson wrote:
> > /trunk/CHANGES, lines 239-240
> > <https://reviewboard.asterisk.org/r/2615/diff/1/?file=39502#file39502line239>
> >
> >     Any particular reason why this change was made?

Yes, prior to this change, if you specified a PARKINGDYNAMIC (which sets the template to use for basing the parking lot on) to a parking lot that doesn't exist, it would revert to using the default parking lot. I discussed making this change with Matt and he agreed that falling back like this is generally not desirable behavior. If the channel variable isn't set deliberately, it will still use the default parking lot though.


> On June 13, 2013, 10:30 p.m., Mark Michelson wrote:
> > /trunk/res/res_parking.c, lines 981-985
> > <https://reviewboard.asterisk.org/r/2615/diff/1/?file=39506#file39506line981>
> >
> >     Can use S_OR here if you'd rather:
> >     
> >     template_name = S_OR(chan_template_name, DEFAULT_PARKING_LOT);

fixed.


- jrose


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


On June 11, 2013, 3:22 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2615/
> -----------------------------------------------------------
> 
> (Updated June 11, 2013, 3:22 p.m.)
> 
> 
> Review request for Asterisk Developers, Matt Jordan and rmudgett.
> 
> 
> Bugs: ASTERISK-21644
>     https://issues.asterisk.org/jira/browse/ASTERISK-21644
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Add Dynamic Parking Lots.
> 
> 1. If parkeddynamic is enabled and a call is being parked into a parking lot which doesn't already exist (for instance, the name of the parking lot is specified in the application arguments or the channel parking lot variables) then a new parking lot will be created based on an existing parking lot specified by the channel variable PARKINGDYNAMIC. PARKINGDYNCONTEXT, PARKINGDYNEXTEN, and PARKINGDYNPOS will change specific configuration values for the newly created parking lot.
> 
> 2. Dynamic parking lots will stick around after they are created. This behavior is consistent with how they were implemented in 11. A small change to this however comes with reloads. On reload, if a dynamic parking lot exists and currently contains no calls then it will be removed. If it has calls in it however, then the parking lot will remain and still function normally.
> 
> As a side note, I changed the parking lot container to use a mutex lock instead of an RWLock. I wasn't using the Read/write aspect of the lock for anything at the time and it was causing problems for some reason.
> 
> 
> Diffs
> -----
> 
>   /trunk/CHANGES 391314 
>   /trunk/res/parking/parking_applications.c 391314 
>   /trunk/res/parking/parking_ui.c 391314 
>   /trunk/res/parking/res_parking.h 391314 
>   /trunk/res/res_parking.c 391314 
> 
> Diff: https://reviewboard.asterisk.org/r/2615/diff/
> 
> 
> Testing
> -------
> 
> Created dynamic parking lots, reloaded with calls in them and without calls in them, parked multiple people in them at a time, made sure they would fail to be created if their extensions overlapped, made sure they cleared out extensions that they register appropriately on destruction. 
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130614/1f76ce3a/attachment.htm>


More information about the asterisk-dev mailing list