[asterisk-dev] [Code Review]: Fix multiple parking issues.

jrose reviewboard at asterisk.org
Thu Aug 11 11:14:07 CDT 2011



> On Aug. 11, 2011, 10:56 a.m., jrose wrote:
> > "The enabled field indicates if you can put calls into that parking lot.  A parking lot becomes disabled if you have deleted it from the config file but it still has calls parked in it.  It also can become disabled if the parking lot could not get activated because items (parking lot context and access extension) failed to be inserted into the dialplan."
> > 
> > Ok, since you are describing it that way, I have a bit of a problem then...
> > 
> > 
> > This is my features.conf at first:
> > 
> > [general]
> > parkext => 600			; What extension to dial to park
> > parkpos => 601-620		; What extensions to park calls on. These needs to be
> > context => parkedcalls		; Which context parked calls are in
> > 
> > parkingtime => 600
> > 
> > [parkinglot_duckworth]
> > context => duckworth
> > parkext => 7100
> > parkpos => 7101-7120
> > findslot => next
> > parkingtime => 600
> > 
> > 
> > 
> > and features show yields this when entering:
> > 
> > 
> > Feature Groups:
> > ---------------
> > (none)
> > 
> > Call parking (Parking lot: default)
> > ------------
> > Parking extension     :      600
> > Parking context       :      parkedcalls
> > Parked call extensions:      601-620
> > Parkingtime           :      600000 ms
> > MusicOnHold class     :      default
> > Enabled               :      Yes
> > 
> > 
> > Call parking (Parking lot: parkinglot_duckworth)
> > ------------
> > Parking extension     :      7100
> > Parking context       :      duckworth
> > Parked call extensions:      7101-7120
> > Parkingtime           :      600000 ms
> > MusicOnHold class     :      
> > Enabled               :      Yes
> > 
> > 
> > I have one of my POTS phones dial the other, then I park it via the following extension:
> > 
> > exten => 4010,1,Answer()
> > exten => 4010,n,Set(CHANNEL(PARKINGLOT)=parkinglot_duckworth)
> > exten => 4010,n,Park()
> > 
> > And so I have a call parked in extension 7101 under the duckworth context.
> > 
> > At this point, I remove parkinglot_duckworth from features.conf via commenting.
> > 
> > ;[parkinglot_duckworth]
> > ;context => duckworth
> > ;parkext => 7100
> > ;parkpos => 7101-7120
> > ;findslot => next
> > ;parkingtime => 600
> > 
> > Then I perform features reload
> > 
> >   == Parsing '/etc/asterisk/features.conf':   == Found
> > [2011-08-1110:53:26] WARNING[27500]: features.c:6310 parkinglot_is_marked_cb: Parking lot parkinglot_duckworth has parked calls.  Could not remove.
> >     -- Added extension '600' priority 1 to parkedcalls
> >     -- Added extension '7100' priority 1 to duckworth
> > 
> > At this point, features show yeilds:
> > 
> > 
> > Call parking (Parking lot: parkinglot_duckworth)
> > ------------
> > Parking extension     :      7100
> > Parking context       :      duckworth
> > Parked call extensions:      7101-7120
> > Parkingtime           :      600000 ms
> > MusicOnHold class     :      
> > Enabled               :      Yes
> > 
> > So as you can see, it remains enabled, and this was the case for which I was thinking it would be disabled and as you describe above, it seems like it should be.
> 
> jrose wrote:
>     NOTE:
>     
>     Ok, a little probing reveals the following:
>     
>     This does change the parkinglot->disabled value to 1
>     
>     Upon subsequent attempts to reload though, it is 0 though, so presumably it gets re-enabled before the reload is finished.

*by that I don't mean that upon reloading again, the parkinglot gets re-enabled, I mean that sometime before finishing the reload, it gets set back to 0.


- jrose


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


