res_parking: Unit tests

Adds the following unit tests:
* create_lot: tests adding and removal of a new parking lot (baseline)
* park_extensions: creates a parking lot that registers extensions and
      then confirms that all of the expected extensions exist
* extensions_conflicts: creates numerous parking lots to test that
      extension conflicts in parking lots result in parking lot
      creation failing
* dynamic_parking_variables: Tests that the creation of dynamic
      parking lots respects the related channel variables set on the
      channel that requests them.
* park_call: Tests adding a channel to a parking lot's holding bridge
      by standard parking functions.
* retrieve_call: Tests pulling a channel out of a parking lot's
      holding bridge via parked call retrieval functions.

(closes issue ASTERISK-22138)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2714/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2013-08-05 16:00:01 +00:00
parent 357b275239
commit 98b02d98f3
4 changed files with 922 additions and 4 deletions

View File

@@ -359,7 +359,10 @@ static void bridge_parking_pull(struct ast_bridge_parking *self, struct ast_brid
}
ao2_unlock(pu);
parking_notify_metermaids(pu->parking_space, self->lot->cfg->parking_con, AST_DEVICE_NOT_INUSE);
/* Pull can still happen after the bridge starts dissolving, so make sure we still have a lot before trying to notify metermaids. */
if (self->lot) {
parking_notify_metermaids(pu->parking_space, self->lot->cfg->parking_con, AST_DEVICE_NOT_INUSE);
}
switch (pu->resolution) {
case PARK_UNSET: