2a8fd711 by Manish Mihsra

Added Master's Pami and Updated Code as Per Blind Transfer

1 parent 5435bb9e
Showing 44 changed files with 4719 additions and 20 deletions
......@@ -20,6 +20,7 @@ use PAMI\Message\Event\UnknownEvent;
use PAMI\Message\Event\DialBeginEvent;
use PAMI\Message\Event\DialEndEvent;
use PAMI\Message\Event\BlindTransferEvent;
use PAMI\Message\Event\AttendedTransferEvent;
use PAMI\Message\Action\AGIAction;
use PAMI\Message\Action\SIPNotifyAction;
......@@ -33,6 +34,8 @@ use PAMI\Message\Action\RedirectAction;
use PAMI\Message\Action\ConfbridgeMuteAction;
use PAMI\Message\Action\ConfbridgeUnmuteAction;
use PAMI\Message\Action\ActionMessage;
use PAMI\Message\Action\AttendedTransferAction;
use PAMI\Message\Action\BlindTransferAction;
use App\Models\Sipid;
use App\Models\User;
......@@ -782,7 +785,7 @@ class KPAMIListen implements IEventListener
$duniqueid=$event->getKey("DestUniqueid");
$dialstatus=$event->getKey("DialStatus");
Log::info($accountcode);
if($accountcode!="")
{
//echo "$accountcode:Unknown : $eventname $channelstate:$channelstatedesc $uniqueid $exten:$priority $channel\n";
......@@ -819,7 +822,7 @@ class KPAMIListen implements IEventListener
$dialline=Dialline::find($crmcall->dialline_id);
if($dialline)
{
$dialline->channel=$dchannel;
$dialline->channel=$channel;
$dialline->save();
}
......@@ -887,10 +890,10 @@ class KPAMIListen implements IEventListener
$dialline=Dialline::find($crmcall->dialline_id);
if($dialline && $dialstatus=="ANSWER")
{
$tsip=Sipid::find($crmcall->sipid_id);
// $tsip=Sipid::find($crmcall->sipid_id);
$newqueue=new Kqueue();
$newqueue->channelRedirectToExten($tsip->server,$dchannel,"1004".$tsip->id,"confTransfer","1");
// $newqueue=new Kqueue();
// $newqueue->channelRedirectToExten($tsip->server,$dchannel,"1004".$tsip->id."|".$dialline->channel,"confTransfer","1");
$dialline->channel=$dchannel;
$dialline->uniqueid=$uniqueid;
......@@ -914,6 +917,11 @@ class KPAMIListen implements IEventListener
Log::info("BlindTransferEvent");
}
private function AttendedTransferEvent(EventMessage $event)
{
Log::info(var_export($event));
}
private function UnknownEvent(EventMessage $event)
{
$eventname=$event->getKey("Event");
......@@ -1758,6 +1766,11 @@ if($crmcall->did=='46130234'){
$redirect=new RedirectAction($data['fromext'], $data['toext'], $data['context'], 1);
$res=$this->_client->send($redirect);
}
else if($tqueue->key=="transfer")
{
$blindtransferaction=new BlindTransferAction($data['channel'],$data['exten'],$data['context']);
$res=$this->_client->send($blindtransferaction);
}
$tqueue->delete();
}
......
......@@ -78,18 +78,24 @@ class Kqueue extends Model{
if($server != '')
{
$odata=array();$odata['VARS']=array();
$odata['fromext']="Local/1000".$sipid->id."@kstychDialer";
/*$odata['fromext']="Local/1000".$sipid->id."@kstychDialer";
$odata['context']="initiateTransfer";
$odata['callerid']=$channel;
$odata['toext']="1003".$callnumber;
$odata['account']='m|t|'.$crmcall->id;
$odata['VARS']['dialstr']=$dialstr;
$odata['VARS']['chnl']=$channel;
$odata['VARS']['callnumber']=$callnumber;
$odata['VARS']['callnumber']=$callnumber;*/
$odata['channel']=$channel;
$odata['exten']="1003".$callnumber;
$odata['context']="initiateTransfer";
$odata['priority']=1;
//originate conf
$this->type="SIP_".$server;
$this->key="originate";
$this->key="transfer";
$this->status="New";
$this->data=json_encode($odata);
$this->save();
......
......@@ -114,8 +114,19 @@ can still catch them. If you catch one of these, please report it!
* AGIExec
* AsyncAGI
* Bridge
* BridgeInfoChannel
* BridgeInfoComplete
* CEL
* ChannelUpdate
* ConfbridgeEnd
* ConfbridgeJoin
* ConfbridgeLeave
* ConfbridgeList
* ConfbridgeListComplete
* ConfbridgeMute
* ConfbridgeStart
* ConfbridgeTalking
* ConfbridgeUnmute
* CoreShowChannel
* CoreShowChannelComplete
* DAHDIShowChannel
......@@ -192,8 +203,10 @@ can still catch them. If you catch one of these, please report it!
* AgentLogoff
* Atxfer (asterisk 1.8?)
* Bridge
* BridgeInfo
* ChangeMonitor
* Command
* ConfbridgeList
* ConfbridgeMute
* ConfbridgeUnmute
* CoreSettings
......
......@@ -25,7 +25,7 @@
</target>
<target name="cpd">
<exec command="vendor/bin/phpcpd --fuzzy src"
<exec command="vendor/bin/phpcpd --fuzzy src --exclude PAMI/Message/Event"
checkreturn="true"
passthru="true"/>
</target>
......
PAMI\Message\Action\BridgeInfoAction
===============
Returns detailed information about a bridge and the channels in it.
PHP Version 5
* Class name: BridgeInfoAction
* Namespace: PAMI\Message\Action
* Parent class: [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
Constants
----------
### EOL
const EOL = "\r\n"
### EOM
const EOM = "\r\n\r\n"
Properties
----------
### $lines
protected array<mixed,string> $lines
Message content, line by line. This is what it gets sent
or received literally.
* Visibility: **protected**
### $variables
protected array<mixed,string> $variables
Metadata. Message variables (key/value).
* Visibility: **protected**
### $keys
protected array<mixed,string> $keys
Metadata. Message "keys" i.e: Action: login
* Visibility: **protected**
### $createdDate
protected integer $createdDate
Created date (unix timestamp).
* Visibility: **protected**
Methods
-------
### __construct
void PAMI\Message\Message::__construct()
Constructor.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setActionID
void PAMI\Message\Action\ActionMessage::setActionID($actionID)
Sets Action ID.
The ActionID can be at most 69 characters long, according to
[Asterisk Issue 14847](https://issues.asterisk.org/jira/browse/14847).
Therefore we'll throw an exception when the ActionID is too long.
* Visibility: **public**
* This method is defined by [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
#### Arguments
* $actionID **mixed** - &lt;p&gt;The Action ID to have this action known by&lt;/p&gt;
### __sleep
array<mixed,string> PAMI\Message\Message::__sleep()
Serialize function.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getCreatedDate
integer PAMI\Message\Message::getCreatedDate()
Returns created date.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setVariable
void PAMI\Message\Message::setVariable(string $key, string $value)
Adds a variable to this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
* $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
### getVariable
string PAMI\Message\Message::getVariable(string $key)
Returns a variable by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
### setKey
void PAMI\Message\Message::setKey(string $key, string $value)
Adds a variable to this message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
* $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
### getKey
string PAMI\Message\Message::getKey(string $key)
Returns a key by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
### getKeys
array<mixed,string> PAMI\Message\Message::getKeys()
Returns all keys for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getVariables
array<mixed,string> PAMI\Message\Message::getVariables()
Returns all variabels for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### finishMessage
string PAMI\Message\Message::finishMessage($message)
Returns the end of message token appended to the end of a given message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $message **mixed**
### serializeVariable
string PAMI\Message\Message::serializeVariable(string $key, string $value)
Returns the string representation for an ami action variable.
* Visibility: **private**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string**
* $value **string**
### serialize
string PAMI\Message\Message::serialize()
Gives a string representation for this message, ready to be sent to
ami.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getActionID
string PAMI\Message\Message::getActionID()
Returns key: 'ActionID'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
PAMI\Message\Action\ConfbridgeListAction
===============
Lists all users in a particular ConfBridge conference.
PHP Version 5
* Class name: ConfbridgeListAction
* Namespace: PAMI\Message\Action
* Parent class: [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
Constants
----------
### EOL
const EOL = "\r\n"
### EOM
const EOM = "\r\n\r\n"
Properties
----------
### $lines
protected array<mixed,string> $lines
Message content, line by line. This is what it gets sent
or received literally.
* Visibility: **protected**
### $variables
protected array<mixed,string> $variables
Metadata. Message variables (key/value).
* Visibility: **protected**
### $keys
protected array<mixed,string> $keys
Metadata. Message "keys" i.e: Action: login
* Visibility: **protected**
### $createdDate
protected integer $createdDate
Created date (unix timestamp).
* Visibility: **protected**
Methods
-------
### __construct
void PAMI\Message\Message::__construct()
Constructor.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setActionID
void PAMI\Message\Action\ActionMessage::setActionID($actionID)
Sets Action ID.
The ActionID can be at most 69 characters long, according to
[Asterisk Issue 14847](https://issues.asterisk.org/jira/browse/14847).
Therefore we'll throw an exception when the ActionID is too long.
* Visibility: **public**
* This method is defined by [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
#### Arguments
* $actionID **mixed** - &lt;p&gt;The Action ID to have this action known by&lt;/p&gt;
### __sleep
array<mixed,string> PAMI\Message\Message::__sleep()
Serialize function.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getCreatedDate
integer PAMI\Message\Message::getCreatedDate()
Returns created date.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setVariable
void PAMI\Message\Message::setVariable(string $key, string $value)
Adds a variable to this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
* $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
### getVariable
string PAMI\Message\Message::getVariable(string $key)
Returns a variable by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
### setKey
void PAMI\Message\Message::setKey(string $key, string $value)
Adds a variable to this message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
* $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
### getKey
string PAMI\Message\Message::getKey(string $key)
Returns a key by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
### getKeys
array<mixed,string> PAMI\Message\Message::getKeys()
Returns all keys for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getVariables
array<mixed,string> PAMI\Message\Message::getVariables()
Returns all variabels for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### finishMessage
string PAMI\Message\Message::finishMessage($message)
Returns the end of message token appended to the end of a given message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $message **mixed**
### serializeVariable
string PAMI\Message\Message::serializeVariable(string $key, string $value)
Returns the string representation for an ami action variable.
* Visibility: **private**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string**
* $value **string**
### serialize
string PAMI\Message\Message::serialize()
Gives a string representation for this message, ready to be sent to
ami.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getActionID
string PAMI\Message\Message::getActionID()
Returns key: 'ActionID'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
PAMI\Message\Event\BridgeInfoChannelEvent
===============
Event triggered when an action BridgeInfo is issued.
PHP Version 5
* Class name: BridgeInfoChannelEvent
* Namespace: PAMI\Message\Event
* Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
Constants
----------
### EOL
const EOL = "\r\n"
### EOM
const EOM = "\r\n\r\n"
Properties
----------
### $rawContent
protected string $rawContent
Holds original message.
* Visibility: **protected**
### $channelVariables
protected array<mixed,string> $channelVariables
Metadata. Specific channel variables.
* Visibility: **protected**
### $lines
protected array<mixed,string> $lines
Message content, line by line. This is what it gets sent
or received literally.
* Visibility: **protected**
### $variables
protected array<mixed,string> $variables
Metadata. Message variables (key/value).
* Visibility: **protected**
### $keys
protected array<mixed,string> $keys
Metadata. Message "keys" i.e: Action: login
* Visibility: **protected**
### $createdDate
protected integer $createdDate
Created date (unix timestamp).
* Visibility: **protected**
Methods
-------
### getChannel
string PAMI\Message\Event\BridgeInfoChannelEvent::getChannel()
Returns key: 'Channel'.
* Visibility: **public**
### getChannelState
string PAMI\Message\Event\BridgeInfoChannelEvent::getChannelState()
Returns key: 'ChannelState'.
* Visibility: **public**
### getChannelStateDesc
string PAMI\Message\Event\BridgeInfoChannelEvent::getChannelStateDesc()
Returns key: 'ChannelStateDesc'.
* Visibility: **public**
### getCallerIDNum
string PAMI\Message\Event\BridgeInfoChannelEvent::getCallerIDNum()
Returns key: 'CallerIDNum'.
* Visibility: **public**
### getCallerIDName
string PAMI\Message\Event\BridgeInfoChannelEvent::getCallerIDName()
Returns key: 'CallerIDName'.
* Visibility: **public**
### getConnectedLineNum
string PAMI\Message\Event\BridgeInfoChannelEvent::getConnectedLineNum()
Returns key: 'ConnectedLineNum'.
* Visibility: **public**
### getConnectedLineName
string PAMI\Message\Event\BridgeInfoChannelEvent::getConnectedLineName()
Returns key: 'ConnectedLineName'.
* Visibility: **public**
### getAccountCode
string PAMI\Message\Event\BridgeInfoChannelEvent::getAccountCode()
Returns key: 'AccountCode'.
* Visibility: **public**
### getContext
string PAMI\Message\Event\BridgeInfoChannelEvent::getContext()
Returns key: 'Context'.
* Visibility: **public**
### getExten
string PAMI\Message\Event\BridgeInfoChannelEvent::getExten()
Returns key: 'Exten'.
* Visibility: **public**
### getPriority
string PAMI\Message\Event\BridgeInfoChannelEvent::getPriority()
Returns key: 'Priority'.
* Visibility: **public**
### getUniqueid
string PAMI\Message\Event\BridgeInfoChannelEvent::getUniqueid()
Returns key: 'Uniqueid'.
* Visibility: **public**
### getLinkedid
string PAMI\Message\Event\BridgeInfoChannelEvent::getLinkedid()
Returns key: 'Linkedid'.
* Visibility: **public**
### getName
string PAMI\Message\Event\EventMessage::getName()
Returns key 'Event'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
### __sleep
array<mixed,string> PAMI\Message\Message::__sleep()
Serialize function.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getEventList
string PAMI\Message\IncomingMessage::getEventList()
Returns key 'EventList'. In respones, this will surely be a "start". In
events, should be a "complete".
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getRawContent
string PAMI\Message\IncomingMessage::getRawContent()
Returns the original message content without parsing.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getAllChannelVariables
array PAMI\Message\IncomingMessage::getAllChannelVariables()
Returns the channel variables for all reported channels.
https://github.com/marcelog/PAMI/issues/85
The channel names will be lowercased.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getChannelVariables
array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
Returns the channel variables for the given channel.
https://github.com/marcelog/PAMI/issues/85
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
#### Arguments
* $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
for the &quot;current&quot; channel.&lt;/p&gt;
### __construct
void PAMI\Message\Message::__construct()
Constructor.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getCreatedDate
integer PAMI\Message\Message::getCreatedDate()
Returns created date.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setVariable
void PAMI\Message\Message::setVariable(string $key, string $value)
Adds a variable to this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
* $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
### getVariable
string PAMI\Message\Message::getVariable(string $key)
Returns a variable by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
### setKey
void PAMI\Message\Message::setKey(string $key, string $value)
Adds a variable to this message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
* $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
### getKey
string PAMI\Message\Message::getKey(string $key)
Returns a key by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
### getKeys
array<mixed,string> PAMI\Message\Message::getKeys()
Returns all keys for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getVariables
array<mixed,string> PAMI\Message\Message::getVariables()
Returns all variabels for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### finishMessage
string PAMI\Message\Message::finishMessage($message)
Returns the end of message token appended to the end of a given message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $message **mixed**
### serializeVariable
string PAMI\Message\Message::serializeVariable(string $key, string $value)
Returns the string representation for an ami action variable.
* Visibility: **private**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string**
* $value **string**
### serialize
string PAMI\Message\Message::serialize()
Gives a string representation for this message, ready to be sent to
ami.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getActionID
string PAMI\Message\Message::getActionID()
Returns key: 'ActionID'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
PAMI\Message\Event\BridgeInfoCompleteEvent
===============
Event triggered for the end of the list when an action BridgeInfo is issued.
PHP Version 5
* Class name: BridgeInfoCompleteEvent
* Namespace: PAMI\Message\Event
* Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
Constants
----------
### EOL
const EOL = "\r\n"
### EOM
const EOM = "\r\n\r\n"
Properties
----------
### $rawContent
protected string $rawContent
Holds original message.
* Visibility: **protected**
### $channelVariables
protected array<mixed,string> $channelVariables
Metadata. Specific channel variables.
* Visibility: **protected**
### $lines
protected array<mixed,string> $lines
Message content, line by line. This is what it gets sent
or received literally.
* Visibility: **protected**
### $variables
protected array<mixed,string> $variables
Metadata. Message variables (key/value).
* Visibility: **protected**
### $keys
protected array<mixed,string> $keys
Metadata. Message "keys" i.e: Action: login
* Visibility: **protected**
### $createdDate
protected integer $createdDate
Created date (unix timestamp).
* Visibility: **protected**
Methods
-------
### getBridgeUniqueid
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeUniqueid()
Returns key: 'BridgeUniqueid'.
* Visibility: **public**
### getBridgeType
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeType()
Returns key: 'BridgeType'.
* Visibility: **public**
### getBridgeTechnology
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeTechnology()
Returns key: 'BridgeTechnology'.
* Visibility: **public**
### getBridgeCreator
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeCreator()
Returns key: 'BridgeCreator'.
* Visibility: **public**
### getBridgeName
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeName()
Returns key: 'BridgeName'.
* Visibility: **public**
### getBridgeNumChannels
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeNumChannels()
Returns key: 'BridgeNumChannels'.
* Visibility: **public**
### getBridgeVideoSourceMode
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeVideoSourceMode()
Returns key: 'BridgeVideoSourceMode'.
* Visibility: **public**
### getBridgeVideoSource
string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeVideoSource()
Returns key: 'BridgeVideoSource'.
* Visibility: **public**
### getName
string PAMI\Message\Event\EventMessage::getName()
Returns key 'Event'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
### __sleep
array<mixed,string> PAMI\Message\Message::__sleep()
Serialize function.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getEventList
string PAMI\Message\IncomingMessage::getEventList()
Returns key 'EventList'. In respones, this will surely be a "start". In
events, should be a "complete".
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getRawContent
string PAMI\Message\IncomingMessage::getRawContent()
Returns the original message content without parsing.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getAllChannelVariables
array PAMI\Message\IncomingMessage::getAllChannelVariables()
Returns the channel variables for all reported channels.
https://github.com/marcelog/PAMI/issues/85
The channel names will be lowercased.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getChannelVariables
array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
Returns the channel variables for the given channel.
https://github.com/marcelog/PAMI/issues/85
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
#### Arguments
* $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
for the &quot;current&quot; channel.&lt;/p&gt;
### __construct
void PAMI\Message\Message::__construct()
Constructor.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getCreatedDate
integer PAMI\Message\Message::getCreatedDate()
Returns created date.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setVariable
void PAMI\Message\Message::setVariable(string $key, string $value)
Adds a variable to this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
* $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
### getVariable
string PAMI\Message\Message::getVariable(string $key)
Returns a variable by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
### setKey
void PAMI\Message\Message::setKey(string $key, string $value)
Adds a variable to this message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
* $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
### getKey
string PAMI\Message\Message::getKey(string $key)
Returns a key by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
### getKeys
array<mixed,string> PAMI\Message\Message::getKeys()
Returns all keys for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getVariables
array<mixed,string> PAMI\Message\Message::getVariables()
Returns all variabels for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### finishMessage
string PAMI\Message\Message::finishMessage($message)
Returns the end of message token appended to the end of a given message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $message **mixed**
### serializeVariable
string PAMI\Message\Message::serializeVariable(string $key, string $value)
Returns the string representation for an ami action variable.
* Visibility: **private**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string**
* $value **string**
### serialize
string PAMI\Message\Message::serialize()
Gives a string representation for this message, ready to be sent to
ami.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getActionID
string PAMI\Message\Message::getActionID()
Returns key: 'ActionID'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
PAMI\Message\Event\ConfbridgeListCompleteEvent
===============
Event triggered for the end of the list when an action ConfbridgeList is issued.
PHP Version 5
* Class name: ConfbridgeListCompleteEvent
* Namespace: PAMI\Message\Event
* Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
Constants
----------
### EOL
const EOL = "\r\n"
### EOM
const EOM = "\r\n\r\n"
Properties
----------
### $rawContent
protected string $rawContent
Holds original message.
* Visibility: **protected**
### $channelVariables
protected array<mixed,string> $channelVariables
Metadata. Specific channel variables.
* Visibility: **protected**
### $lines
protected array<mixed,string> $lines
Message content, line by line. This is what it gets sent
or received literally.
* Visibility: **protected**
### $variables
protected array<mixed,string> $variables
Metadata. Message variables (key/value).
* Visibility: **protected**
### $keys
protected array<mixed,string> $keys
Metadata. Message "keys" i.e: Action: login
* Visibility: **protected**
### $createdDate
protected integer $createdDate
Created date (unix timestamp).
* Visibility: **protected**
Methods
-------
### getListItems
string PAMI\Message\Event\ConfbridgeListCompleteEvent::getListItems()
Returns key: 'ListItems'.
* Visibility: **public**
### getName
string PAMI\Message\Event\EventMessage::getName()
Returns key 'Event'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
### __sleep
array<mixed,string> PAMI\Message\Message::__sleep()
Serialize function.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getEventList
string PAMI\Message\IncomingMessage::getEventList()
Returns key 'EventList'. In respones, this will surely be a "start". In
events, should be a "complete".
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getRawContent
string PAMI\Message\IncomingMessage::getRawContent()
Returns the original message content without parsing.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getAllChannelVariables
array PAMI\Message\IncomingMessage::getAllChannelVariables()
Returns the channel variables for all reported channels.
https://github.com/marcelog/PAMI/issues/85
The channel names will be lowercased.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getChannelVariables
array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
Returns the channel variables for the given channel.
https://github.com/marcelog/PAMI/issues/85
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
#### Arguments
* $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
for the &quot;current&quot; channel.&lt;/p&gt;
### __construct
void PAMI\Message\Message::__construct()
Constructor.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getCreatedDate
integer PAMI\Message\Message::getCreatedDate()
Returns created date.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setVariable
void PAMI\Message\Message::setVariable(string $key, string $value)
Adds a variable to this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
* $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
### getVariable
string PAMI\Message\Message::getVariable(string $key)
Returns a variable by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
### setKey
void PAMI\Message\Message::setKey(string $key, string $value)
Adds a variable to this message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
* $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
### getKey
string PAMI\Message\Message::getKey(string $key)
Returns a key by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
### getKeys
array<mixed,string> PAMI\Message\Message::getKeys()
Returns all keys for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getVariables
array<mixed,string> PAMI\Message\Message::getVariables()
Returns all variabels for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### finishMessage
string PAMI\Message\Message::finishMessage($message)
Returns the end of message token appended to the end of a given message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $message **mixed**
### serializeVariable
string PAMI\Message\Message::serializeVariable(string $key, string $value)
Returns the string representation for an ami action variable.
* Visibility: **private**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string**
* $value **string**
### serialize
string PAMI\Message\Message::serialize()
Gives a string representation for this message, ready to be sent to
ami.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getActionID
string PAMI\Message\Message::getActionID()
Returns key: 'ActionID'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
PAMI\Message\Event\ConfbridgeListEvent
===============
Event triggered when an action ConfbridgeList is issued.
PHP Version 5
* Class name: ConfbridgeListEvent
* Namespace: PAMI\Message\Event
* Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
Constants
----------
### EOL
const EOL = "\r\n"
### EOM
const EOM = "\r\n\r\n"
Properties
----------
### $rawContent
protected string $rawContent
Holds original message.
* Visibility: **protected**
### $channelVariables
protected array<mixed,string> $channelVariables
Metadata. Specific channel variables.
* Visibility: **protected**
### $lines
protected array<mixed,string> $lines
Message content, line by line. This is what it gets sent
or received literally.
* Visibility: **protected**
### $variables
protected array<mixed,string> $variables
Metadata. Message variables (key/value).
* Visibility: **protected**
### $keys
protected array<mixed,string> $keys
Metadata. Message "keys" i.e: Action: login
* Visibility: **protected**
### $createdDate
protected integer $createdDate
Created date (unix timestamp).
* Visibility: **protected**
Methods
-------
### getConference
string PAMI\Message\Event\ConfbridgeListEvent::getConference()
Returns key: 'Conference'.
* Visibility: **public**
### getChannel
string PAMI\Message\Event\ConfbridgeListEvent::getChannel()
Returns key: 'Channel'.
* Visibility: **public**
### getCallerIDNum
string PAMI\Message\Event\ConfbridgeListEvent::getCallerIDNum()
Returns key: 'CallerIDNum'.
* Visibility: **public**
### getCallerIDName
string PAMI\Message\Event\ConfbridgeListEvent::getCallerIDName()
Returns key: 'CallerIDName'.
* Visibility: **public**
### getMarkedUser
string PAMI\Message\Event\ConfbridgeListEvent::getMarkedUser()
Returns key: 'MarkedUser'.
* Visibility: **public**
### getWaitMarked
string PAMI\Message\Event\ConfbridgeListEvent::getWaitMarked()
Returns key: 'WaitMarked'.
* Visibility: **public**
### getEndMarked
string PAMI\Message\Event\ConfbridgeListEvent::getEndMarked()
Returns key: 'EndMarked'.
* Visibility: **public**
### getWaiting
string PAMI\Message\Event\ConfbridgeListEvent::getWaiting()
Returns key: 'Waiting'.
* Visibility: **public**
### getMuted
string PAMI\Message\Event\ConfbridgeListEvent::getMuted()
Returns key: 'Muted'.
* Visibility: **public**
### getAnsweredTime
string PAMI\Message\Event\ConfbridgeListEvent::getAnsweredTime()
Returns key: 'AnsweredTime'.
* Visibility: **public**
### getAdmin
string PAMI\Message\Event\ConfbridgeListEvent::getAdmin()
Returns key: 'Admin'.
* Visibility: **public**
### getName
string PAMI\Message\Event\EventMessage::getName()
Returns key 'Event'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
### __sleep
array<mixed,string> PAMI\Message\Message::__sleep()
Serialize function.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getEventList
string PAMI\Message\IncomingMessage::getEventList()
Returns key 'EventList'. In respones, this will surely be a "start". In
events, should be a "complete".
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getRawContent
string PAMI\Message\IncomingMessage::getRawContent()
Returns the original message content without parsing.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getAllChannelVariables
array PAMI\Message\IncomingMessage::getAllChannelVariables()
Returns the channel variables for all reported channels.
https://github.com/marcelog/PAMI/issues/85
The channel names will be lowercased.
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
### getChannelVariables
array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
Returns the channel variables for the given channel.
https://github.com/marcelog/PAMI/issues/85
* Visibility: **public**
* This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
#### Arguments
* $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
for the &quot;current&quot; channel.&lt;/p&gt;
### __construct
void PAMI\Message\Message::__construct()
Constructor.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getCreatedDate
integer PAMI\Message\Message::getCreatedDate()
Returns created date.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### setVariable
void PAMI\Message\Message::setVariable(string $key, string $value)
Adds a variable to this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
* $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
### getVariable
string PAMI\Message\Message::getVariable(string $key)
Returns a variable by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
### setKey
void PAMI\Message\Message::setKey(string $key, string $value)
Adds a variable to this message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
* $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
### getKey
string PAMI\Message\Message::getKey(string $key)
Returns a key by name.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
### getKeys
array<mixed,string> PAMI\Message\Message::getKeys()
Returns all keys for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getVariables
array<mixed,string> PAMI\Message\Message::getVariables()
Returns all variabels for this message.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### finishMessage
string PAMI\Message\Message::finishMessage($message)
Returns the end of message token appended to the end of a given message.
* Visibility: **protected**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $message **mixed**
### serializeVariable
string PAMI\Message\Message::serializeVariable(string $key, string $value)
Returns the string representation for an ami action variable.
* Visibility: **private**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
#### Arguments
* $key **string**
* $value **string**
### serialize
string PAMI\Message\Message::serialize()
Gives a string representation for this message, ready to be sent to
ami.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
### getActionID
string PAMI\Message\Message::getActionID()
Returns key: 'ActionID'.
* Visibility: **public**
* This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
......@@ -34,9 +34,7 @@ use PAMI\Message\OutgoingMessage;
use PAMI\Message\Message;
use PAMI\Message\IncomingMessage;
use PAMI\Message\Action\LoginAction;
use PAMI\Message\Action\LogoffAction;
use PAMI\Message\Response\ResponseMessage;
use PAMI\Message\Event\EventMessage;
use PAMI\Message\Event\Factory\Impl\EventFactoryImpl;
use PAMI\Listener\IEventListener;
use PAMI\Client\Exception\ClientException;
......@@ -60,7 +58,7 @@ class ClientImpl implements IClient
{
/**
* PSR-3 logger.
* @var Logger
* @var LoggerInterface
*/
private $logger;
......@@ -151,6 +149,12 @@ class ClientImpl implements IClient
private $lastActionId;
/**
* Event mask to apply on login action.
* @var string|null
*/
private $eventMask;
/**
* Opens a tcp connection to ami.
*
* @throws \PAMI\Client\Exception\ClientException
......@@ -173,7 +177,7 @@ class ClientImpl implements IClient
if ($this->socket === false) {
throw new ClientException('Error connecting to ami: ' . $errstr);
}
$msg = new LoginAction($this->user, $this->pass);
$msg = new LoginAction($this->user, $this->pass, $this->eventMask);
$asteriskId = @stream_get_line($this->socket, 1024, Message::EOL);
if (strstr($asteriskId, 'Asterisk') === false) {
throw new ClientException(
......@@ -434,7 +438,7 @@ class ClientImpl implements IClient
/**
* Sets the logger implementation.
*
* @param Psr\Log\LoggerInterface $logger The PSR3-Logger
* @param LoggerInterface $logger The PSR3-Logger
*
* @return void
*/
......@@ -453,12 +457,13 @@ class ClientImpl implements IClient
{
$this->logger = new NullLogger;
$this->host = $options['host'];
$this->port = intval($options['port']);
$this->port = (int) $options['port'];
$this->user = $options['username'];
$this->pass = $options['secret'];
$this->cTimeout = $options['connect_timeout'];
$this->rTimeout = $options['read_timeout'];
$this->scheme = isset($options['scheme']) ? $options['scheme'] : 'tcp://';
$this->eventMask = isset($options['event_mask']) ? $options['event_mask'] : null;
$this->eventListeners = array();
$this->eventFactory = new EventFactoryImpl();
$this->incomingQueue = array();
......
<?php
/**
* BlindTransfer action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* BlindTransfer action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class BlindTransferAction extends ActionMessage
{
/**
* 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);
}
}
<?php
/**
* Returns detailed information about a bridge and the channels in it.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* Returns detailed information about a bridge and the channels in it.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class BridgeInfoAction extends ActionMessage
{
/**
* Constructor.
*
* @param string $bridgeUniqueid The unique ID of the bridge about which to retrieve information.
*
* @return void
*/
public function __construct($bridgeUniqueid)
{
parent::__construct('BridgeInfo');
$this->setKey('BridgeUniqueid', $bridgeUniqueid);
}
}
<?php
/**
* Challenge action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* Challenge action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ChallengeAction extends ActionMessage
{
/**
* Constructor.
*
* @param string $authType Auth type
*/
public function __construct($authType = 'MD5')
{
parent::__construct('Challenge');
$this->setKey('AuthType', $authType);
}
}
......
<?php
/**
* ConfbridgeList action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* Lists all users in a particular ConfBridge conference.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeListAction extends ActionMessage
{
/**
* Constructor.
*
* @param string $conference Conference on which to act.
*
* @return void
*/
public function __construct($conference)
{
parent::__construct('ConfbridgeList');
$this->setKey('Conference', $conference);
}
}
<?php
/**
* DAHDITransfer action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* DAHDITransfer action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class DAHDITransferAction extends ActionMessage
{
/**
* Constructor.
*
* @param string $channel DAHDIChannel
*/
public function __construct($channel)
{
parent::__construct('DAHDITransfer');
$this->setKey('DAHDIChannel', $channel);
}
}
......
......@@ -47,12 +47,17 @@ class HangupAction extends ActionMessage
* Constructor.
*
* @param string $channel Channel to hangup.
* @param int $cause Hangup cause.
*
* @return void
*/
public function __construct($channel)
public function __construct($channel, $cause = null)
{
parent::__construct('Hangup');
$this->setKey('Channel', $channel);
if (null !== $cause) {
$this->setKey('Cause', $cause);
}
}
}
......
......@@ -46,15 +46,20 @@ class LoginAction extends ActionMessage
/**
* Constructor.
*
* @param string $user AMI username.
* @param string $user AMI username.
* @param string $password AMI password.
* @param string|null $eventMask
*
* @return void
*/
public function __construct($user, $password)
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);
}
}
}
......
<?php
/**
* MixMonitorMute action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* MixMonitorMute action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class MixMonitorMuteAction extends ActionMessage
{
const DIRECTION_READ = 'read';
const DIRECTION_WRITE = 'write';
const DIRECTION_BOTH = 'both';
/**
* Sets state key.
*
* @param bool $state Mute state
*
* @return void
*/
public function setState($state)
{
$this->setKey('State', $state ? 1 : 0);
}
/**
* Sets state key.
*
* @param string $direction Which part of the recording to mute:
* read, write or both (from channel, to channel or both channels).
*
* @return void
*/
public function setDirection($direction)
{
$this->setKey('Direction', $direction);
}
/**
* 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);
}
}
<?php
/**
* UserEvent action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* UserEvent action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class UserEventAction extends ActionMessage
{
/**
* 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);
}
}
}
......
......@@ -150,8 +150,8 @@ class VGSMSMSTxAction extends ActionMessage
public function setConcatTotalMsg($totalmsg)
{
$this->setKey('X-SMS-Concatenate-Total-Messages', $totalmsg);
}
/**
* Sets Account key.
*
......
<?php
/**
* WaitEvent action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Action;
/**
* WaitEvent action message.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Action
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class WaitEventAction extends ActionMessage
{
/**
* Constructor.
*
* @param int $timeout Timeout in seconds
*/
public function __construct($timeout)
{
parent::__construct('WaitEvent');
$this->setKey('Timeout', (int)$timeout);
}
}
......
<?php
/**
* Event triggered when an action BridgeInfo is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when an action BridgeInfo is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class BridgeInfoChannelEvent extends EventMessage
{
/**
* Returns key: 'Channel'.
*
* @return string
*/
public function getChannel()
{
return $this->getKey('Channel');
}
/**
* Returns key: 'ChannelState'.
*
* @return string
*/
public function getChannelState()
{
return $this->getKey('ChannelState');
}
/**
* Returns key: 'ChannelStateDesc'.
*
* @return string
*/
public function getChannelStateDesc()
{
return $this->getKey('ChannelStateDesc');
}
/**
* Returns key: 'CallerIDNum'.
*
* @return string
*/
public function getCallerIDNum()
{
return $this->getKey('CallerIDNum');
}
/**
* Returns key: 'CallerIDName'.
*
* @return string
*/
public function getCallerIDName()
{
return $this->getKey('CallerIDName');
}
/**
* Returns key: 'ConnectedLineNum'.
*
* @return string
*/
public function getConnectedLineNum()
{
return $this->getKey('ConnectedLineNum');
}
/**
* Returns key: 'ConnectedLineName'.
*
* @return string
*/
public function getConnectedLineName()
{
return $this->getKey('ConnectedLineName');
}
/**
* Returns key: 'AccountCode'.
*
* @return string
*/
public function getAccountCode()
{
return $this->getKey('AccountCode');
}
/**
* Returns key: 'Context'.
*
* @return string
*/
public function getContext()
{
return $this->getKey('Context');
}
/**
* Returns key: 'Exten'.
*
* @return string
*/
public function getExten()
{
return $this->getKey('Exten');
}
/**
* Returns key: 'Priority'.
*
* @return string
*/
public function getPriority()
{
return $this->getKey('Priority');
}
/**
* Returns key: 'Uniqueid'.
*
* @return string
*/
public function getUniqueid()
{
return $this->getKey('Uniqueid');
}
/**
* Returns key: 'Linkedid'.
*
* @return string
*/
public function getLinkedid()
{
return $this->getKey('Linkedid');
}
}
<?php
/**
* Event triggered for the end of the list when an action BridgeInfo is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered for the end of the list when an action BridgeInfo is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class BridgeInfoCompleteEvent extends EventMessage
{
/**
* Returns key: 'BridgeUniqueid'.
*
* @return string
*/
public function getBridgeUniqueid()
{
return $this->getKey('BridgeUniqueid');
}
/**
* Returns key: 'BridgeType'.
*
* @return string
*/
public function getBridgeType()
{
return $this->getKey('BridgeType');
}
/**
* Returns key: 'BridgeTechnology'.
*
* @return string
*/
public function getBridgeTechnology()
{
return $this->getKey('BridgeTechnology');
}
/**
* Returns key: 'BridgeCreator'.
*
* @return string
*/
public function getBridgeCreator()
{
return $this->getKey('BridgeCreator');
}
/**
* Returns key: 'BridgeName'.
*
* @return string
*/
public function getBridgeName()
{
return $this->getKey('BridgeName');
}
/**
* Returns key: 'BridgeNumChannels'.
*
* @return string
*/
public function getBridgeNumChannels()
{
return $this->getKey('BridgeNumChannels');
}
/**
* Returns key: 'BridgeVideoSourceMode'.
*
* @return string
*/
public function getBridgeVideoSourceMode()
{
return $this->getKey('BridgeVideoSourceMode');
}
/**
* Returns key: 'BridgeVideoSource'.
*
* @return string
*/
public function getBridgeVideoSource()
{
return $this->getKey('BridgeVideoSource');
}
}
<?php
/**
* Event triggered when a confbridge is destroyed.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when a confbridge is destroyed.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeEndEvent extends EventMessage
{
/**
* Returns key: 'Privilege'.
*
* @return string
*/
public function getPrivilege()
{
return $this->getKey('Privilege');
}
/**
* Returns key: 'Conference'.
*
* @return string
*/
public function getConference()
{
return $this->getKey('Conference');
}
/**
* Returns key: 'BridgeUniqueid'.
*
* @return string
*/
public function getBridgeUniqueid()
{
return $this->getKey('BridgeUniqueid');
}
/**
* Returns key: 'BridgeType'.
*
* @return string
*/
public function getBridgeType()
{
return $this->getKey('BridgeType');
}
/**
* Returns key: 'BridgeTechnology'.
*
* @return string
*/
public function getBridgeTechnology()
{
return $this->getKey('BridgeTechnology');
}
/**
* Returns key: 'BridgeCreator'.
*
* @return string
*/
public function getBridgeCreator()
{
return $this->getKey('BridgeCreator');
}
/**
* Returns key: 'BridgeName'.
*
* @return string
*/
public function getBridgeName()
{
return $this->getKey('BridgeName');
}
/**
* Returns key: 'BridgeNumChannels'.
*
* @return string
*/
public function getBridgeNumChannels()
{
return $this->getKey('BridgeNumChannels');
}
}
<?php
/**
* Event triggered when a channel enters a confbridge.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when a channel enters a confbridge.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeJoinEvent extends EventMessage
{
/**
* Returns key: 'Privilege'.
*
* @return string
*/
public function getPrivilege()
{
return $this->getKey('Privilege');
}
/**
* Returns key: 'Conference'.
*
* @return string
*/
public function getConference()
{
return $this->getKey('Conference');
}
/**
* Returns key: 'BridgeUniqueid'.
*
* @return string
*/
public function getBridgeUniqueid()
{
return $this->getKey('BridgeUniqueid');
}
/**
* Returns key: 'BridgeType'.
*
* @return string
*/
public function getBridgeType()
{
return $this->getKey('BridgeType');
}
/**
* Returns key: 'BridgeTechnology'.
*
* @return string
*/
public function getBridgeTechnology()
{
return $this->getKey('BridgeTechnology');
}
/**
* Returns key: 'BridgeCreator'.
*
* @return string
*/
public function getBridgeCreator()
{
return $this->getKey('BridgeCreator');
}
/**
* Returns key: 'BridgeName'.
*
* @return string
*/
public function getBridgeName()
{
return $this->getKey('BridgeName');
}
/**
* Returns key: 'BridgeNumChannels'.
*
* @return string
*/
public function getBridgeNumChannels()
{
return $this->getKey('BridgeNumChannels');
}
/**
* Returns key: 'Channel'.
*
* @return string
*/
public function getChannel()
{
return $this->getKey('Channel');
}
/**
* Returns key: 'ChannelState'.
*
* @return string
*/
public function getChannelState()
{
return $this->getKey('ChannelState');
}
/**
* Returns key: 'ChannelStateDesc'.
*
* @return string
*/
public function getChannelStateDesc()
{
return $this->getKey('ChannelStateDesc');
}
/**
* Returns key: 'CallerIDNum'.
*
* @return string
*/
public function getCallerIDNum()
{
return $this->getKey('CallerIDNum');
}
/**
* Returns key: 'CallerIDName'.
*
* @return string
*/
public function getCallerIDName()
{
return $this->getKey('CallerIDName');
}
/**
* Returns key: 'ConnectedLineNum'.
*
* @return string
*/
public function getConnectedLineNum()
{
return $this->getKey('ConnectedLineNum');
}
/**
* Returns key: 'ConnectedLineName'.
*
* @return string
*/
public function getConnectedLineName()
{
return $this->getKey('ConnectedLineName');
}
/**
* Returns key: 'AccountCode'.
*
* @return string
*/
public function getAccountCode()
{
return $this->getKey('AccountCode');
}
/**
* Returns key: 'Context'.
*
* @return string
*/
public function getContext()
{
return $this->getKey('Context');
}
/**
* Returns key: 'Exten'.
*
* @return string
*/
public function getExten()
{
return $this->getKey('Exten');
}
/**
* Returns key: 'Priority'.
*
* @return string
*/
public function getPriority()
{
return $this->getKey('Priority');
}
/**
* Returns key: 'Uniqueid'.
*
* @return string
*/
public function getUniqueid()
{
return $this->getKey('Uniqueid');
}
/**
* Returns key: 'Linkedid'.
*
* @return string
*/
public function getLinkedid()
{
return $this->getKey('Linkedid');
}
/**
* Returns key: 'Admin'.
*
* @return string
*/
public function getAdmin()
{
return $this->getKey('Admin');
}
}
<?php
/**
* Event triggered when a channel leaves a confbridge.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when a channel leaves a confbridge.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeLeaveEvent extends EventMessage
{
/**
* Returns key: 'Privilege'.
*
* @return string
*/
public function getPrivilege()
{
return $this->getKey('Privilege');
}
/**
* Returns key: 'Conference'.
*
* @return string
*/
public function getConference()
{
return $this->getKey('Conference');
}
/**
* Returns key: 'BridgeUniqueid'.
*
* @return string
*/
public function getBridgeUniqueid()
{
return $this->getKey('BridgeUniqueid');
}
/**
* Returns key: 'BridgeType'.
*
* @return string
*/
public function getBridgeType()
{
return $this->getKey('BridgeType');
}
/**
* Returns key: 'BridgeTechnology'.
*
* @return string
*/
public function getBridgeTechnology()
{
return $this->getKey('BridgeTechnology');
}
/**
* Returns key: 'BridgeCreator'.
*
* @return string
*/
public function getBridgeCreator()
{
return $this->getKey('BridgeCreator');
}
/**
* Returns key: 'BridgeName'.
*
* @return string
*/
public function getBridgeName()
{
return $this->getKey('BridgeName');
}
/**
* Returns key: 'BridgeNumChannels'.
*
* @return string
*/
public function getBridgeNumChannels()
{
return $this->getKey('BridgeNumChannels');
}
/**
* Returns key: 'Channel'.
*
* @return string
*/
public function getChannel()
{
return $this->getKey('Channel');
}
/**
* Returns key: 'ChannelState'.
*
* @return string
*/
public function getChannelState()
{
return $this->getKey('ChannelState');
}
/**
* Returns key: 'ChannelStateDesc'.
*
* @return string
*/
public function getChannelStateDesc()
{
return $this->getKey('ChannelStateDesc');
}
/**
* Returns key: 'CallerIDNum'.
*
* @return string
*/
public function getCallerIDNum()
{
return $this->getKey('CallerIDNum');
}
/**
* Returns key: 'CallerIDName'.
*
* @return string
*/
public function getCallerIDName()
{
return $this->getKey('CallerIDName');
}
/**
* Returns key: 'ConnectedLineNum'.
*
* @return string
*/
public function getConnectedLineNum()
{
return $this->getKey('ConnectedLineNum');
}
/**
* Returns key: 'ConnectedLineName'.
*
* @return string
*/
public function getConnectedLineName()
{
return $this->getKey('ConnectedLineName');
}
/**
* Returns key: 'AccountCode'.
*
* @return string
*/
public function getAccountCode()
{
return $this->getKey('AccountCode');
}
/**
* Returns key: 'Context'.
*
* @return string
*/
public function getContext()
{
return $this->getKey('Context');
}
/**
* Returns key: 'Exten'.
*
* @return string
*/
public function getExten()
{
return $this->getKey('Exten');
}
/**
* Returns key: 'Priority'.
*
* @return string
*/
public function getPriority()
{
return $this->getKey('Priority');
}
/**
* Returns key: 'Uniqueid'.
*
* @return string
*/
public function getUniqueid()
{
return $this->getKey('Uniqueid');
}
/**
* Returns key: 'Linkedid'.
*
* @return string
*/
public function getLinkedid()
{
return $this->getKey('Linkedid');
}
/**
* Returns key: 'Admin'.
*
* @return string
*/
public function getAdmin()
{
return $this->getKey('Admin');
}
}
<?php
/**
* Event triggered for the end of the list when an action ConfbridgeList is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
use PAMI\Message\Event\EventMessage;
/**
* Event triggered for the end of the list when an action ConfbridgeList is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeListCompleteEvent extends EventMessage
{
/**
* Returns key: 'ListItems'.
*
* @return string
*/
public function getListItems()
{
return $this->getKey('ListItems');
}
}
<?php
/**
* Event triggered when an action ConfbridgeList is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when an action ConfbridgeList is issued.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Matt Styles <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeListEvent extends EventMessage
{
/**
* Returns key: 'Conference'.
*
* @return string
*/
public function getConference()
{
return $this->getKey('Conference');
}
/**
* Returns key: 'Channel'.
*
* @return string
*/
public function getChannel()
{
return $this->getKey('Channel');
}
/**
* Returns key: 'CallerIDNum'.
*
* @return string
*/
public function getCallerIDNum()
{
return $this->getKey('CallerIDNum');
}
/**
* Returns key: 'CallerIDName'.
*
* @return string
*/
public function getCallerIDName()
{
return $this->getKey('CallerIDName');
}
/**
* Returns key: 'MarkedUser'.
*
* @return string
*/
public function getMarkedUser()
{
return $this->getKey('MarkedUser');
}
/**
* Returns key: 'WaitMarked'.
*
* @return string
*/
public function getWaitMarked()
{
return $this->getKey('WaitMarked');
}
/**
* Returns key: 'EndMarked'.
*
* @return string
*/
public function getEndMarked()
{
return $this->getKey('EndMarked');
}
/**
* Returns key: 'Waiting'.
*
* @return string
*/
public function getWaiting()
{
return $this->getKey('Waiting');
}
/**
* Returns key: 'Muted'.
*
* @return string
*/
public function getMuted()
{
return $this->getKey('Muted');
}
/**
* Returns key: 'AnsweredTime'.
*
* @return string
*/
public function getAnsweredTime()
{
return $this->getKey('AnsweredTime');
}
/**
* Returns key: 'Admin'.
*
* @return string
*/
public function getAdmin()
{
return $this->getKey('Admin');
}
}
<?php
/**
* Event triggered when a channel is muted in a confbridge.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when a channel is muted in a confbridge.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeMuteEvent extends EventMessage
{
/**
* Returns key: 'Privilege'.
*
* @return string
*/
public function getPrivilege()
{
return $this->getKey('Privilege');
}
/**
* Returns key: 'Conference'.
*
* @return string
*/
public function getConference()
{
return $this->getKey('Conference');
}
/**
* Returns key: 'BridgeUniqueid'.
*
* @return string
*/
public function getBridgeUniqueid()
{
return $this->getKey('BridgeUniqueid');
}
/**
* Returns key: 'BridgeType'.
*
* @return string
*/
public function getBridgeType()
{
return $this->getKey('BridgeType');
}
/**
* Returns key: 'BridgeTechnology'.
*
* @return string
*/
public function getBridgeTechnology()
{
return $this->getKey('BridgeTechnology');
}
/**
* Returns key: 'BridgeCreator'.
*
* @return string
*/
public function getBridgeCreator()
{
return $this->getKey('BridgeCreator');
}
/**
* Returns key: 'BridgeName'.
*
* @return string
*/
public function getBridgeName()
{
return $this->getKey('BridgeName');
}
/**
* Returns key: 'BridgeNumChannels'.
*
* @return string
*/
public function getBridgeNumChannels()
{
return $this->getKey('BridgeNumChannels');
}
/**
* Returns key: 'Channel'.
*
* @return string
*/
public function getChannel()
{
return $this->getKey('Channel');
}
/**
* Returns key: 'ChannelState'.
*
* @return string
*/
public function getChannelState()
{
return $this->getKey('ChannelState');
}
/**
* Returns key: 'ChannelStateDesc'.
*
* @return string
*/
public function getChannelStateDesc()
{
return $this->getKey('ChannelStateDesc');
}
/**
* Returns key: 'CallerIDNum'.
*
* @return string
*/
public function getCallerIDNum()
{
return $this->getKey('CallerIDNum');
}
/**
* Returns key: 'CallerIDName'.
*
* @return string
*/
public function getCallerIDName()
{
return $this->getKey('CallerIDName');
}
/**
* Returns key: 'ConnectedLineNum'.
*
* @return string
*/
public function getConnectedLineNum()
{
return $this->getKey('ConnectedLineNum');
}
/**
* Returns key: 'ConnectedLineName'.
*
* @return string
*/
public function getConnectedLineName()
{
return $this->getKey('ConnectedLineName');
}
/**
* Returns key: 'AccountCode'.
*
* @return string
*/
public function getAccountCode()
{
return $this->getKey('AccountCode');
}
/**
* Returns key: 'Context'.
*
* @return string
*/
public function getContext()
{
return $this->getKey('Context');
}
/**
* Returns key: 'Exten'.
*
* @return string
*/
public function getExten()
{
return $this->getKey('Exten');
}
/**
* Returns key: 'Priority'.
*
* @return string
*/
public function getPriority()
{
return $this->getKey('Priority');
}
/**
* Returns key: 'Uniqueid'.
*
* @return string
*/
public function getUniqueid()
{
return $this->getKey('Uniqueid');
}
/**
* Returns key: 'Linkedid'.
*
* @return string
*/
public function getLinkedid()
{
return $this->getKey('Linkedid');
}
/**
* Returns key: 'Admin'.
*
* @return string
*/
public function getAdmin()
{
return $this->getKey('Admin');
}
}
<?php
/**
* Event triggered when a confbridge is created.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @version SVN: $Id$
* @link http://marcelog.github.com/PAMI/
*
* Copyright 2011 Marcelo Gornstein <[email protected]>
*
* 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.
*
*/
namespace PAMI\Message\Event;
/**
* Event triggered when a confbridge is created.
*
* PHP Version 5
*
* @category Pami
* @package Message
* @subpackage Event
* @author Marcelo Gornstein <[email protected]>
* @license http://marcelog.github.com/PAMI/ Apache License 2.0
* @link http://marcelog.github.com/PAMI/
*/
class ConfbridgeStartEvent extends EventMessage
{
/**
* Returns key: 'Privilege'.
*
* @return string
*/
public function getPrivilege()
{
return $this->getKey('Privilege');
}
/**
* Returns key: 'Conference'.
*
* @return string
*/
public function getConference()
{
return $this->getKey('Conference');
}
/**
* Returns key: 'BridgeUniqueid'.
*
* @return string
*/
public function getBridgeUniqueid()
{
return $this->getKey('BridgeUniqueid');
}
/**
* Returns key: 'BridgeType'.
*
* @return string
*/
public function getBridgeType()
{
return $this->getKey('BridgeType');
}
/**
* Returns key: 'BridgeTechnology'.
*
* @return string
*/
public function getBridgeTechnology()
{
return $this->getKey('BridgeTechnology');
}
/**
* Returns key: 'BridgeCreator'.
*
* @return string
*/
public function getBridgeCreator()
{
return $this->getKey('BridgeCreator');
}
/**
* Returns key: 'BridgeName'.
*
* @return string
*/
public function getBridgeName()
{
return $this->getKey('BridgeName');
}
/**
* Returns key: 'BridgeNumChannels'.
*
* @return string
*/
public function getBridgeNumChannels()
{
return $this->getKey('BridgeNumChannels');
}
}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!