[asterisk-dev] [Code Review] 2447: res_parking: Rebuilding parking from the ground up to work with the new bridging model

jrose reviewboard at asterisk.org
Thu May 2 09:35:41 CDT 2013



> On May 1, 2013, 10:09 p.m., opticron wrote:
> > /team/group/bridge_construction/res/parking/parking_manager.c, lines 324-325
> > <https://reviewboard.asterisk.org/r/2447/diff/4/?file=36811#file36811line324>
> >
> >     There needs to be a astman_send_ack here like there is below.

Also fixed this up so that we also send errors on the returns that failed on message creation stuff per parked user.

    [...]
    curlot = parking_lot_find_by_name(lot_name);

    if (!curlot) {
        astman_send_error(s, m, "Requested ParkingLot could not be found.");
        return RESULT_SUCCESS;
    }

    astman_send_ack(s, m, "Parked calls will follow");

    iter_users = ao2_iterator_init(curlot->parked_users, 0);
    while ((curuser = ao2_iterator_next(&iter_users))) {
        RAII_VAR(struct ast_parked_call_payload *, payload, NULL, ao2_cleanup);
        RAII_VAR(struct ast_str *, parked_call_string, NULL, ast_free);

        payload = parked_call_payload_from_parked_user(curuser, PARKED_CALL);
        if (!payload) {
            astman_send_error(s, m, "Failed to retrieve parking data about a parked user.");
            return RESULT_FAILURE;
        }

        parked_call_string = manager_build_parked_call_string(payload);
        if (!parked_call_string) {
            astman_send_error(s, m, "Failed to retrieve parkingd ata about a parked user.");
            return RESULT_FAILURE;
        }

    [...]


- jrose


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


On April 30, 2013, 6:44 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2447/
> -----------------------------------------------------------
> 
> (Updated April 30, 2013, 6:44 p.m.)
> 
> 
> Review request for Asterisk Developers, David Lee, kmoore, Matt Jordan, Mark Michelson, and rmudgett.
> 
> 
> Bugs: ASTERISK-21059, ASTERISK-21272 and ASTERISK-21353
>     https://issues.asterisk.org/jira/browse/ASTERISK-21059
>     https://issues.asterisk.org/jira/browse/ASTERISK-21272
>     https://issues.asterisk.org/jira/browse/ASTERISK-21353
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> As a result of all the new bridging changes, certain applications such as parking, queues, confbridge, and a few others require significant reworking within Asterisk to make usable.
> Parking was less than salvagable, so I've rebuilt it from the ground up to use a lot of new stuff including config hooks, the new bridging architecture, stasis, and just generally to
> be an independent module with its own scope that doesn't get tangled into a giant morass within features.c
> 
> Parking configuration works somewhat differently now and extensions aren't necessarily automatically generated (it's optional and hasn't been implemented), but the intention with the final result is that if you were using parking before without too much additional dialplan manipulation, that should all just work once your parking lots are migrated to the new configuration file.
> 
> Currently supported:
> parking from the PBX with the Park application (all arguments are supported)
> parking within a call using the one touch parking feature
> parking within a call using DTMF blind transfers (attended transfers work, but it's basically just like they called the application itself).
> Picking up parked calls using the PBX
> Multiple parking lots
> All options available to parking lots are currently configurable. Some aren't currently doing anything, namely parkext and hints.
> 
> To do list:
> * Dialplan generation for parking lots with parkext (included 'Park' and 'ParkedCall' applications)
> * Dialplan generation for comebacktoorigin (park-dial extensions)
> * Hints
> * Implement 'Park' manager action
> * Dynamic parking lots and the default parking lot
> * Scraping the greasy remnants of parking out of features.c
> * CEL events
> * Unit tests and testsuite tests
> 
> 
> Diffs
> -----
> 
>   /team/group/bridge_construction/include/asterisk/parking.h PRE-CREATION 
>   /team/group/bridge_construction/main/bridging.c 387012 
>   /team/group/bridge_construction/main/bridging_roles.c 387012 
>   /team/group/bridge_construction/main/config_options.c 387012 
>   /team/group/bridge_construction/main/features.c 387012 
>   /team/group/bridge_construction/main/parking.c PRE-CREATION 
>   /team/group/bridge_construction/res/Makefile 387012 
>   /team/group/bridge_construction/res/parking/parking_applications.c PRE-CREATION 
>   /team/group/bridge_construction/include/asterisk/config_options.h 387012 
>   /team/group/bridge_construction/include/asterisk/bridging.h 387012 
>   /team/group/bridge_construction/configs/res_parking.conf.sample PRE-CREATION 
>   /team/group/bridge_construction/bridges/bridge_builtin_features.c 387012 
>   /team/group/bridge_construction/CHANGES 387012 
>   /team/group/bridge_construction/res/parking/parking_bridge.c PRE-CREATION 
>   /team/group/bridge_construction/res/parking/parking_bridge_features.c PRE-CREATION 
>   /team/group/bridge_construction/res/parking/parking_controller.c PRE-CREATION 
>   /team/group/bridge_construction/res/parking/parking_manager.c PRE-CREATION 
>   /team/group/bridge_construction/res/parking/parking_ui.c PRE-CREATION 
>   /team/group/bridge_construction/res/parking/res_parking.h PRE-CREATION 
>   /team/group/bridge_construction/res/res_parking.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2447/diff/
> 
> 
> Testing
> -------
> 
> This is currently being tested as it's developed and breaks in minor ways frequently. Unit tests and testsuite tests are on the to do list.
> 
> 
> Thanks,
> 
> jrose
> 
>

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


More information about the asterisk-dev mailing list