[Home]

Summary:ASTERISK-22825: Dialplan Function for Checking Parking Lot Slot
Reporter:JoshE (n8ideas)Labels:patch
Date Opened:2013-11-05 02:41:53.000-0600Date Closed:2018-07-12 17:28:58
Priority:MajorRegression?
Status:Closed/CompleteComponents:Features/Parking
Versions:11.5.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) checkparking_patch.diff
( 1) checkparkingslotandchannel_v2.diff
( 2) checkparkingslotandchannel.diff
Description:This is a simple patch to add a function for CHECKPARKINGSLOT.  It takes an extension and a parking lot and returns 1 if the parking slot is occupied.  Zero if the slot is empty or the lot doesn't exist.

Example here:
{noformat}
exten => s,1,Set(IS_SLOT_FULL=${CHECKPARKINGSLOT(${EXTEN},park_lot)})
same => n,NoOp(Parking Lot Status is ${IS_SLOT_FULL})
{noformat}

Not sure if it helps anyone else, but it was useful for me.
Comments:By: JoshE (n8ideas) 2013-11-05 02:42:21.204-0600

Slot patch attached.

By: Matt Jordan (mjordan) 2013-11-06 10:42:01.721-0600

So, new features to Asterisk must be developed against trunk, not a release branch of Asterisk. In Asterisk trunk (as well as in Asterisk 12), parking was significantly rewritten - as such, your patch unfortunately does not apply.

Can you rewrite the feature for Asterisk trunk?



By: JoshE (n8ideas) 2013-11-06 10:43:19.201-0600

Yep.  I'll get it updated against trunk.  Just happened to need this for a quick fix, but I'll get it converted.

By: Matt Jordan (mjordan) 2013-12-07 21:02:48.441-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines





By: JoshE (n8ideas) 2014-08-10 15:15:33.870-0500

Updated this patch for latest Asterisk 11 and to add a second option to retrieve the parked channel in addition to just checking the slot.

By: JoshE (n8ideas) 2014-08-10 16:25:11.447-0500

Minor set of fixes and enhancements here.

By: Joshua Elson (joshelson) 2018-07-06 17:06:27.632-0500

I went ahead and provided first version of this patch, which I believe should have linked itself.

Not totally sure on ideal placement in the res_parking code and whether all conventions were properly followed. Totally open to changing this any way you guys see fit.

By: Friendly Automation (friendly-automation) 2018-07-12 17:15:50.392-0500

Change 9375 merged by George Joseph:
res_parking: Add dialplan function for lot channel

[https://gerrit.asterisk.org/9375|https://gerrit.asterisk.org/9375]