On Aug. 10, 2011, 8:06 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1358/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2011, 8:06 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Fix multiple parking issues.
> 
> JIRA ASTERISK-17183 / SWP-3068
> Multi-parkinglot directs calls to wrong parkinglot.
> JIRA ASTERISK-17870 / SWP-3520
> Cannot retrieve parked calls.
> JIRA AST-576 / SWP-3535
> Issues with parking lots
> 
> * Removed searching for parking lots by extension.  Parking lots can only
> be found by the parking lot name since parking lot access extensions and
> spaces are not guaranteed to be unique.
> 
> * Added parking_lot_name option to the Park and ParkedCall applications.
> Updated documentation for Park and ParkedCall applications.
> 
> * Add parkext_exclusive configuration option to make parking entry
> extensions specify which parking lot they access.
> 
> 
> JIRA ASTERISK-17452 / SWP-3157
> Parking_offset not used
> JIRA AST-624 / SWP-3603
> 'next' setting for findslot does nothing
> 
> * Reimplemented since findslot feature option broken by -r114655.
> 
> 
> JIRA ASTERISK-15792 / SWP-1074
> Dialplan continues execution after transfer to park.
> 
> This happens for DTMF attended transfer, DTMF blind transfer, and DTMF
> one-touch-parking if the party initiating these features also initiated
> the call.
> 
> * Fixed the return code from the affected builtin features when parking a
> call.
> 
> 
> JIRA AST-607 / SWP-3605:
> The courtesytone is not playing to the expected call when picking up a
> parked call.
> 
> This is mostly a documentation problem.  However, the option is not reset
> to the default when features.conf is reloaded.
> 
> * Updated features.conf.sample documentation for courtesytone and
> parkedplay options.
> 
> * Reset the parkedplay option to default when features.conf is reloaded.
> 
> 
> JIRA AST-615 / SWP-3613:
> AMI Park action followed by features reload results in orphaned channels
> in parking lot.
> 
> * Reloading features.conf will not touch parking lots that have calls
> still parked in them.  Reload again at a later time.
> 
> 
> Misc additional fixes:
> 
> * Added unit test for parking lot dialplan usage checking.
> 
> * Made update connected line when a parked call is retrieved from a
> parking lot.
> 
> * Made retrieved parked call stop ringing or MOH depending upon how the
> call was waiting in the parking lot.
> 
> * Made CLI "features show" indicate if the parking lot is enabled for use.
> 
> * Added PARKINGDYNEXTEN channel variable to allow dynamic parking lots to
> specify the parking lot access extension.
> 
> * Made AMI ParkedCalls action ParkedCall events have a Parkinglot header.
> 
> * Made AMI ParkedCalls action ParkedCallsComplete event have a Total
> header.
> 
> * Fixed potential deadlock from AMI Park action holding channel locks
> while calling masq_park_call().
> 
> * Fixed several places where ast_strdupa() were used inside of loops.
> (Mostly fixed by refactoring the loop body into its own function.)
> 
> * Fixed copy_parkinglot() copying too much from the source parking lot.
> Extracted the parking lot configuration settings into struct
> parkinglot_cfg.
> 
> * Refactored courtesytone playing code to put the channel not playing the
> tone in autoservice.
> 
> * Fix when pbx-parkingfailed is played that the other channel is put in
> autoservice if it exists.
> 
> * Fixed parkinglot reference leak in parked_call_exec() error paths.
> 
> * Fixed parkinglot_unref() use of parkinglot after it was unreffed.
> 
> * Made destroy the struct ast_parkinglot parkings lock when done.
> 
> * Refactored the features.conf parking lot configuration code to eliminate
> redundancy.
> 
> * Fixed feature reload to better protect parking lots.
> 
> * Fixed parking lot container reference leak in handle_parkedcalls().
> 
> * Fixed the total count in handle_parkedcalls().
> 
> 
> This addresses bugs ASTERISK-15729, ASTERISK-17183, ASTERISK-17452, and ASTERISK-17870.
>     https://issues.asterisk.org/jira/browse/ASTERISK-15729
>     https://issues.asterisk.org/jira/browse/ASTERISK-17183
>     https://issues.asterisk.org/jira/browse/ASTERISK-17452
>     https://issues.asterisk.org/jira/browse/ASTERISK-17870
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/CHANGES 331573 
>   /branches/1.8/configs/features.conf.sample 331573 
>   /branches/1.8/main/asterisk.c 331573 
>   /branches/1.8/main/features.c 331573 
> 
> Diff: https://reviewboard.asterisk.org/r/1358/diff
> 
> 
> Testing
> -------
> 
> Able to park and retrieve calls from the expected parking lots.
> 
> 
> Thanks,
> 
> rmudgett
> 
>

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


More information about the asterisk-dev mailing list