[Home]

Summary:ASTERISK-14150: [patch] Dynamic parking lots
Reporter:Igor Goncharovsky (igorg)Labels:
Date Opened:2009-05-17 02:17:03Date Closed:2010-02-17 12:30:25.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 2009090400_dynamicpark.diff.txt
( 1) dymaic_park_test.txt
( 2) dynamic_parkinglot.diff
( 3) dynamic_test.txt
( 4) features.dynamic_park.v1.diff
( 5) features.dynamic_park.v2.diff
( 6) features.dynamic_park.v3.diff
Description:This pathc intended to introduce fully dynamic parking. As requested in bounty variables PARKINGEXTEN and PARKINGLOT can be defined anywhere in dialplan or AGI and parking lot not defined in features.conf. On call park new parking lot 'll be created based on default lot settings or settings of parkinglot from PARKINGDYNAMIC variable.

Also variables PARKINGDYNCONTEXT and PARKINGDYNPOS introduce to control parking context and positions of newly created parking lot.

New behavior controlled by setting 'parkeddynamic' in features.conf

****** ADDITIONAL INFORMATION ******

URL of bounty description: http://www.voip-info.org/wiki/index.php?page_id=5603
Comments:By: Eliel Sardanons (eliel) 2009-05-18 10:41:29

I think 'chan' needs to be locked before calling pbx_builtin_getvar_helper().

By: Igor Goncharovsky (igorg) 2009-05-19 10:42:07

Thank you, eliel. I am confused that in park_space_reserve() function pbx_builtin_getvar_helper() for getting variable PARKINGEXTEN also without chan locked. I think that 'chan' already locked at this moment. I'll look at this.

By: Igor Goncharovsky (igorg) 2009-06-03 12:02:42

Patch updated, locking added. Also added locking to getting of PARKINGEXTEN variable.

By: Igor Goncharovsky (igorg) 2009-06-13 00:16:34

Update patch to link newly created parking lot after all values initialized

By: Alistair Cunningham (acunningham) 2009-06-16 04:35:53

I tested version of this patch and it worked well. I have not had a chance to test versions 2 or 3 though.

By: Igor Goncharovsky (igorg) 2009-07-01 02:08:43

I have tested new function myself. Have wrote script, that make over 50 calls per seconds that parked and randomnly picked up. Tested with 10, 1000 and 10000 of dynamicaly created parking lots. Attached file while executing command 'parkedcalls show'

By: Alistair Cunningham (acunningham) 2009-08-27 06:48:02

I have tested version 3 of the patch and it works well. Can we please get this incorporated into the mainline Asterisk tree?

By: Michiel van Baak (mvanbaak) 2009-09-02 17:02:52

this one is up for review on https://reviewboard.digium.com/r/352/ now

Already fixed some stuff that came up.

By: Michiel van Baak (mvanbaak) 2009-09-04 01:32:58

Can you please test the latest attached patch ? (2009090400_dynamicpark.diff.txt)

By: Alistair Cunningham (acunningham) 2009-09-04 07:05:44

I'm not sure this latest patch is working. Our AGI does this:

<Local/*7@from-internal-d7f9;2>AGI Rx << SET VARIABLE __PARKINGLOT "park_2"
<Local/*7@from-internal-d7f9;2>AGI Tx >> 200 result=1
<Local/*7@from-internal-d7f9;2>AGI Rx << SET VARIABLE __PARKINGEXTEN "701"
<Local/*7@from-internal-d7f9;2>AGI Tx >> 200 result=1
<Local/*7@from-internal-d7f9;2>AGI Rx << EXEC Dial Local/*7@parkedcalls/n,60,oH

but then I see:

Parked Local/*7@parkedcalls-15b6;2 on 701 (lot default). Will timeout back to extension [parkedcalls] s, 1 in 300 seconds

Note that it says "lot default". Is that correct?



By: Michiel van Baak (mvanbaak) 2009-09-04 13:13:27

I'll have a look at it tomorrow.

By: Igor Goncharovsky (igorg) 2009-09-06 03:52:13

I have tested new patch with my previous tests: works fine. Not tested with AGI.

By: Bryant Zimmerman (zktech) 2009-11-13 18:17:11.000-0600

I would like to test this will it work with the current Released 1.6.1.x version or do I need to use the SVN?

By: Igor Goncharovsky (igorg) 2009-11-14 02:19:19.000-0600

You need to try testing it with svn trunk. Please report results of testing.

By: Igor Goncharovsky (igorg) 2009-12-10 21:20:03.000-0600

I have tested patch in the scenario, same to acunningham and it look like patch work with latest svn trunk. Log of testing attached.

By: Alistair Cunningham (acunningham) 2010-02-03 08:36:18.000-0600

Are there any updates on this? Any chance of getting it accepted?

By: Leif Madsen (lmadsen) 2010-02-03 09:12:05.000-0600

No updates at this time as you'd see them noted in this issue. At this point it's just a matter of a developer having time to review and commit this change to trunk.

By: Alistair Cunningham (acunningham) 2010-02-03 09:13:50.000-0600

Thank you.

By: David Vossel (dvossel) 2010-02-16 16:53:20.000-0600

I'm currently reviewing and testing this patch.  If everything goes well, it should be committed shortly.

By: David Vossel (dvossel) 2010-02-17 12:24:51.000-0600

The dynamic_parkinglot.diff patch should bring this issue to completion.   I fixed a memory leak caused by a ref count error, revised some of the wording used in the documentation, and updated the CHANGES lot to indicate the creation of a new feature.

By: Digium Subversion (svnbot) 2010-02-17 12:29:49.000-0600

Repository: asterisk
Revision: 247248

U   trunk/CHANGES
U   trunk/configs/features.conf.sample
U   trunk/main/features.c

------------------------------------------------------------------------
r247248 | dvossel | 2010-02-17 12:29:48 -0600 (Wed, 17 Feb 2010) | 16 lines

addition of dynamic parkinglots feature

This feature allows for parkinglots to be created dynamically within
the dialplan.  Thanks to all who were involved with getting this patch
written and tested!

(closes issue ASTERISK-14150)
Reported by: IgorG
Patches:
     features.dynamic_park.v3.diff uploaded by IgorG (license 20)
     2009090400_dynamicpark.diff.txt uploaded by mvanbaak (license 7)
     dynamic_parkinglot.diff uploaded by dvossel (license 671)
Tested by: eliel, IgorG, acunningham, mvanbaak, zktech

Review: https://reviewboard.asterisk.org/r/352/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=247248

By: Digium Subversion (svnbot) 2010-02-17 12:30:23.000-0600

Repository: asterisk
Revision: 247249

_U  branches/1.6.2/

------------------------------------------------------------------------
r247249 | dvossel | 2010-02-17 12:30:23 -0600 (Wed, 17 Feb 2010) | 22 lines

Blocked revisions 247248 via svnmerge

........
 r247248 | dvossel | 2010-02-17 12:29:48 -0600 (Wed, 17 Feb 2010) | 16 lines
 
 addition of dynamic parkinglots feature
 
 This feature allows for parkinglots to be created dynamically within
 the dialplan.  Thanks to all who were involved with getting this patch
 written and tested!
 
 (closes issue ASTERISK-14150)
 Reported by: IgorG
 Patches:
       features.dynamic_park.v3.diff uploaded by IgorG (license 20)
       2009090400_dynamicpark.diff.txt uploaded by mvanbaak (license 7)
       dynamic_parkinglot.diff uploaded by dvossel (license 671)
 Tested by: eliel, IgorG, acunningham, mvanbaak, zktech
 
 Review: https://reviewboard.asterisk.org/r/352/
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=247249