Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param string $module
  *        	Optional module name.
  *        	
  * @return void
  */
 public function __construct($module = false)
 {
     parent::__construct('Reload');
     if ($module !== false) {
         $this->setKey('Module', $module);
     }
 }
Ejemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param string $channel Channel to query (optional)
  */
 public function __construct($channel = false)
 {
     parent::__construct('Status');
     if ($channel !== false) {
         $this->setKey('Channel', $channel);
     }
 }
Ejemplo n.º 4
0
 /**
  * Constructor.
  *
  * @param string $queue
  *        	Queue name.
  *        	
  * @return void
  */
 public function __construct($queue = false)
 {
     parent::__construct('QueueReset');
     if ($queue !== false) {
         $this->setKey('Queue', $queue);
     }
 }
Ejemplo n.º 5
0
 /**
  * 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');
 }
Ejemplo n.º 6
0
 /**
  * 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);
 }
Ejemplo n.º 7
0
 /**
  * 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);
 }
Ejemplo n.º 8
0
 /**
  * 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);
 }
Ejemplo n.º 9
0
 /**
  * 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);
 }
Ejemplo n.º 10
0
 /**
  * Constructor.
  *
  * @param string $rule Rule
  */
 public function __construct($rule = false)
 {
     parent::__construct('QueueRule');
     if ($rule !== false) {
         $this->setKey('Rule', $rule);
     }
 }
Ejemplo n.º 11
0
 /**
  * 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);
     }
 }
Ejemplo n.º 12
0
 /**
  * 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);
 }
Ejemplo n.º 13
0
 /**
  * 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);
     }
 }
Ejemplo n.º 14
0
 /**
  * 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);
     }
 }
Ejemplo n.º 15
0
 /**
  * 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);
 }
Ejemplo n.º 16
0
 /**
  * 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);
     }
 }
Ejemplo n.º 17
0
 /**
  * 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);
     }
 }
Ejemplo n.º 18
0
 /**
  * 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);
     }
 }
Ejemplo n.º 19
0
 /**
  * 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);
     }
 }
Ejemplo n.º 20
0
 /**
  * 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);
     }
 }
Ejemplo n.º 21
0
 /**
  * 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));
     }
 }
Ejemplo n.º 22
0
 /**
  * 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);
     }
 }
Ejemplo n.º 23
0
 /**
  * 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');
 }
Ejemplo n.º 24
0
 /**
  * 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);
     }
 }
Ejemplo n.º 25
0
 /**
  * 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');
 }
Ejemplo n.º 26
0
 /**
  * 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);
     }
 }
Ejemplo n.º 27
0
 /**
  * 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);
 }
Ejemplo n.º 28
0
 /**
  * Constructor.
  *
  * @param string $channel The channel name to optimize away.
  *
  * @return void
  */
 public function __construct($channel)
 {
     parent::__construct('LocalOptimizeAway');
     $this->setKey('Channel', $channel);
 }
Ejemplo n.º 29
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct('DAHDIShowChannels');
 }
Ejemplo n.º 30
0
 /**
  * Constructor.
  *
  * @param string $module Module name
  */
 public function __construct($module)
 {
     parent::__construct('ModuleCheck');
     $this->setKey('Module', $module);
 }