[asterisk-bugs] [JIRA] (ASTERISK-26029) parking: ast_parking_park_call should return parking_space instead of parking_exten
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Fri May 20 14:40:56 CDT 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-26029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230717#comment-230717 ]
Richard Mudgett commented on ASTERISK-26029:
--------------------------------------------
{quote}
We should be able to implement a simple workaround, by using a helper variable like 'PARKING_PLACE'. which get added to the parked call, right ?
{quote}
How would you access such a channel variable? The variable cannot be put on the parking channel as it may no longer exist when the parked channel finally goes into the park holding bridge. The channel variable could be put on the parked channel but you wouldn't know which channel that is. You may think that it is the bridged peer channel, but that is not always true. You can now actually park a multi-party bridge instead of a single channel; in which case a local channel pair is used to link the multi-party bridge with the parking space.
{quote}
We should be able query for that value after the function has finished 'successfully', right?
{quote}
This is also not possible even if you knew which channel to fetch the channel variable value from. The channel that ultimately gets parked is parked by another thread. That other thread may or may not have parked the channel by the time the thread executing the function has 'successfully' returned.
{quote}
The function documentation (API) should reflect the functionality of the function, right?
{quote}
Yes it should.
{quote}
Are you gonna fix the docs and just drop the use of 'exten' in chan_skinny.c, or should we look for a solution, as not to break the API?
{quote}
As only chan_skinny is affected and it is an extended support module and support is provided by the Asterisk community, no I'm not going to fix it. The more I look at what is needed, the more I see why it was likely never done. I'm running into the same issues with finding which channel ultimately gets parked that I pointed out above. I will however, provide some pointers for a possible fix.
* {{parking.c:ast_parking_park_call()}} calls {{parking_bridge_features.c:parking_park_call()}} through table callback indirection.
* The ParkAndAnnounce application used to also use the equivalent ast_parking_park_call() function in v11. It now creates a stasis subscription callback for parking events. The parked channel event contains the parking space used so it can generate the audio announce message.
* You need to get a stasis subscription setup for the channel that ultimately gets parked and make {{parking_bridge_features.c:parking_park_call()}} wait for the subscription callback to get called. A subscription already does get made but it is buried in lower layer code so it is difficult to take advantage of it.
* The callback available to {{parking_bridge_features.c:parking_blind_transfer_park()}} could be used to create the necessary subscription. However, it would only only work single party parking situations. Parking a multi-party bridge would fail as the callback is called on the wrong channel and too late to setup the subscription.
* The subscription needs to wake up the thread calling {{parking_bridge_features.c:parking_park_call()}} so it can retrieve the parking space.
* The waiting thread needs to give up and stop the subscription after a timeout because there is no guarantee that the subscription event will ever happen.
Or you can just forget about the use of exten in chan_skinny as you have also suggested.
> parking: ast_parking_park_call should return parking_space instead of parking_exten
> -----------------------------------------------------------------------------------
>
> Key: ASTERISK-26029
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26029
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_skinny, Features/Parking
> Affects Versions: 13.9.1
> Reporter: Diederik de Groot
> Severity: Minor
>
> Occording to the source documentation in:
> include/asterisk/parking.h and res/parking/parking_bridge_features.c the call to 'parking_park_call' should return the extension where the call has been parked via the exten parameter. At the moment it is returning the 'parkext' instead, which is a bit useless. Asterisk-11 (and before) used to provide the parkingslot or parking_space information when calling this function.
> For example chan_skinny.c is using the returned 'exten' to display the the parkingslot information, but ends up displaying the parkingextension, which is useless.
> Note: If this is not possible, would it be possible to add a pbx_buildin_setvar_helper(char, "PARKING_SPACE",.... while the call occupies the parking_space, which gets assigned at the moment when the call returns because of time.
> Note: If the change is not made, is there another way to get at the required information ?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list