コード例 #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);
 }
コード例 #2
0
ファイル: ReloadAction.php プロジェクト: josefd8/dashboardWeb
 /**
  * Constructor.
  *
  * @param string $module
  *        	Optional module name.
  *        	
  * @return void
  */
 public function __construct($module = false)
 {
     parent::__construct('Reload');
     if ($module !== false) {
         $this->setKey('Module', $module);
     }
 }
コード例 #3
0
ファイル: StatusAction.php プロジェクト: excelwebzone/pastum
 /**
  * Constructor.
  *
  * @param string $channel Channel to query (optional)
  */
 public function __construct($channel = false)
 {
     parent::__construct('Status');
     if ($channel !== false) {
         $this->setKey('Channel', $channel);
     }
 }
コード例 #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);
     }
 }
コード例 #5
0
ファイル: BridgeAction.php プロジェクト: rs-orlov/PAMI
 /**
  * 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');
 }
コード例 #6
0
ファイル: JabberSendAction.php プロジェクト: rs-orlov/PAMI
 /**
  * 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);
 }
コード例 #7
0
ファイル: DongleSendSMSAction.php プロジェクト: bit0rez/PAMI
 /**
  * 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);
 }
コード例 #8
0
ファイル: DBPutAction.php プロジェクト: josefd8/dashboardWeb
 /**
  * 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);
 }
コード例 #9
0
ファイル: BlindTransferAction.php プロジェクト: marcelog/pami
 /**
  * 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);
 }
コード例 #10
0
 /**
  * Constructor.
  *
  * @param string $rule Rule
  */
 public function __construct($rule = false)
 {
     parent::__construct('QueueRule');
     if ($rule !== false) {
         $this->setKey('Rule', $rule);
     }
 }
コード例 #11
0
ファイル: UserEventAction.php プロジェクト: marcelog/pami
 /**
  * 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);
     }
 }
コード例 #12
0
ファイル: AttendedTransferAction.php プロジェクト: alesf/PAMI
 /**
  * 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);
 }
コード例 #13
0
ファイル: GetVarAction.php プロジェクト: rs-orlov/PAMI
 /**
  * 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);
     }
 }
コード例 #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);
     }
 }
コード例 #15
0
ファイル: MonitorAction.php プロジェクト: alesf/PAMI
 /**
  * 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);
 }
コード例 #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);
     }
 }
コード例 #17
0
ファイル: HangupAction.php プロジェクト: marcelog/pami
 /**
  * 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);
     }
 }
コード例 #18
0
ファイル: AGIAction.php プロジェクト: bit0rez/PAMI
 /**
  * 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);
     }
 }
コード例 #19
0
ファイル: LoginAction.php プロジェクト: marcelog/pami
 /**
  * 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);
     }
 }
コード例 #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);
     }
 }
コード例 #21
0
ファイル: EventsAction.php プロジェクト: alesf/PAMI
 /**
  * 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));
     }
 }
コード例 #22
0
ファイル: QueueStatusAction.php プロジェクト: alesf/PAMI
 /**
  * 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);
     }
 }
コード例 #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');
 }
コード例 #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);
     }
 }
コード例 #25
0
ファイル: QueuePauseAction.php プロジェクト: rs-orlov/PAMI
 /**
  * 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');
 }
コード例 #26
0
ファイル: ParkAction.php プロジェクト: alesf/PAMI
 /**
  * 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);
     }
 }
コード例 #27
0
ファイル: DBDelAction.php プロジェクト: rs-orlov/PAMI
 /**
  * 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);
 }
コード例 #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);
 }
コード例 #29
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct('DAHDIShowChannels');
 }
コード例 #30
0
 /**
  * Constructor.
  *
  * @param string $module Module name
  */
 public function __construct($module)
 {
     parent::__construct('ModuleCheck');
     $this->setKey('Module', $module);
 }