[Home]

Summary:ASTERISK-15828: [patch] Add new AGI command: PARK
Reporter:Ben Klang (bklang)Labels:patch
Date Opened:2010-03-16 23:00:52Date Closed:
Priority:MajorRegression?No
Status:Open/NewComponents:Resources/res_agi/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) agi-park-trunk.patch
( 1) agi-park-v2.patch
( 2) agi-park-v3.patch
Description:I needed a way to programmatically park calls via AGI and return the parking slot to the script for further processing.  Since the generic EXEC AGI command does not allow returning information, I created this patch which adds the PARK command to AGI.  On success, the parking lot space is returned.  The PARK command accepts the same arguments as the dialplan function PARK and in fact uses the same parsing code.
Comments:By: Paul Belanger (pabelanger) 2010-06-14 14:10:49

Any documentation for this patch would be helpful.

By: Ben Klang (bklang) 2010-06-14 14:21:39

Per reviewboard feedback, attached is an updated patch.

By: Ben Klang (bklang) 2010-06-14 14:22:00

Oops, forgot to add documentation, I will add that in the next patch.

By: Ben Klang (bklang) 2010-06-14 15:08:45

agi-park-v3.patch now includes requested documentation additions.

By: snuffy (snuffy) 2010-06-16 21:36:01

My bad.. I got confused between park/parkandannounce.

Looks fine to me



By: Ben Klang (bklang) 2010-07-22 16:37:24

Will this be considered for inclusion in the upcoming 1.8 branch?

By: Matt Jordan (mjordan) 2013-01-15 11:39:42.453-0600

While trolling through the backlog I came across this feature. Is there a reason why there needs to be a separate AGI command for park apart from calling 'EXEC' with the Park application?

By: Ben Klang (bklang) 2013-01-15 17:25:10.250-0600

As I mentioned in the initial report, the AGI EXEC does not have a direct way of returning information from the EXECed dialplan app.  While I'm not tied to the idea of adding PARK as an AGI primitive, I would prefer some unambiguous way to access the parking lot number for the call I just parked.  Off the top of my head the options are:

* A new AGI primitive
* Having PARK set a channel variable which can be read back after the command completes

The two options above do not require an AMI connection to access the parking lot number.

By: Ben Klang (bklang) 2013-01-15 17:27:25.133-0600

And then I remembered why I decided against the channel variable option originally.  From the reviewboard discussion:

"Would it make more sense to make Park set channel variables with the information you need (like many other applications do) instead of adding a new AGI command?
bklang 2 years, 7 months ago (June 14th, 2010, 3:10 p.m.)
No, because once the call is parked AGI loses control of the channel, making it impossible to read the channel variable."