[Home]

Summary:ASTERISK-24596: Unclear how to use Park application with res_parking 'parkeddynamic' enabled. Documentation?
Reporter:Philip Correia (nampop)Labels:
Date Opened:2014-12-05 06:20:34.000-0600Date Closed:2016-03-29 10:47:56
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_parking
Versions:13.0.0 13.0.1 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-24605 res_parking option parkeddynamic does not work with the core Features 'parkcall' (DTMF initiated parking)
Environment:GNU/Linux 2.6.18 SMP x86_64 Centos 5Attachments:( 0) 0001-Fixing-incorrect-condition-check.patch
( 1) debug.txt
( 2) scenario1.txt
( 3) scenario1-debug.txt
( 4) scenario2.txt
( 5) scenario3.txt
Description:When enabling the dynamic parking lot features in res_parking.conf and using the Park application, the application always fails with an error stating the extensions cannot be registered.

# in default res_parking.conf
[general]
parkeddynamic = yes

# in extensions.conf
exten => _X.,1,Park(VBX48)

When placing a call the error appears in the CLI as per the debug.txt attached.

The attached patch seems to fix the problem.


Comments:By: Matt Jordan (mjordan) 2014-12-05 08:55:01.302-0600

While I'm not sure yet what is occurring on your system, the patch is not correct. A return value of {{0}} from the {{parking_lot_cfg_create_extensions(cfg)}} function indicates success. There may be a clause in there returning {{-1}} when it shouldn't, but there are plenty of off nominals in that function that your patch would now validate.

Can you provide a full DEBUG log, as well as your extensions.conf and res_parking.conf?

By: Philip Correia (nampop) 2014-12-09 09:09:12.498-0600

Thanks Matt,

I was naively hoping to help by indicating whereabouts the problem could be. I think calling it a patch was a gross overstatement. Apologies for that, in future I'll stick to just reporting my experience until my Asterisk hacking skills get better :)

After further investigation I don't think this is necessarily a bug, maybe a requirement in clarifying the feature usage in the documentation, or logging the error better in order to indicate that further configuration is required.

The following is what I am experiencing:

[Scenario 1]
When parkeddynamic = yes and parkext is defined in [default] in res_parking.conf and Park(VBX48) is called in the dial plan, the park fails with the error
'res_parking.c:1008 create_dynamic_lot_full: Extensions for dynamic parking lot 'VBX48' could not be registered. Dynamic lot creation failed.'

[Scenario 2]
When parkeddynamic = yes and parkext is NOT defined in [default] in res_parking.conf and Park(VBX48) is called in the dial plan, the park succeeds creating the VBX48 parkinglot but using the default 'parkedcalls' context

[Scenario 3]
When parkeddynamic = yes and parkext is defined in [default] in res_parking.conf and the variable PARKINGDYNCONTEXT=VBX48PARKED is set and Park(VBX48) is called in the dial plan, the park succeeds creating the VBX48 parkinglot but using the VBX48PARKED context.

Please see the attached files for each of the scenarios and the debug for the failure.

None of the dynamic park features are documented in the Asterisk 13 as far as I can see, neither on the website nor in the code (as per 'core show  application Park')

The website has the dynamic park features documented for Asterisk 11 and the bit I think is relevant to this issue is alluded to in the following note:

"Parking lots automatically create and manage dialplan extensions in the parking lot context. You do not need to explicitly use this application in your dialplan. Instead, all you should do is include the parking lot context in your dialplan."

I don't think this adequately indicates what needs to be done in order to get it working as per scenario 3. It  is also not clear that if parkext is not defined in the default template, that PARKINGDYNEXTEN must be set for the extensions to be created in the context defined in PARKINGDYNCONTEXT (I'm assuming here that this is the intended outcome)



By: Rusty Newton (rnewton) 2014-12-11 18:25:16.230-0600

In short it appears the use of parkeddynamic=yes with Park requires setting one or more of a few channel variables that are documented up until 11 (https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Park), but the documentation was removed in 12 (https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Application_Park).

If anything, the documentation definitely needs to be updated to match current behavior and requirements for feature usage.

By: Rusty Newton (rnewton) 2014-12-11 18:26:57.310-0600

Linking this to ASTERISK-24605 since I ran into the documentation issue and general confusion there.

By: Richard Mudgett (rmudgett) 2016-03-25 13:46:35.015-0500

This is only a documentation problem as Asterisk is working as intended.

You cannot create parking lots with extensions created by Asterisk that overlap.  The only exception is the parking lot access extension and that only if the access extension is not exclusive to a parking lot.

In the first scenario the {{parkext}} extensions overlap but since they are not exclusive it is ok.  However, the {{parkpos}} extensions of the default and VBX48 parking lots overlap so the dynamic parking lot creation fails.

In the second scenario neither the default nor VBX48 parking lots create any extensions so this is ok.

In the third scenario neither the default nor VBX48 parking lots create overlapping extensions since the extensions are created in different contexts so this is also ok.