[asterisk-dev] [Code Review] Updates to parking

Terry Wilson twilson at digium.com
Thu Oct 7 15:37:48 CDT 2010


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



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6003>

    I think this is much better defined to 1. There's no real benefit to having to parse the value into a boolean later.



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6000>

    Since this is just a boolean value, you can make this unsigned int (or short or whatever) comebacktoorigin:1; and put it down by the_mark.



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6004>

    This should be unsigned. You do checks later to ensure that it is not < 1, might as well make that impossible.



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6005>

    use %u for these since we are switching to unsigned int.



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6001>

    whitespace



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6002>

    sizeof(parkinglot->comebackcontext) not parkinglot->mohclass



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6006>

    Use %30u and you shouldn't have to worry about checking. Although if someone really puts in -1 it will ring for a very, very long time. :-)



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6007>

    Take out the ast_true() since we're converting back to making this defined as 1.



/trunk/main/features.c
<https://reviewboard.asterisk.org/r/963/#comment6008>

    %30u and no < 1 check.


- Terry


On 2010-10-01 02:05:57, Mitch Sharp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/963/
> -----------------------------------------------------------
> 
> (Updated 2010-10-01 02:05:57)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> I posted a patch to issues a few weeks ago that duplicated some existing features.  (https://issues.asterisk.org/view.php?id=17947)
> 
> I have reworked it to extend the existing parking behavior.
> 
> This patch does the following:
> - Make comebacktoorigin a per-parkinglot option.
> - Make parkedmusicclass a per-parkinglot option, and make sure parkinglot->parking_con_dial gets set to "park-dial" for additional parking lots instead of being left NULL (already have a patch in issues for this for as a fix for 1.8.0-beta4, https://issues.asterisk.org/view.php?id=17946)
> - Adds a per-parkinglot option comebackcontext, which defaults to the usual 'parkedcallstimeout' context.  Allows the user to handle timed out calls for different parking lots in different contexts.
> - Adds a per-parkinglot option comebackdialtime, which allows user to override the dial time specified in automatically created extensions when comebacktoorigin=yes.
> - Adds channel variable PARKER to timed out calls, so user can easily dial the original device that parked the call if comebacktoorigin=no.
> - Update CLI command 'features show' to include the comebacktoorigin, comebackcontext and comebackdialtime values.
> - Updated /configs/features.conf.sample
> 
> This patch doesn't change any default behavior.
> 
> Looking forward to some feedback.
> 
> 
> This addresses bugs 0017946 and 0017947.
>     https://issues.asterisk.org/view.php?id=0017946
>     https://issues.asterisk.org/view.php?id=0017947
> 
> 
> Diffs
> -----
> 
>   /trunk/configs/features.conf.sample 289621 
>   /trunk/main/features.c 289621 
> 
> Diff: https://reviewboard.asterisk.org/r/963/diff
> 
> 
> Testing
> -------
> 
> I have been running this code in a 1.6.2.4 server and a 1.6.2.13 server for a week now.  There are a total of ~130 SIP registrations and 14 parking lots between the two servers.
> 
> I ported it to 1.8.0-rc2 and trunk and compiled successfully.  This diff is specifically against trunk.
> 
> 
> Thanks,
> 
> Mitch
> 
>




More information about the asterisk-dev mailing list