Open nirzaf opened 4 years ago
Looks like the Park
action's parameters changed a lot.
Should be an easy fix code side.
But assuming you are using the NuGet package, you'll have to do a workaround to write the command manually. And I don't remember how to do that with AsterNET, but I assume it is possible.
I downloaded the source code and tried to modify it and rebuilt the nuget package locally, All the references are working except Event Handlers Please refer the image above Please help what could be the issue causing these errors, any idea?
I created an Additional Function Which will support to Add the "AnnounceChannel" Channel as Parameter, please review & merge if that helps, Thank you
I downloaded the source code and tried to modify it and rebuilt the nuget package locally, All the references are working except Event Handlers
You downloaded the "master" branch I assume.
Why are you even newing event handlers? Try just assigning the methods instead, let .Net do the event handlers.
_ami.NewChannel += NewChannel;
_ami.NewExten += ProcessChannel;
_ami.BridgeEnter += BridgeEvent;
_ami.NewState += NewState;
I created and Additional Function Which will support to Add the "AnnounceChannel" Channel as Parameter, please review & merge if that helps, Thank you
You only created a constructor and you are attempting to assign to properties that don't exist.
You need to rename the Channel2
property to TimeoutChannel
and add the AnnounceChannel
property.
Feel free to make a pull request when you have it working.
Edit: Just saw your other commit too. Looks good. Create the pull request and I can review it better.
I can see that ParkAction
was changed between Asterisk v11 and v12.
I am not sure if we need to support the earlier version too, or how we would support both.
Anyway, make the pull request and we can review it better.
I found we had 2 methods with 4 string parameters,
public ParkAction(string channel, string channel2, string timeout, string parkinglot)
{
Channel = channel;
Channel2 = channel2;
Timeout = timeout;
Parkinglot = parkinglot;
}
And
public ParkAction(string callerChannel, string calleeChannel, string announceChannel, string timeout)
{
Channel = callerChannel;
TimeoutChannel = calleeChannel;
AnnounceChannel = announceChannel;
Timeout = timeout;
}
Since we can't have both methods together, I removed one with the Variable Name Channel2
since it is supporting older version, Is there any way to solve this, or is there any mistake in my understanding?
We have up to 5 Parameters Available in Asterisk Check the link below for more details
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_Park
but in AsterNET ParkAction has only 4 Parameters and
[AnnounceChannel:] <value>
is not available to provide, http://asternet.github.io/AsterNET/html/M_AsterNET_Manager_Action_ParkAction__ctor_1.htmbecause of this issue when I park the call, person in the opponent side hears the parking announcement, Please help if someone knows how to hack this issue