/** * Constructor. * * @param string $channel Channel on which to act. * @param bool $state Turn mute on or off * @param string $direction Which part of the recording to mute: * read, write or both (from channel, to channel or both channels). */ public function __construct($channel, $state = true, $direction = 'both') { parent::__construct('MixMonitorMute'); $this->setKey('Channel', $channel); $this->setState($state); $this->setDirection($direction); }
/** * Constructor. * * @param string $module * Optional module name. * * @return void */ public function __construct($module = false) { parent::__construct('Reload'); if ($module !== false) { $this->setKey('Module', $module); } }
/** * Constructor. * * @param string $channel Channel to query (optional) */ public function __construct($channel = false) { parent::__construct('Status'); if ($channel !== false) { $this->setKey('Channel', $channel); } }
/** * Constructor. * * @param string $queue * Queue name. * * @return void */ public function __construct($queue = false) { parent::__construct('QueueReset'); if ($queue !== false) { $this->setKey('Queue', $queue); } }
/** * Constructor. * * @param string $channel1 Channel1 * @param string $channel1 Channel1 * @param boolean $tone Play courtesy tone to Channel2 * * @return void */ public function __construct($channel1, $channel2, $tone = false) { parent::__construct('Bridge'); $this->setKey('Channel1', $channel1); $this->setKey('Channel2', $channel2); $this->setKey('Tone', $tone ? 'true' : 'false'); }
/** * Constructor. * * @param string $jabber Client or transport Asterisk uses to connect to JABBER. * @param string $jid XMPP/Jabber JID (Name) of recipient. * @param string $message Message to be sent to the buddy. * * @return void */ public function __construct($jabber, $jid, $message) { parent::__construct('JabberSend'); $this->setKey('Jabber', $jabber); $this->setKey('JID', $jid); $this->setKey('Message', $message); }
/** * Constructor. * * @param string $device Device name (like dongle01). * @param string $number Destination number. * @param string $message What to send. * * @return void */ public function __construct($device, $number, $message) { parent::__construct('DongleSendSMS'); $this->setKey('Device', $device); $this->setKey('Number', $number); $this->setKey('Message', $message); }
/** * Constructor. * * @param string $family * Family. * @param string $key * Name. * @param string $value * Value. * * @return void */ public function __construct($family, $key, $value) { parent::__construct('DBPut'); $this->setKey('Family', $family); $this->setKey('Key', $key); $this->setKey('Val', $value); }
/** * Constructor. * * @param string $channel Transferer's channel. * @param string $extension Extension to transfer to. * @param string $context Context to transfer to. */ public function __construct($channel, $extension, $context) { parent::__construct('BlindTransfer'); $this->setKey('Channel', $channel); $this->setKey('Exten', $extension); $this->setKey('Context', $context); }
/** * Constructor. * * @param string $rule Rule */ public function __construct($rule = false) { parent::__construct('QueueRule'); if ($rule !== false) { $this->setKey('Rule', $rule); } }
/** * Constructor. * * @param string $userEvent UserEvent * @param array $headers */ public function __construct($userEvent, array $headers = []) { parent::__construct('UserEvent'); $this->setKey('UserEvent', $userEvent); foreach ($headers as $key => $value) { $this->setKey((string) $key, (string) $value); } }
/** * Constructor. * * @param string $channel Transferer's channel. * @param string $extension Extension to transfer to. * @param string $context Context to transfer to. * @param string $priority Priority to transfer to. * * @return void */ public function __construct($channel, $extension, $context, $priority) { parent::__construct('Atxfer'); $this->setKey('Channel', $channel); $this->setKey('Exten', $extension); $this->setKey('Context', $context); $this->setKey('Priority', $priority); }
/** * Constructor. * * @param string $name Variable name. * @param string $channel Optional channel name. * * @return void */ public function __construct($name, $channel = false) { parent::__construct('Getvar'); $this->setKey('Variable', $name); if ($channel != false) { $this->setKey('Channel', $channel); } }
/** * Constructor. * * @param string $filename Configuration filename (e.g.: foo.conf) * @param Boolean $category Category in configuration file */ public function __construct($filename, $category = false) { parent::__construct('GetConfig'); $this->setKey('Filename', $filename); if ($category != false) { $this->setKey('Category', $category); } }
/** * Constructor. * * @param string $channel Channel to monitor. * @param string $filename Absolute path to target filename. * * @return void */ public function __construct($channel, $filename) { parent::__construct('Monitor'); $this->setKey('Channel', $channel); $this->setKey('Mix', 'true'); $this->setKey('Format', 'wav'); $this->setKey('File', $filename); }
/** * Constructor. * * @param string $family * Family. * @param string $key * Name (optional) * * @return void */ public function __construct($family, $key = false) { parent::__construct('DBDelTree'); $this->setKey('Family', $family); if ($key != false) { $this->setKey('Key', $key); } }
/** * Constructor. * * @param string $channel Channel to hangup. * @param int $cause Hangup cause. * * @return void */ public function __construct($channel, $cause = null) { parent::__construct('Hangup'); $this->setKey('Channel', $channel); if (null !== $cause) { $this->setKey('Cause', $cause); } }
/** * Constructor. * * @return void */ public function __construct($channel, $command, $commandId = false) { parent::__construct('AGI'); $this->setKey('Channel', $channel); $this->setKey('Command', $command); if ($commandId !== false) { $this->setKey('CommandId', $commandId); } }
/** * Constructor. * * @param string $user AMI username. * @param string $password AMI password. * @param string|null $eventMask * * @return void */ public function __construct($user, $password, $eventMask = null) { parent::__construct('Login'); $this->setKey('Username', $user); $this->setKey('Secret', $password); if (null !== $eventMask) { $this->setKey('Events', $eventMask); } }
/** * Constructor. * * @param string $queue * Queue name. * @param string $event * Event. * * @return void */ public function __construct($interface, $penalty, $queue = false) { parent::__construct('QueuePenalty'); $this->setKey('Interface', $interface); $this->setKey('Penalty', $penalty); if ($queue !== false) { $this->setKey('Queue', $queue); } }
/** * Constructor. * * @param string[] $mask Asterisk events to handle (system, call, log, etc). * * @return void */ public function __construct(array $mask = array()) { parent::__construct('Events'); if (empty($mask)) { $this->setKey('EventMask', 'off'); } else { $this->setKey('EventMask', implode(',', $mask)); } }
/** * Constructor. * * @param string $queue The queue (optional). * * @return void */ public function __construct($queue = false, $member = false) { parent::__construct('QueueStatus'); if ($queue != false) { $this->setKey('Queue', $queue); } if ($member != false) { $this->setKey('Member', $member); } }
/** * Constructor. * * @param string $queue * Queue name. * @param boolean $members * Reload members. * @param boolean $rules * Reload rules. * @param boolean $parameters * Reload parameters. * * @return void */ public function __construct($queue = false, $members = false, $rules = false, $parameters = false) { parent::__construct('QueueReload'); if ($queue !== false) { $this->setKey('Queue', $queue); } $this->setKey('Members', $members ? 'yes' : 'no'); $this->setKey('Rules', $rules ? 'yes' : 'no'); $this->setKey('Parameters', $parameters ? 'yes' : 'no'); }
/** * Constructor. * * @param string $context * Show a specific context (optional) * @param string $extension * Show a specific extension (optional) * * @return void */ public function __construct($context = false, $extension = false) { parent::__construct('ShowDialPlan'); if ($context != false) { $this->setKey('Context', $context); } if ($extension != false) { $this->setKey('Extension', $extension); } }
/** * Constructor. * * @return void */ public function __construct($interface, $queue = false, $reason = false) { parent::__construct('QueuePause'); if ($queue !== false) { $this->setKey('Queue', $queue); } if ($reason !== false) { $this->setKey('Reason', $reason); } $this->setKey('Interface', $interface); $this->setKey('Paused', 'true'); }
/** * Constructor. * * @param string $channel1 Channel name to park. * @param string $channel2 Channel to announce park info to (and return to if timeout). * @param integer $timeout Number of milliseconds to wait before callback. * @param string $lot Parking lot to park channel in. * * @return void */ public function __construct($channel1, $channel2, $timeout = false, $lot = false) { parent::__construct('Park'); $this->setKey('Channel', $channel1); $this->setKey('Channel2', $channel2); if ($timeout != false) { $this->setKey('Timeout', $timeout); } if ($lot != false) { $this->setKey('Parkinglot', $lot); } }
/** * Constructor. * * @param string $family Family. * @param string $key Name. * * @return void */ public function __construct($family, $key) { parent::__construct('DBDel'); $this->setKey('Family', $family); $this->setKey('Key', $key); }
/** * Constructor. * * @param string $channel The channel name to optimize away. * * @return void */ public function __construct($channel) { parent::__construct('LocalOptimizeAway'); $this->setKey('Channel', $channel); }
/** * Constructor. */ public function __construct() { parent::__construct('DAHDIShowChannels'); }
/** * Constructor. * * @param string $module Module name */ public function __construct($module) { parent::__construct('ModuleCheck'); $this->setKey('Module', $module); }