From e3b0eabd796957c61532b191ad18f423336f3294 Mon Sep 17 00:00:00 2001 From: "i.badamshin" Date: Wed, 27 Sep 2017 10:08:27 +0300 Subject: [PATCH 1/4] Add asterisk 12+ agi events --- doc/examples/asyncagi12/MyPAGIApplication.php | 307 ++++++++++++++++++ doc/examples/asyncagi12/example.php | 142 ++++++++ .../Application/PAGIAsyncApplication.php | 29 ++ src/PAMI/AsyncAgi/AsyncClientImpl.php | 21 +- .../AsyncAgi/Event/IAsyncAgiExecEvent.php | 37 +++ .../AsyncAgi/Event/IAsyncAgiStartEvent.php | 30 ++ src/PAMI/AsyncAgi/IAsyncClient.php | 21 ++ src/PAMI/Message/Event/AsyncAGIEvent.php | 5 +- src/PAMI/Message/Event/AsyncAGIExecEvent.php | 4 +- src/PAMI/Message/Event/AsyncAGIStartEvent.php | 16 +- 10 files changed, 601 insertions(+), 11 deletions(-) create mode 100644 doc/examples/asyncagi12/MyPAGIApplication.php create mode 100644 doc/examples/asyncagi12/example.php create mode 100644 src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php create mode 100644 src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php create mode 100644 src/PAMI/AsyncAgi/Event/IAsyncAgiStartEvent.php create mode 100644 src/PAMI/AsyncAgi/IAsyncClient.php diff --git a/doc/examples/asyncagi12/MyPAGIApplication.php b/doc/examples/asyncagi12/MyPAGIApplication.php new file mode 100644 index 000000000..a4b5a328a --- /dev/null +++ b/doc/examples/asyncagi12/MyPAGIApplication.php @@ -0,0 +1,307 @@ + Optional. If set, should contain the absolute + * path to the log4php.properties file. + * + * stdin => Optional. If set, should contain an already open stream from + * where the client will read data (useful to make it interact with fastagi + * servers or even text files to mock stuff when testing). If not set, stdin + * will be used by the client. + * + * stdout => Optional. Same as stdin but for the output of the client. + * + * + * PHP Version 5 + * + * @category Pagi + * @package examples + * @subpackage quickstart + * @author Marcelo Gornstein + * @license http://www.noneyet.ar/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://www.noneyet.ar/ + * + * Copyright 2011 Marcelo Gornstein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +use PAGI\Client\ChannelStatus; +use PAMI\AsyncAgi\Application\PAGIAsyncApplication; + +declare(ticks = 1); + +/** + * PAGI basic use example. Please see run.sh in this same directory for an + * example of how to actually run this from your dialplan. + * + * Note: The client accepts an array with options. The available options are + * + * log4php.properties => Optional. If set, should contain the absolute + * path to the log4php.properties file. + * + * stdin => Optional. If set, should contain an already open stream from + * where the client will read data (useful to make it interact with fastagi + * servers or even text files to mock stuff when testing). If not set, stdin + * will be used by the client. + * + * stdout => Optional. Same as stdin but for the output of the client. + * + * PHP Version 5 + * + * @category Pagi + * @package examples + * @subpackage quickstart + * @author Marcelo Gornstein + * @license http://www.noneyet.ar/ Apache License 2.0 + * @link http://www.noneyet.ar/ + */ +class MyPAGIApplication extends PAGIAsyncApplication +{ + /** + * (non-PHPdoc) + * @see \PAGI\Application\PAGIApplication::init() + */ + public function init() + { + $this->log('Init'); + $client = $this->getAgi(); + $client->answer(); + } + + /** + * Logs to asterisk console. + * + * @param string $msg Message to log. + * + * @return void + */ + public function log($msg) + { + $agi = $this->getAgi(); + $this->logger->debug($msg); + $agi->consoleLog($msg); + } + + /** + * (non-PHPdoc) + * @see \PAGI\Application\PAGIApplication::shutdown() + */ + public function shutdown() + { + try { + $this->log('Shutdown'); + $client = $this->getAgi(); + $client->hangup(); + } catch (\Exception $e) { + + } + } + + /** + * (non-PHPdoc) + * @see \PAGI\Application\PAGIApplication::run() + */ + public function run() + { + $this->log('Run'); + $client = $this->getAgi(); + $loggerFacade = $client->getAsteriskLogger(); + $loggerFacade->notice('hello notice'); + $loggerFacade->warn('hello warn'); + $loggerFacade->debug('hello debug'); + $loggerFacade->error('hello error'); + $loggerFacade->dtmf('hello dtmf'); + //$this->log($client->faxReceive('/tmp/a.tiff')->__toString()); + //$this->log($client->faxSend('/tmp/a.tiff')->__toString()); + $variables = $client->getChannelVariables(); + $this->log('Config dir: ' . $variables->getDirectoryConfig()); + $this->log('Config file: ' . $variables->getConfigFile()); + $this->log('Module dir: ' . $variables->getDirectoryModules()); + $this->log('Spool dir: ' . $variables->getDirectorySpool()); + $this->log('Monitor dir: ' . $variables->getDirectoryMonitor()); + $this->log('Var dir: ' . $variables->getDirectoryVar()); + $this->log('Data dir: ' . $variables->getDirectoryData()); + $this->log('Log dir: ' . $variables->getDirectoryLog()); + $this->log('Agi dir: ' . $variables->getDirectoryAgi()); + $this->log('Key dir: ' . $variables->getDirectoryKey()); + $this->log('Run dir: ' . $variables->getDirectoryRun()); + $this->log('Request: ' . $variables->getRequest()); + $this->log('Channel: ' . $variables->getChannel()); + $this->log('Language: ' . $variables->getLanguage()); + $this->log('Type: ' . $variables->getType()); + $this->log('UniqueId: ' . $variables->getUniqueId()); + $this->log('Version: ' . $variables->getVersion()); + $this->log('CallerId: ' . $variables->getCallerId()); + $this->log('CallerId name: ' . $variables->getCallerIdName()); + $this->log('CallerId pres: ' . $variables->getCallingPres()); + $this->log('CallingAni2: ' . $variables->getCallingAni2()); + $this->log('CallingTon: ' . $variables->getCallingTon()); + $this->log('CallingTNS: ' . $variables->getCallingTns()); + $this->log('DNID: ' . $variables->getDNID()); + $this->log('RDNIS: ' . $variables->getRDNIS()); + $this->log('Context: ' . $variables->getContext()); + $this->log('Extension: ' . $variables->getDNIS()); + $this->log('Priority: ' . $variables->getPriority()); + $this->log('Enhanced: ' . $variables->getEnhanced()); + $this->log('AccountCode: ' . $variables->getAccountCode()); + $this->log('ThreadId: ' . $variables->getThreadId()); + $this->log('Arguments: ' . intval($variables->getTotalArguments())); + for ($i = 0; $i < $variables->getTotalArguments(); $i++) { + $this->log(' -- Argument ' . intval($i) . ': ' . $variables->getArgument($i)); + } + + $result = $client->sayDigits('12345', '12#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say digits.'); + } + + $result = $client->sayNumber('12345', '12#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say number.'); + } + + $result = $client->getData('/var/lib/asterisk/sounds/welcome', 10000, 4); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for get data with: ' . $result->getDigits()); + } + + $result = $client->getOption('/var/lib/asterisk/sounds/welcome', '0123456789*#', 10000); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for get option.'); + } + + $result = $client->streamFile('/var/lib/asterisk/sounds/welcome', '#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for stream file.'); + } + + $this->log('Channel status: ' . ChannelStatus::toString($client->channelStatus())); + $this->log('Channel status: ' . ChannelStatus::toString($client->channelStatus($variables->getChannel()))); + $this->log('Variable: ' . $client->getVariable('EXTEN')); + $this->log('FullVariable: ' . $client->getFullVariable('EXTEN')); + $cdr = $client->getCDR(); + $this->log('CDRVariable: ' . $cdr->getSource()); + $cdr->setAccountCode('foo'); + $this->log('CDRVariable: ' . $cdr->getAccountCode()); + + $callerId = $client->getCallerId(); + $this->log('CallerID: ' . $callerId); + $callerId->setName('pepe'); + $this->log('CallerID: ' . $callerId); + $client->setCallerId('foo', '123123'); + $this->log('CallerID: ' . $callerId); + + //$this->log($client->exec('Dial', array('SIP/sip', 30, 'r'))); + $this->log($client->dial('SIP/01', array(30, 'r'))); + + $result = $client->sayPhonetic('marcelog', '123#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say phonetic.'); + } + + $result = $client->sayAlpha('marcelog', '123#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say alpha.'); + } + + $result = $client->sayTime(time(), '123#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say time.'); + } + + $result = $client->sayDateTime(time(), 'mdYHMS', '123#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say datetime.'); + } + + $result = $client->sayDate(time(), '123#'); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for say date.'); + } + + $client->setPriority(1000); + $client->setExtension(1000); + $client->setContext('foo'); + $client->setMusic(true); + sleep(10); + $client->setMusic(false); + + $result = $client->waitDigit(10000); + if (!$result->isTimeout()) { + $this->log('Read: ' . $result->getDigits()); + } else { + $this->log('Timeouted for waitdigit.'); + } + $result = $client->record('/tmp/asd', 'wav', '#'); + if ($result->isInterrupted()) { + if ($result->isHangup()) { + $this->log('hangup when recording.'); + } else { + $this->log('interrupted with: ' . $result->getDigits()); + } + $this->log('Recorded: ' . $result->getEndPos()); + } + //$this->log($client->databaseGet('SIP', 'Registry')); + //$client->setAutoHangup(10); + //sleep(20); + } + + /** + * (non-PHPdoc) + * @see \PAGI\Application\PAGIApplication::errorHandler() + */ + public function errorHandler($type, $message, $file, $line) + { + $this->log( + 'ErrorHandler: ' + . implode(' ', array($type, $message, $file, $line)) + ); + } + + /** + * (non-PHPdoc) + * @see \PAGI\Application\PAGIApplication::signalHandler() + */ + public function signalHandler($signal) + { + $this->log('SignalHandler got signal: ' . $signal); + $this->shutdown(); + exit(0); + } +} diff --git a/doc/examples/asyncagi12/example.php b/doc/examples/asyncagi12/example.php new file mode 100644 index 000000000..0ce95d0f6 --- /dev/null +++ b/doc/examples/asyncagi12/example.php @@ -0,0 +1,142 @@ + + * @license http://www.noneyet.ar/ Apache License 2.0 + * @version SVN: $Id$ + * @link http://www.noneyet.ar/ + * + * Copyright 2011 Marcelo Gornstein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +if ($argc != 7) { + echo "Use: $argv[0] "; + exit (254); +} + +require(implode(DIRECTORY_SEPARATOR, array( + __DIR__, + '..', + '..', + '..', + 'vendor', + 'autoload.php' +))); + +date_default_timezone_set('America/Buenos_Aires'); +//////////////////////////////////////////////////////////////////////////////// +// Mandatory stuff to bootstrap. +//////////////////////////////////////////////////////////////////////////////// +use PAMI\Client\Impl\ClientImpl; +use PAMI\Listener\IEventListener; +use PAMI\Message\Event\EventMessage; + +require_once __DIR__ . '/MyPAGIApplication.php'; + +class ListenerTest implements IEventListener +{ + private $_client; + private $_id; + private $_pamiOptions; + + public function handle(EventMessage $event) + { + if ($event instanceof \PAMI\Message\Event\AsyncAGIStartEvent) { + switch ($pid = pcntl_fork()) { + case 0: + $this->_client = new ClientImpl($this->_pamiOptions); + $this->_client->open(); + $agi = new \PAMI\AsyncAgi\AsyncClientImpl(array( + 'pamiClient' => $this->_client, + 'asyncAgiEvent' => $event + )); + $app = new MyPAGIApplication(array( + 'pagiClient' => $agi + )); + $app->init(); + $app->run(); + //$agi->indicateProgress(); + //$agi->answer(); + //$agi->streamFile('welcome'); + //$agi->playCustomTones(array("425/50","0/50")); + //sleep(5); + //$agi->indicateCongestion(10); + //$agi->hangup(); + + // if you want to return control to dialplan after AGI(agi:async) uncomment next line + //$agi->asyncBreak(); + + $this->_client->close(); + echo "Application finished\n"; + exit(0); + break; + case -1: + echo "Could not fork application\n"; + break; + default: + echo "Forked Application\n"; + break; + } + } + } + public function run() + { + $this->_client->open(); + while(true) + { + usleep(1000); + $this->_client->process(); + pcntl_wait($status); + } + $this->_client->close(); + } + public function __construct(array $pamiOptions) + { + $this->_pamiOptions = $pamiOptions; + $this->_client = new ClientImpl($pamiOptions); + $this->_id = $this->_client->registerEventListener($this); + } +} +//////////////////////////////////////////////////////////////////////////////// +// Code STARTS. +//////////////////////////////////////////////////////////////////////////////// +error_reporting(E_ALL); +ini_set('display_errors', 1); + +try +{ + $options = array( + 'log4php.properties' => realpath(__DIR__) . DIRECTORY_SEPARATOR . 'log4php.properties', + 'host' => $argv[1], + 'port' => $argv[2], + 'username' => $argv[3], + 'secret' => $argv[4], + 'connect_timeout' => $argv[5], + 'read_timeout' => $argv[6], + 'scheme' => 'tcp://' // try tls:// + ); + $listener = new ListenerTest($options); + $listener->run(); +} catch (Exception $e) { + echo $e->getMessage() . "\n"; +} +//////////////////////////////////////////////////////////////////////////////// +// Code ENDS. +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php b/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php new file mode 100644 index 000000000..6f1399dc9 --- /dev/null +++ b/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php @@ -0,0 +1,29 @@ +agiClient; + } +} \ No newline at end of file diff --git a/src/PAMI/AsyncAgi/AsyncClientImpl.php b/src/PAMI/AsyncAgi/AsyncClientImpl.php index fdf8ac5e1..9b8391d1a 100644 --- a/src/PAMI/AsyncAgi/AsyncClientImpl.php +++ b/src/PAMI/AsyncAgi/AsyncClientImpl.php @@ -27,12 +27,11 @@ */ namespace PAMI\AsyncAgi; -use PAMI\Client\IClient as PamiClient; use PAGI\Client\AbstractClient as PagiClient; +use PAMI\AsyncAgi\Event\IAsyncAgiExecEvent; +use PAMI\AsyncAgi\Event\IAsyncAgiStartEvent; use PAMI\Listener\IEventListener; use PAMI\Message\Event\EventMessage; -use PAGI\Client\Result\Result; -use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; /** @@ -46,7 +45,7 @@ * @license http://marcelog.github.com/PAMI/ Apache License 2.0 * @link http://marcelog.github.com/PAMI/ */ -class AsyncClientImpl extends PagiClient implements IEventListener +class AsyncClientImpl extends PagiClient implements IEventListener, IAsyncClient { /** * The pami client to be used. @@ -55,7 +54,7 @@ class AsyncClientImpl extends PagiClient implements IEventListener private $pamiClient; /** * The event that originated this async agi request. - * @var \PAMI\Message\Event\AsyncAGIEvent + * @var IAsyncAgiStartEvent */ private $asyncAgiEvent; /** @@ -91,7 +90,7 @@ class AsyncClientImpl extends PagiClient implements IEventListener */ public function handle(EventMessage $event) { - if ($event instanceof \PAMI\Message\Event\AsyncAGIEvent) { + if ($event instanceof IAsyncAgiExecEvent) { if ($event->getCommandId() == $this->lastCommandId) { $this->lastAgiResult = trim($event->getResult()); } @@ -167,4 +166,14 @@ public function __construct(array $options = array()) $this->asyncAgiEvent = $options['asyncAgiEvent']; $this->open(); } + + + /** + * (non-PHPdoc) + * @see IAsyncClient::asyncBreak() + */ + public function asyncBreak() + { + $this->send('ASYNCAGI BREAK'); + } } diff --git a/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php b/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php new file mode 100644 index 000000000..2d0df838a --- /dev/null +++ b/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php @@ -0,0 +1,37 @@ +getKey('Uniqueid'); } + /** + * @deprecated + * @use AsyncAGIStartEvent::getEnvironment() + * @return string + */ + public function getEnv() + { + return $this->getEnvironment(); + } + /** * Returns key: 'Env'. * * @return string */ - public function getEnv() + public function getEnvironment() { return $this->getKey('Env'); } From 657d59f74a56c7653e564c80efb1fe55cf357e78 Mon Sep 17 00:00:00 2001 From: "i.badamshin" Date: Wed, 27 Sep 2017 16:54:28 +0300 Subject: [PATCH 2/4] fix access laval --- src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php b/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php index 6f1399dc9..461dfaedb 100644 --- a/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php +++ b/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php @@ -15,7 +15,7 @@ abstract class PAGIAsyncApplication extends PAGIApplication * AGI Client. * @var IAsyncClient */ - private $agiClient; + protected $agiClient; /** * Returns AGI Client. From d6628293b0eabf9dc2c1a99bc3821761efbe4fce Mon Sep 17 00:00:00 2001 From: "i.badamshin" Date: Thu, 28 Sep 2017 17:46:16 +0300 Subject: [PATCH 3/4] fix code style --- src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php | 2 +- src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php | 3 +-- src/PAMI/AsyncAgi/Event/IAsyncAgiStartEvent.php | 2 +- src/PAMI/AsyncAgi/IAsyncClient.php | 3 +-- src/PAMI/Message/Event/AsyncAGIEvent.php | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php b/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php index 461dfaedb..82352feb8 100644 --- a/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php +++ b/src/PAMI/AsyncAgi/Application/PAGIAsyncApplication.php @@ -26,4 +26,4 @@ public function getAgi() { return $this->agiClient; } -} \ No newline at end of file +} diff --git a/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php b/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php index 2d0df838a..45ba6c422 100644 --- a/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php +++ b/src/PAMI/AsyncAgi/Event/IAsyncAgiExecEvent.php @@ -33,5 +33,4 @@ public function getCommandID(); * @return string */ public function getResult(); - -} \ No newline at end of file +} diff --git a/src/PAMI/AsyncAgi/Event/IAsyncAgiStartEvent.php b/src/PAMI/AsyncAgi/Event/IAsyncAgiStartEvent.php index 29a5bf99a..1d663b4d7 100644 --- a/src/PAMI/AsyncAgi/Event/IAsyncAgiStartEvent.php +++ b/src/PAMI/AsyncAgi/Event/IAsyncAgiStartEvent.php @@ -27,4 +27,4 @@ public function getChannel(); * @return string */ public function getEnvironment(); -} \ No newline at end of file +} diff --git a/src/PAMI/AsyncAgi/IAsyncClient.php b/src/PAMI/AsyncAgi/IAsyncClient.php index 56cacd89b..2461d1270 100644 --- a/src/PAMI/AsyncAgi/IAsyncClient.php +++ b/src/PAMI/AsyncAgi/IAsyncClient.php @@ -2,7 +2,6 @@ namespace PAMI\AsyncAgi; - use PAGI\Client\IClient; /** @@ -18,4 +17,4 @@ interface IAsyncClient extends IClient * @return void */ public function asyncBreak(); -} \ No newline at end of file +} diff --git a/src/PAMI/Message/Event/AsyncAGIEvent.php b/src/PAMI/Message/Event/AsyncAGIEvent.php index 5252a9e33..d05226f14 100644 --- a/src/PAMI/Message/Event/AsyncAGIEvent.php +++ b/src/PAMI/Message/Event/AsyncAGIEvent.php @@ -44,7 +44,7 @@ * @license http://marcelog.github.com/PAMI/ Apache License 2.0 * @link http://marcelog.github.com/PAMI/ */ -class AsyncAGIEvent extends EventMessage implements IAsyncAgiExecEvent,IAsyncAgiStartEvent +class AsyncAGIEvent extends EventMessage implements IAsyncAgiExecEvent, IAsyncAgiStartEvent { /** * Returns key: 'Privilege'. From efb57485a009ff71c0b8d7832fb738146d4b652a Mon Sep 17 00:00:00 2001 From: Timur Date: Fri, 24 Nov 2017 17:29:19 +0300 Subject: [PATCH 4/4] add confbridge and pjsip actions --- .../Message/Action/ConfbridgeKickAction.php | 22 +++++++++++++++++++ .../Message/Action/ConfbridgeLockAction.php | 14 ++++++++++++ .../Message/Action/ConfbridgeUnlockAction.php | 14 ++++++++++++ .../Action/PJSIPShowEndpointAction.php | 14 ++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 src/PAMI/Message/Action/ConfbridgeKickAction.php create mode 100644 src/PAMI/Message/Action/ConfbridgeLockAction.php create mode 100644 src/PAMI/Message/Action/ConfbridgeUnlockAction.php create mode 100644 src/PAMI/Message/Action/PJSIPShowEndpointAction.php diff --git a/src/PAMI/Message/Action/ConfbridgeKickAction.php b/src/PAMI/Message/Action/ConfbridgeKickAction.php new file mode 100644 index 000000000..84f26ee33 --- /dev/null +++ b/src/PAMI/Message/Action/ConfbridgeKickAction.php @@ -0,0 +1,22 @@ +setKey('Channel', $channel); + } + + /** + * @param string $conference + */ + public function __construct($conference) + { + parent::__construct('ConfbridgeKick'); + $this->setKey('Conference', $conference); + } +} diff --git a/src/PAMI/Message/Action/ConfbridgeLockAction.php b/src/PAMI/Message/Action/ConfbridgeLockAction.php new file mode 100644 index 000000000..347a18a35 --- /dev/null +++ b/src/PAMI/Message/Action/ConfbridgeLockAction.php @@ -0,0 +1,14 @@ +setKey('Conference', $conference); + } +} diff --git a/src/PAMI/Message/Action/ConfbridgeUnlockAction.php b/src/PAMI/Message/Action/ConfbridgeUnlockAction.php new file mode 100644 index 000000000..3de2befd0 --- /dev/null +++ b/src/PAMI/Message/Action/ConfbridgeUnlockAction.php @@ -0,0 +1,14 @@ +setKey('Conference', $conference); + } +} diff --git a/src/PAMI/Message/Action/PJSIPShowEndpointAction.php b/src/PAMI/Message/Action/PJSIPShowEndpointAction.php new file mode 100644 index 000000000..6428cefda --- /dev/null +++ b/src/PAMI/Message/Action/PJSIPShowEndpointAction.php @@ -0,0 +1,14 @@ +setKey('Endpoint', $endpoint); + } +}