Open wormling opened 9 years ago
Hello :)
I have to admit that I haven't used v12 myself, so I don't fully understand the changes involved. Could you elaborate a bit more on what would be needed and/or what has changed exactly?
Thanks!
In asterisk 12, AsyncAGI events should be refactored based on the SubEvent type to be: 'AsyncAGIStart', 'AsyncAGIEnd', 'AsyncAGIExec', 'AGIExecStart', 'AGIExecEnd'
So rather than changing anything, so far I've added those events and am looking at the code to make sure they will function properly along side of the AsyncAGIEvent. EventFactoryImpl::createFromRaw will not need to change this way.
Things like "if ($event instanceof \PAMI\Message\Event\AsyncAGIEvent) {" will still need to be updated to allow for the new events.
I'm also about done updating the unit tests, and will try to update the example code with at least a note for 12+ users.
It may not be feasible to maintain backward compatibility once an attempt to fully conform to the AMI v2 specification is made, but I'll maintain a branch for a bit updating any parts I need as I go.
@wormling What's the status on your changes? I need to work with Asterisk 12+, and I wonder if I can use your changes?
It didn't fit well with ARI, your code should still work, but if you need ARI you can use the wormling/phparia project. It does not include menu logic, but it's very simple.
Ahh... you'll still need to switch to 'AsyncAGIStart', 'AsyncAGIEnd', 'AsyncAGIExec', 'AGIExecStart', 'AGIExecEnd', there might be something it that clone of PAGI on my github
https://issues.asterisk.org/jira/browse/ASTERISK-21470
I would like to add support for asterisk 12 but would like some direction. Creating the new event classes would possibly be a breaking change for backward compatibility, catching the events and populating the sub-events seems a little hacky. Any suggestions?