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; ...@@ -20,6 +20,7 @@ use PAMI\Message\Event\UnknownEvent;
20 use PAMI\Message\Event\DialBeginEvent; 20 use PAMI\Message\Event\DialBeginEvent;
21 use PAMI\Message\Event\DialEndEvent; 21 use PAMI\Message\Event\DialEndEvent;
22 use PAMI\Message\Event\BlindTransferEvent; 22 use PAMI\Message\Event\BlindTransferEvent;
23 use PAMI\Message\Event\AttendedTransferEvent;
23 24
24 use PAMI\Message\Action\AGIAction; 25 use PAMI\Message\Action\AGIAction;
25 use PAMI\Message\Action\SIPNotifyAction; 26 use PAMI\Message\Action\SIPNotifyAction;
...@@ -33,6 +34,8 @@ use PAMI\Message\Action\RedirectAction; ...@@ -33,6 +34,8 @@ use PAMI\Message\Action\RedirectAction;
33 use PAMI\Message\Action\ConfbridgeMuteAction; 34 use PAMI\Message\Action\ConfbridgeMuteAction;
34 use PAMI\Message\Action\ConfbridgeUnmuteAction; 35 use PAMI\Message\Action\ConfbridgeUnmuteAction;
35 use PAMI\Message\Action\ActionMessage; 36 use PAMI\Message\Action\ActionMessage;
37 use PAMI\Message\Action\AttendedTransferAction;
38 use PAMI\Message\Action\BlindTransferAction;
36 39
37 use App\Models\Sipid; 40 use App\Models\Sipid;
38 use App\Models\User; 41 use App\Models\User;
...@@ -782,7 +785,7 @@ class KPAMIListen implements IEventListener ...@@ -782,7 +785,7 @@ class KPAMIListen implements IEventListener
782 $duniqueid=$event->getKey("DestUniqueid"); 785 $duniqueid=$event->getKey("DestUniqueid");
783 786
784 $dialstatus=$event->getKey("DialStatus"); 787 $dialstatus=$event->getKey("DialStatus");
785 788 Log::info($accountcode);
786 if($accountcode!="") 789 if($accountcode!="")
787 { 790 {
788 //echo "$accountcode:Unknown : $eventname $channelstate:$channelstatedesc $uniqueid $exten:$priority $channel\n"; 791 //echo "$accountcode:Unknown : $eventname $channelstate:$channelstatedesc $uniqueid $exten:$priority $channel\n";
...@@ -819,7 +822,7 @@ class KPAMIListen implements IEventListener ...@@ -819,7 +822,7 @@ class KPAMIListen implements IEventListener
819 $dialline=Dialline::find($crmcall->dialline_id); 822 $dialline=Dialline::find($crmcall->dialline_id);
820 if($dialline) 823 if($dialline)
821 { 824 {
822 $dialline->channel=$dchannel; 825 $dialline->channel=$channel;
823 $dialline->save(); 826 $dialline->save();
824 } 827 }
825 828
...@@ -887,10 +890,10 @@ class KPAMIListen implements IEventListener ...@@ -887,10 +890,10 @@ class KPAMIListen implements IEventListener
887 $dialline=Dialline::find($crmcall->dialline_id); 890 $dialline=Dialline::find($crmcall->dialline_id);
888 if($dialline && $dialstatus=="ANSWER") 891 if($dialline && $dialstatus=="ANSWER")
889 { 892 {
890 $tsip=Sipid::find($crmcall->sipid_id); 893 // $tsip=Sipid::find($crmcall->sipid_id);
891 894
892 $newqueue=new Kqueue(); 895 // $newqueue=new Kqueue();
893 $newqueue->channelRedirectToExten($tsip->server,$dchannel,"1004".$tsip->id,"confTransfer","1"); 896 // $newqueue->channelRedirectToExten($tsip->server,$dchannel,"1004".$tsip->id."|".$dialline->channel,"confTransfer","1");
894 897
895 $dialline->channel=$dchannel; 898 $dialline->channel=$dchannel;
896 $dialline->uniqueid=$uniqueid; 899 $dialline->uniqueid=$uniqueid;
...@@ -914,6 +917,11 @@ class KPAMIListen implements IEventListener ...@@ -914,6 +917,11 @@ class KPAMIListen implements IEventListener
914 Log::info("BlindTransferEvent"); 917 Log::info("BlindTransferEvent");
915 } 918 }
916 919
920 private function AttendedTransferEvent(EventMessage $event)
921 {
922 Log::info(var_export($event));
923 }
924
917 private function UnknownEvent(EventMessage $event) 925 private function UnknownEvent(EventMessage $event)
918 { 926 {
919 $eventname=$event->getKey("Event"); 927 $eventname=$event->getKey("Event");
...@@ -1758,6 +1766,11 @@ if($crmcall->did=='46130234'){ ...@@ -1758,6 +1766,11 @@ if($crmcall->did=='46130234'){
1758 $redirect=new RedirectAction($data['fromext'], $data['toext'], $data['context'], 1); 1766 $redirect=new RedirectAction($data['fromext'], $data['toext'], $data['context'], 1);
1759 $res=$this->_client->send($redirect); 1767 $res=$this->_client->send($redirect);
1760 } 1768 }
1769 else if($tqueue->key=="transfer")
1770 {
1771 $blindtransferaction=new BlindTransferAction($data['channel'],$data['exten'],$data['context']);
1772 $res=$this->_client->send($blindtransferaction);
1773 }
1761 1774
1762 $tqueue->delete(); 1775 $tqueue->delete();
1763 } 1776 }
......
...@@ -78,18 +78,24 @@ class Kqueue extends Model{ ...@@ -78,18 +78,24 @@ class Kqueue extends Model{
78 if($server != '') 78 if($server != '')
79 { 79 {
80 $odata=array();$odata['VARS']=array(); 80 $odata=array();$odata['VARS']=array();
81 $odata['fromext']="Local/1000".$sipid->id."@kstychDialer"; 81 /*$odata['fromext']="Local/1000".$sipid->id."@kstychDialer";
82 $odata['context']="initiateTransfer"; 82 $odata['context']="initiateTransfer";
83 $odata['callerid']=$channel; 83 $odata['callerid']=$channel;
84 $odata['toext']="1003".$callnumber; 84 $odata['toext']="1003".$callnumber;
85 $odata['account']='m|t|'.$crmcall->id; 85 $odata['account']='m|t|'.$crmcall->id;
86 $odata['VARS']['dialstr']=$dialstr; 86 $odata['VARS']['dialstr']=$dialstr;
87 $odata['VARS']['chnl']=$channel; 87 $odata['VARS']['chnl']=$channel;
88 $odata['VARS']['callnumber']=$callnumber; 88 $odata['VARS']['callnumber']=$callnumber;*/
89
90 $odata['channel']=$channel;
91 $odata['exten']="1003".$callnumber;
92 $odata['context']="initiateTransfer";
93 $odata['priority']=1;
94
89 95
90 //originate conf 96 //originate conf
91 $this->type="SIP_".$server; 97 $this->type="SIP_".$server;
92 $this->key="originate"; 98 $this->key="transfer";
93 $this->status="New"; 99 $this->status="New";
94 $this->data=json_encode($odata); 100 $this->data=json_encode($odata);
95 $this->save(); 101 $this->save();
......
...@@ -114,8 +114,19 @@ can still catch them. If you catch one of these, please report it! ...@@ -114,8 +114,19 @@ can still catch them. If you catch one of these, please report it!
114 * AGIExec 114 * AGIExec
115 * AsyncAGI 115 * AsyncAGI
116 * Bridge 116 * Bridge
117 * BridgeInfoChannel
118 * BridgeInfoComplete
117 * CEL 119 * CEL
118 * ChannelUpdate 120 * ChannelUpdate
121 * ConfbridgeEnd
122 * ConfbridgeJoin
123 * ConfbridgeLeave
124 * ConfbridgeList
125 * ConfbridgeListComplete
126 * ConfbridgeMute
127 * ConfbridgeStart
128 * ConfbridgeTalking
129 * ConfbridgeUnmute
119 * CoreShowChannel 130 * CoreShowChannel
120 * CoreShowChannelComplete 131 * CoreShowChannelComplete
121 * DAHDIShowChannel 132 * DAHDIShowChannel
...@@ -192,8 +203,10 @@ can still catch them. If you catch one of these, please report it! ...@@ -192,8 +203,10 @@ can still catch them. If you catch one of these, please report it!
192 * AgentLogoff 203 * AgentLogoff
193 * Atxfer (asterisk 1.8?) 204 * Atxfer (asterisk 1.8?)
194 * Bridge 205 * Bridge
206 * BridgeInfo
195 * ChangeMonitor 207 * ChangeMonitor
196 * Command 208 * Command
209 * ConfbridgeList
197 * ConfbridgeMute 210 * ConfbridgeMute
198 * ConfbridgeUnmute 211 * ConfbridgeUnmute
199 * CoreSettings 212 * CoreSettings
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
25 </target> 25 </target>
26 26
27 <target name="cpd"> 27 <target name="cpd">
28 <exec command="vendor/bin/phpcpd --fuzzy src" 28 <exec command="vendor/bin/phpcpd --fuzzy src --exclude PAMI/Message/Event"
29 checkreturn="true" 29 checkreturn="true"
30 passthru="true"/> 30 passthru="true"/>
31 </target> 31 </target>
......
1 PAMI\Message\Action\BridgeInfoAction
2 ===============
3
4 Returns detailed information about a bridge and the channels in it.
5
6 PHP Version 5
7
8
9 * Class name: BridgeInfoAction
10 * Namespace: PAMI\Message\Action
11 * Parent class: [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
12
13
14
15 Constants
16 ----------
17
18
19 ### EOL
20
21 const EOL = "\r\n"
22
23
24
25
26
27 ### EOM
28
29 const EOM = "\r\n\r\n"
30
31
32
33
34
35 Properties
36 ----------
37
38
39 ### $lines
40
41 protected array<mixed,string> $lines
42
43 Message content, line by line. This is what it gets sent
44 or received literally.
45
46
47
48 * Visibility: **protected**
49
50
51 ### $variables
52
53 protected array<mixed,string> $variables
54
55 Metadata. Message variables (key/value).
56
57
58
59 * Visibility: **protected**
60
61
62 ### $keys
63
64 protected array<mixed,string> $keys
65
66 Metadata. Message "keys" i.e: Action: login
67
68
69
70 * Visibility: **protected**
71
72
73 ### $createdDate
74
75 protected integer $createdDate
76
77 Created date (unix timestamp).
78
79
80
81 * Visibility: **protected**
82
83
84 Methods
85 -------
86
87
88 ### __construct
89
90 void PAMI\Message\Message::__construct()
91
92 Constructor.
93
94
95
96 * Visibility: **public**
97 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
98
99
100
101
102 ### setActionID
103
104 void PAMI\Message\Action\ActionMessage::setActionID($actionID)
105
106 Sets Action ID.
107
108 The ActionID can be at most 69 characters long, according to
109 [Asterisk Issue 14847](https://issues.asterisk.org/jira/browse/14847).
110
111 Therefore we'll throw an exception when the ActionID is too long.
112
113 * Visibility: **public**
114 * This method is defined by [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
115
116
117 #### Arguments
118 * $actionID **mixed** - &lt;p&gt;The Action ID to have this action known by&lt;/p&gt;
119
120
121
122 ### __sleep
123
124 array<mixed,string> PAMI\Message\Message::__sleep()
125
126 Serialize function.
127
128
129
130 * Visibility: **public**
131 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
132
133
134
135
136 ### getCreatedDate
137
138 integer PAMI\Message\Message::getCreatedDate()
139
140 Returns created date.
141
142
143
144 * Visibility: **public**
145 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
146
147
148
149
150 ### setVariable
151
152 void PAMI\Message\Message::setVariable(string $key, string $value)
153
154 Adds a variable to this message.
155
156
157
158 * Visibility: **public**
159 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
160
161
162 #### Arguments
163 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
164 * $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
165
166
167
168 ### getVariable
169
170 string PAMI\Message\Message::getVariable(string $key)
171
172 Returns a variable by name.
173
174
175
176 * Visibility: **public**
177 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
178
179
180 #### Arguments
181 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
182
183
184
185 ### setKey
186
187 void PAMI\Message\Message::setKey(string $key, string $value)
188
189 Adds a variable to this message.
190
191
192
193 * Visibility: **protected**
194 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
195
196
197 #### Arguments
198 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
199 * $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
200
201
202
203 ### getKey
204
205 string PAMI\Message\Message::getKey(string $key)
206
207 Returns a key by name.
208
209
210
211 * Visibility: **public**
212 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
213
214
215 #### Arguments
216 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
217
218
219
220 ### getKeys
221
222 array<mixed,string> PAMI\Message\Message::getKeys()
223
224 Returns all keys for this message.
225
226
227
228 * Visibility: **public**
229 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
230
231
232
233
234 ### getVariables
235
236 array<mixed,string> PAMI\Message\Message::getVariables()
237
238 Returns all variabels for this message.
239
240
241
242 * Visibility: **public**
243 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
244
245
246
247
248 ### finishMessage
249
250 string PAMI\Message\Message::finishMessage($message)
251
252 Returns the end of message token appended to the end of a given message.
253
254
255
256 * Visibility: **protected**
257 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
258
259
260 #### Arguments
261 * $message **mixed**
262
263
264
265 ### serializeVariable
266
267 string PAMI\Message\Message::serializeVariable(string $key, string $value)
268
269 Returns the string representation for an ami action variable.
270
271
272
273 * Visibility: **private**
274 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
275
276
277 #### Arguments
278 * $key **string**
279 * $value **string**
280
281
282
283 ### serialize
284
285 string PAMI\Message\Message::serialize()
286
287 Gives a string representation for this message, ready to be sent to
288 ami.
289
290
291
292 * Visibility: **public**
293 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
294
295
296
297
298 ### getActionID
299
300 string PAMI\Message\Message::getActionID()
301
302 Returns key: 'ActionID'.
303
304
305
306 * Visibility: **public**
307 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
308
309
310
1 PAMI\Message\Action\ConfbridgeListAction
2 ===============
3
4 Lists all users in a particular ConfBridge conference.
5
6 PHP Version 5
7
8
9 * Class name: ConfbridgeListAction
10 * Namespace: PAMI\Message\Action
11 * Parent class: [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
12
13
14
15 Constants
16 ----------
17
18
19 ### EOL
20
21 const EOL = "\r\n"
22
23
24
25
26
27 ### EOM
28
29 const EOM = "\r\n\r\n"
30
31
32
33
34
35 Properties
36 ----------
37
38
39 ### $lines
40
41 protected array<mixed,string> $lines
42
43 Message content, line by line. This is what it gets sent
44 or received literally.
45
46
47
48 * Visibility: **protected**
49
50
51 ### $variables
52
53 protected array<mixed,string> $variables
54
55 Metadata. Message variables (key/value).
56
57
58
59 * Visibility: **protected**
60
61
62 ### $keys
63
64 protected array<mixed,string> $keys
65
66 Metadata. Message "keys" i.e: Action: login
67
68
69
70 * Visibility: **protected**
71
72
73 ### $createdDate
74
75 protected integer $createdDate
76
77 Created date (unix timestamp).
78
79
80
81 * Visibility: **protected**
82
83
84 Methods
85 -------
86
87
88 ### __construct
89
90 void PAMI\Message\Message::__construct()
91
92 Constructor.
93
94
95
96 * Visibility: **public**
97 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
98
99
100
101
102 ### setActionID
103
104 void PAMI\Message\Action\ActionMessage::setActionID($actionID)
105
106 Sets Action ID.
107
108 The ActionID can be at most 69 characters long, according to
109 [Asterisk Issue 14847](https://issues.asterisk.org/jira/browse/14847).
110
111 Therefore we'll throw an exception when the ActionID is too long.
112
113 * Visibility: **public**
114 * This method is defined by [PAMI\Message\Action\ActionMessage](PAMI-Message-Action-ActionMessage.md)
115
116
117 #### Arguments
118 * $actionID **mixed** - &lt;p&gt;The Action ID to have this action known by&lt;/p&gt;
119
120
121
122 ### __sleep
123
124 array<mixed,string> PAMI\Message\Message::__sleep()
125
126 Serialize function.
127
128
129
130 * Visibility: **public**
131 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
132
133
134
135
136 ### getCreatedDate
137
138 integer PAMI\Message\Message::getCreatedDate()
139
140 Returns created date.
141
142
143
144 * Visibility: **public**
145 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
146
147
148
149
150 ### setVariable
151
152 void PAMI\Message\Message::setVariable(string $key, string $value)
153
154 Adds a variable to this message.
155
156
157
158 * Visibility: **public**
159 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
160
161
162 #### Arguments
163 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
164 * $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
165
166
167
168 ### getVariable
169
170 string PAMI\Message\Message::getVariable(string $key)
171
172 Returns a variable by name.
173
174
175
176 * Visibility: **public**
177 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
178
179
180 #### Arguments
181 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
182
183
184
185 ### setKey
186
187 void PAMI\Message\Message::setKey(string $key, string $value)
188
189 Adds a variable to this message.
190
191
192
193 * Visibility: **protected**
194 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
195
196
197 #### Arguments
198 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
199 * $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
200
201
202
203 ### getKey
204
205 string PAMI\Message\Message::getKey(string $key)
206
207 Returns a key by name.
208
209
210
211 * Visibility: **public**
212 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
213
214
215 #### Arguments
216 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
217
218
219
220 ### getKeys
221
222 array<mixed,string> PAMI\Message\Message::getKeys()
223
224 Returns all keys for this message.
225
226
227
228 * Visibility: **public**
229 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
230
231
232
233
234 ### getVariables
235
236 array<mixed,string> PAMI\Message\Message::getVariables()
237
238 Returns all variabels for this message.
239
240
241
242 * Visibility: **public**
243 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
244
245
246
247
248 ### finishMessage
249
250 string PAMI\Message\Message::finishMessage($message)
251
252 Returns the end of message token appended to the end of a given message.
253
254
255
256 * Visibility: **protected**
257 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
258
259
260 #### Arguments
261 * $message **mixed**
262
263
264
265 ### serializeVariable
266
267 string PAMI\Message\Message::serializeVariable(string $key, string $value)
268
269 Returns the string representation for an ami action variable.
270
271
272
273 * Visibility: **private**
274 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
275
276
277 #### Arguments
278 * $key **string**
279 * $value **string**
280
281
282
283 ### serialize
284
285 string PAMI\Message\Message::serialize()
286
287 Gives a string representation for this message, ready to be sent to
288 ami.
289
290
291
292 * Visibility: **public**
293 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
294
295
296
297
298 ### getActionID
299
300 string PAMI\Message\Message::getActionID()
301
302 Returns key: 'ActionID'.
303
304
305
306 * Visibility: **public**
307 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
308
309
310
1 PAMI\Message\Event\BridgeInfoChannelEvent
2 ===============
3
4 Event triggered when an action BridgeInfo is issued.
5
6 PHP Version 5
7
8
9 * Class name: BridgeInfoChannelEvent
10 * Namespace: PAMI\Message\Event
11 * Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
12
13
14
15 Constants
16 ----------
17
18
19 ### EOL
20
21 const EOL = "\r\n"
22
23
24
25
26
27 ### EOM
28
29 const EOM = "\r\n\r\n"
30
31
32
33
34
35 Properties
36 ----------
37
38
39 ### $rawContent
40
41 protected string $rawContent
42
43 Holds original message.
44
45
46
47 * Visibility: **protected**
48
49
50 ### $channelVariables
51
52 protected array<mixed,string> $channelVariables
53
54 Metadata. Specific channel variables.
55
56
57
58 * Visibility: **protected**
59
60
61 ### $lines
62
63 protected array<mixed,string> $lines
64
65 Message content, line by line. This is what it gets sent
66 or received literally.
67
68
69
70 * Visibility: **protected**
71
72
73 ### $variables
74
75 protected array<mixed,string> $variables
76
77 Metadata. Message variables (key/value).
78
79
80
81 * Visibility: **protected**
82
83
84 ### $keys
85
86 protected array<mixed,string> $keys
87
88 Metadata. Message "keys" i.e: Action: login
89
90
91
92 * Visibility: **protected**
93
94
95 ### $createdDate
96
97 protected integer $createdDate
98
99 Created date (unix timestamp).
100
101
102
103 * Visibility: **protected**
104
105
106 Methods
107 -------
108
109
110 ### getChannel
111
112 string PAMI\Message\Event\BridgeInfoChannelEvent::getChannel()
113
114 Returns key: 'Channel'.
115
116
117
118 * Visibility: **public**
119
120
121
122
123 ### getChannelState
124
125 string PAMI\Message\Event\BridgeInfoChannelEvent::getChannelState()
126
127 Returns key: 'ChannelState'.
128
129
130
131 * Visibility: **public**
132
133
134
135
136 ### getChannelStateDesc
137
138 string PAMI\Message\Event\BridgeInfoChannelEvent::getChannelStateDesc()
139
140 Returns key: 'ChannelStateDesc'.
141
142
143
144 * Visibility: **public**
145
146
147
148
149 ### getCallerIDNum
150
151 string PAMI\Message\Event\BridgeInfoChannelEvent::getCallerIDNum()
152
153 Returns key: 'CallerIDNum'.
154
155
156
157 * Visibility: **public**
158
159
160
161
162 ### getCallerIDName
163
164 string PAMI\Message\Event\BridgeInfoChannelEvent::getCallerIDName()
165
166 Returns key: 'CallerIDName'.
167
168
169
170 * Visibility: **public**
171
172
173
174
175 ### getConnectedLineNum
176
177 string PAMI\Message\Event\BridgeInfoChannelEvent::getConnectedLineNum()
178
179 Returns key: 'ConnectedLineNum'.
180
181
182
183 * Visibility: **public**
184
185
186
187
188 ### getConnectedLineName
189
190 string PAMI\Message\Event\BridgeInfoChannelEvent::getConnectedLineName()
191
192 Returns key: 'ConnectedLineName'.
193
194
195
196 * Visibility: **public**
197
198
199
200
201 ### getAccountCode
202
203 string PAMI\Message\Event\BridgeInfoChannelEvent::getAccountCode()
204
205 Returns key: 'AccountCode'.
206
207
208
209 * Visibility: **public**
210
211
212
213
214 ### getContext
215
216 string PAMI\Message\Event\BridgeInfoChannelEvent::getContext()
217
218 Returns key: 'Context'.
219
220
221
222 * Visibility: **public**
223
224
225
226
227 ### getExten
228
229 string PAMI\Message\Event\BridgeInfoChannelEvent::getExten()
230
231 Returns key: 'Exten'.
232
233
234
235 * Visibility: **public**
236
237
238
239
240 ### getPriority
241
242 string PAMI\Message\Event\BridgeInfoChannelEvent::getPriority()
243
244 Returns key: 'Priority'.
245
246
247
248 * Visibility: **public**
249
250
251
252
253 ### getUniqueid
254
255 string PAMI\Message\Event\BridgeInfoChannelEvent::getUniqueid()
256
257 Returns key: 'Uniqueid'.
258
259
260
261 * Visibility: **public**
262
263
264
265
266 ### getLinkedid
267
268 string PAMI\Message\Event\BridgeInfoChannelEvent::getLinkedid()
269
270 Returns key: 'Linkedid'.
271
272
273
274 * Visibility: **public**
275
276
277
278
279 ### getName
280
281 string PAMI\Message\Event\EventMessage::getName()
282
283 Returns key 'Event'.
284
285
286
287 * Visibility: **public**
288 * This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
289
290
291
292
293 ### __sleep
294
295 array<mixed,string> PAMI\Message\Message::__sleep()
296
297 Serialize function.
298
299
300
301 * Visibility: **public**
302 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
303
304
305
306
307 ### getEventList
308
309 string PAMI\Message\IncomingMessage::getEventList()
310
311 Returns key 'EventList'. In respones, this will surely be a "start". In
312 events, should be a "complete".
313
314
315
316 * Visibility: **public**
317 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
318
319
320
321
322 ### getRawContent
323
324 string PAMI\Message\IncomingMessage::getRawContent()
325
326 Returns the original message content without parsing.
327
328
329
330 * Visibility: **public**
331 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
332
333
334
335
336 ### getAllChannelVariables
337
338 array PAMI\Message\IncomingMessage::getAllChannelVariables()
339
340 Returns the channel variables for all reported channels.
341
342 https://github.com/marcelog/PAMI/issues/85
343
344 The channel names will be lowercased.
345
346 * Visibility: **public**
347 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
348
349
350
351
352 ### getChannelVariables
353
354 array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
355
356 Returns the channel variables for the given channel.
357
358 https://github.com/marcelog/PAMI/issues/85
359
360 * Visibility: **public**
361 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
362
363
364 #### Arguments
365 * $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
366 for the &quot;current&quot; channel.&lt;/p&gt;
367
368
369
370 ### __construct
371
372 void PAMI\Message\Message::__construct()
373
374 Constructor.
375
376
377
378 * Visibility: **public**
379 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
380
381
382
383
384 ### getCreatedDate
385
386 integer PAMI\Message\Message::getCreatedDate()
387
388 Returns created date.
389
390
391
392 * Visibility: **public**
393 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
394
395
396
397
398 ### setVariable
399
400 void PAMI\Message\Message::setVariable(string $key, string $value)
401
402 Adds a variable to this message.
403
404
405
406 * Visibility: **public**
407 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
408
409
410 #### Arguments
411 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
412 * $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
413
414
415
416 ### getVariable
417
418 string PAMI\Message\Message::getVariable(string $key)
419
420 Returns a variable by name.
421
422
423
424 * Visibility: **public**
425 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
426
427
428 #### Arguments
429 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
430
431
432
433 ### setKey
434
435 void PAMI\Message\Message::setKey(string $key, string $value)
436
437 Adds a variable to this message.
438
439
440
441 * Visibility: **protected**
442 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
443
444
445 #### Arguments
446 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
447 * $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
448
449
450
451 ### getKey
452
453 string PAMI\Message\Message::getKey(string $key)
454
455 Returns a key by name.
456
457
458
459 * Visibility: **public**
460 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
461
462
463 #### Arguments
464 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
465
466
467
468 ### getKeys
469
470 array<mixed,string> PAMI\Message\Message::getKeys()
471
472 Returns all keys for this message.
473
474
475
476 * Visibility: **public**
477 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
478
479
480
481
482 ### getVariables
483
484 array<mixed,string> PAMI\Message\Message::getVariables()
485
486 Returns all variabels for this message.
487
488
489
490 * Visibility: **public**
491 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
492
493
494
495
496 ### finishMessage
497
498 string PAMI\Message\Message::finishMessage($message)
499
500 Returns the end of message token appended to the end of a given message.
501
502
503
504 * Visibility: **protected**
505 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
506
507
508 #### Arguments
509 * $message **mixed**
510
511
512
513 ### serializeVariable
514
515 string PAMI\Message\Message::serializeVariable(string $key, string $value)
516
517 Returns the string representation for an ami action variable.
518
519
520
521 * Visibility: **private**
522 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
523
524
525 #### Arguments
526 * $key **string**
527 * $value **string**
528
529
530
531 ### serialize
532
533 string PAMI\Message\Message::serialize()
534
535 Gives a string representation for this message, ready to be sent to
536 ami.
537
538
539
540 * Visibility: **public**
541 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
542
543
544
545
546 ### getActionID
547
548 string PAMI\Message\Message::getActionID()
549
550 Returns key: 'ActionID'.
551
552
553
554 * Visibility: **public**
555 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
556
557
558
1 PAMI\Message\Event\BridgeInfoCompleteEvent
2 ===============
3
4 Event triggered for the end of the list when an action BridgeInfo is issued.
5
6 PHP Version 5
7
8
9 * Class name: BridgeInfoCompleteEvent
10 * Namespace: PAMI\Message\Event
11 * Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
12
13
14
15 Constants
16 ----------
17
18
19 ### EOL
20
21 const EOL = "\r\n"
22
23
24
25
26
27 ### EOM
28
29 const EOM = "\r\n\r\n"
30
31
32
33
34
35 Properties
36 ----------
37
38
39 ### $rawContent
40
41 protected string $rawContent
42
43 Holds original message.
44
45
46
47 * Visibility: **protected**
48
49
50 ### $channelVariables
51
52 protected array<mixed,string> $channelVariables
53
54 Metadata. Specific channel variables.
55
56
57
58 * Visibility: **protected**
59
60
61 ### $lines
62
63 protected array<mixed,string> $lines
64
65 Message content, line by line. This is what it gets sent
66 or received literally.
67
68
69
70 * Visibility: **protected**
71
72
73 ### $variables
74
75 protected array<mixed,string> $variables
76
77 Metadata. Message variables (key/value).
78
79
80
81 * Visibility: **protected**
82
83
84 ### $keys
85
86 protected array<mixed,string> $keys
87
88 Metadata. Message "keys" i.e: Action: login
89
90
91
92 * Visibility: **protected**
93
94
95 ### $createdDate
96
97 protected integer $createdDate
98
99 Created date (unix timestamp).
100
101
102
103 * Visibility: **protected**
104
105
106 Methods
107 -------
108
109
110 ### getBridgeUniqueid
111
112 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeUniqueid()
113
114 Returns key: 'BridgeUniqueid'.
115
116
117
118 * Visibility: **public**
119
120
121
122
123 ### getBridgeType
124
125 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeType()
126
127 Returns key: 'BridgeType'.
128
129
130
131 * Visibility: **public**
132
133
134
135
136 ### getBridgeTechnology
137
138 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeTechnology()
139
140 Returns key: 'BridgeTechnology'.
141
142
143
144 * Visibility: **public**
145
146
147
148
149 ### getBridgeCreator
150
151 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeCreator()
152
153 Returns key: 'BridgeCreator'.
154
155
156
157 * Visibility: **public**
158
159
160
161
162 ### getBridgeName
163
164 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeName()
165
166 Returns key: 'BridgeName'.
167
168
169
170 * Visibility: **public**
171
172
173
174
175 ### getBridgeNumChannels
176
177 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeNumChannels()
178
179 Returns key: 'BridgeNumChannels'.
180
181
182
183 * Visibility: **public**
184
185
186
187
188 ### getBridgeVideoSourceMode
189
190 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeVideoSourceMode()
191
192 Returns key: 'BridgeVideoSourceMode'.
193
194
195
196 * Visibility: **public**
197
198
199
200
201 ### getBridgeVideoSource
202
203 string PAMI\Message\Event\BridgeInfoCompleteEvent::getBridgeVideoSource()
204
205 Returns key: 'BridgeVideoSource'.
206
207
208
209 * Visibility: **public**
210
211
212
213
214 ### getName
215
216 string PAMI\Message\Event\EventMessage::getName()
217
218 Returns key 'Event'.
219
220
221
222 * Visibility: **public**
223 * This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
224
225
226
227
228 ### __sleep
229
230 array<mixed,string> PAMI\Message\Message::__sleep()
231
232 Serialize function.
233
234
235
236 * Visibility: **public**
237 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
238
239
240
241
242 ### getEventList
243
244 string PAMI\Message\IncomingMessage::getEventList()
245
246 Returns key 'EventList'. In respones, this will surely be a "start". In
247 events, should be a "complete".
248
249
250
251 * Visibility: **public**
252 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
253
254
255
256
257 ### getRawContent
258
259 string PAMI\Message\IncomingMessage::getRawContent()
260
261 Returns the original message content without parsing.
262
263
264
265 * Visibility: **public**
266 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
267
268
269
270
271 ### getAllChannelVariables
272
273 array PAMI\Message\IncomingMessage::getAllChannelVariables()
274
275 Returns the channel variables for all reported channels.
276
277 https://github.com/marcelog/PAMI/issues/85
278
279 The channel names will be lowercased.
280
281 * Visibility: **public**
282 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
283
284
285
286
287 ### getChannelVariables
288
289 array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
290
291 Returns the channel variables for the given channel.
292
293 https://github.com/marcelog/PAMI/issues/85
294
295 * Visibility: **public**
296 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
297
298
299 #### Arguments
300 * $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
301 for the &quot;current&quot; channel.&lt;/p&gt;
302
303
304
305 ### __construct
306
307 void PAMI\Message\Message::__construct()
308
309 Constructor.
310
311
312
313 * Visibility: **public**
314 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
315
316
317
318
319 ### getCreatedDate
320
321 integer PAMI\Message\Message::getCreatedDate()
322
323 Returns created date.
324
325
326
327 * Visibility: **public**
328 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
329
330
331
332
333 ### setVariable
334
335 void PAMI\Message\Message::setVariable(string $key, string $value)
336
337 Adds a variable to this message.
338
339
340
341 * Visibility: **public**
342 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
343
344
345 #### Arguments
346 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
347 * $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
348
349
350
351 ### getVariable
352
353 string PAMI\Message\Message::getVariable(string $key)
354
355 Returns a variable by name.
356
357
358
359 * Visibility: **public**
360 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
361
362
363 #### Arguments
364 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
365
366
367
368 ### setKey
369
370 void PAMI\Message\Message::setKey(string $key, string $value)
371
372 Adds a variable to this message.
373
374
375
376 * Visibility: **protected**
377 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
378
379
380 #### Arguments
381 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
382 * $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
383
384
385
386 ### getKey
387
388 string PAMI\Message\Message::getKey(string $key)
389
390 Returns a key by name.
391
392
393
394 * Visibility: **public**
395 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
396
397
398 #### Arguments
399 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
400
401
402
403 ### getKeys
404
405 array<mixed,string> PAMI\Message\Message::getKeys()
406
407 Returns all keys for this message.
408
409
410
411 * Visibility: **public**
412 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
413
414
415
416
417 ### getVariables
418
419 array<mixed,string> PAMI\Message\Message::getVariables()
420
421 Returns all variabels for this message.
422
423
424
425 * Visibility: **public**
426 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
427
428
429
430
431 ### finishMessage
432
433 string PAMI\Message\Message::finishMessage($message)
434
435 Returns the end of message token appended to the end of a given message.
436
437
438
439 * Visibility: **protected**
440 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
441
442
443 #### Arguments
444 * $message **mixed**
445
446
447
448 ### serializeVariable
449
450 string PAMI\Message\Message::serializeVariable(string $key, string $value)
451
452 Returns the string representation for an ami action variable.
453
454
455
456 * Visibility: **private**
457 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
458
459
460 #### Arguments
461 * $key **string**
462 * $value **string**
463
464
465
466 ### serialize
467
468 string PAMI\Message\Message::serialize()
469
470 Gives a string representation for this message, ready to be sent to
471 ami.
472
473
474
475 * Visibility: **public**
476 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
477
478
479
480
481 ### getActionID
482
483 string PAMI\Message\Message::getActionID()
484
485 Returns key: 'ActionID'.
486
487
488
489 * Visibility: **public**
490 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
491
492
493
1 PAMI\Message\Event\ConfbridgeListCompleteEvent
2 ===============
3
4 Event triggered for the end of the list when an action ConfbridgeList is issued.
5
6 PHP Version 5
7
8
9 * Class name: ConfbridgeListCompleteEvent
10 * Namespace: PAMI\Message\Event
11 * Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
12
13
14
15 Constants
16 ----------
17
18
19 ### EOL
20
21 const EOL = "\r\n"
22
23
24
25
26
27 ### EOM
28
29 const EOM = "\r\n\r\n"
30
31
32
33
34
35 Properties
36 ----------
37
38
39 ### $rawContent
40
41 protected string $rawContent
42
43 Holds original message.
44
45
46
47 * Visibility: **protected**
48
49
50 ### $channelVariables
51
52 protected array<mixed,string> $channelVariables
53
54 Metadata. Specific channel variables.
55
56
57
58 * Visibility: **protected**
59
60
61 ### $lines
62
63 protected array<mixed,string> $lines
64
65 Message content, line by line. This is what it gets sent
66 or received literally.
67
68
69
70 * Visibility: **protected**
71
72
73 ### $variables
74
75 protected array<mixed,string> $variables
76
77 Metadata. Message variables (key/value).
78
79
80
81 * Visibility: **protected**
82
83
84 ### $keys
85
86 protected array<mixed,string> $keys
87
88 Metadata. Message "keys" i.e: Action: login
89
90
91
92 * Visibility: **protected**
93
94
95 ### $createdDate
96
97 protected integer $createdDate
98
99 Created date (unix timestamp).
100
101
102
103 * Visibility: **protected**
104
105
106 Methods
107 -------
108
109
110 ### getListItems
111
112 string PAMI\Message\Event\ConfbridgeListCompleteEvent::getListItems()
113
114 Returns key: 'ListItems'.
115
116
117
118 * Visibility: **public**
119
120
121
122
123 ### getName
124
125 string PAMI\Message\Event\EventMessage::getName()
126
127 Returns key 'Event'.
128
129
130
131 * Visibility: **public**
132 * This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
133
134
135
136
137 ### __sleep
138
139 array<mixed,string> PAMI\Message\Message::__sleep()
140
141 Serialize function.
142
143
144
145 * Visibility: **public**
146 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
147
148
149
150
151 ### getEventList
152
153 string PAMI\Message\IncomingMessage::getEventList()
154
155 Returns key 'EventList'. In respones, this will surely be a "start". In
156 events, should be a "complete".
157
158
159
160 * Visibility: **public**
161 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
162
163
164
165
166 ### getRawContent
167
168 string PAMI\Message\IncomingMessage::getRawContent()
169
170 Returns the original message content without parsing.
171
172
173
174 * Visibility: **public**
175 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
176
177
178
179
180 ### getAllChannelVariables
181
182 array PAMI\Message\IncomingMessage::getAllChannelVariables()
183
184 Returns the channel variables for all reported channels.
185
186 https://github.com/marcelog/PAMI/issues/85
187
188 The channel names will be lowercased.
189
190 * Visibility: **public**
191 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
192
193
194
195
196 ### getChannelVariables
197
198 array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
199
200 Returns the channel variables for the given channel.
201
202 https://github.com/marcelog/PAMI/issues/85
203
204 * Visibility: **public**
205 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
206
207
208 #### Arguments
209 * $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
210 for the &quot;current&quot; channel.&lt;/p&gt;
211
212
213
214 ### __construct
215
216 void PAMI\Message\Message::__construct()
217
218 Constructor.
219
220
221
222 * Visibility: **public**
223 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
224
225
226
227
228 ### getCreatedDate
229
230 integer PAMI\Message\Message::getCreatedDate()
231
232 Returns created date.
233
234
235
236 * Visibility: **public**
237 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
238
239
240
241
242 ### setVariable
243
244 void PAMI\Message\Message::setVariable(string $key, string $value)
245
246 Adds a variable to this message.
247
248
249
250 * Visibility: **public**
251 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
252
253
254 #### Arguments
255 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
256 * $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
257
258
259
260 ### getVariable
261
262 string PAMI\Message\Message::getVariable(string $key)
263
264 Returns a variable by name.
265
266
267
268 * Visibility: **public**
269 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
270
271
272 #### Arguments
273 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
274
275
276
277 ### setKey
278
279 void PAMI\Message\Message::setKey(string $key, string $value)
280
281 Adds a variable to this message.
282
283
284
285 * Visibility: **protected**
286 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
287
288
289 #### Arguments
290 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
291 * $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
292
293
294
295 ### getKey
296
297 string PAMI\Message\Message::getKey(string $key)
298
299 Returns a key by name.
300
301
302
303 * Visibility: **public**
304 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
305
306
307 #### Arguments
308 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
309
310
311
312 ### getKeys
313
314 array<mixed,string> PAMI\Message\Message::getKeys()
315
316 Returns all keys for this message.
317
318
319
320 * Visibility: **public**
321 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
322
323
324
325
326 ### getVariables
327
328 array<mixed,string> PAMI\Message\Message::getVariables()
329
330 Returns all variabels for this message.
331
332
333
334 * Visibility: **public**
335 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
336
337
338
339
340 ### finishMessage
341
342 string PAMI\Message\Message::finishMessage($message)
343
344 Returns the end of message token appended to the end of a given message.
345
346
347
348 * Visibility: **protected**
349 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
350
351
352 #### Arguments
353 * $message **mixed**
354
355
356
357 ### serializeVariable
358
359 string PAMI\Message\Message::serializeVariable(string $key, string $value)
360
361 Returns the string representation for an ami action variable.
362
363
364
365 * Visibility: **private**
366 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
367
368
369 #### Arguments
370 * $key **string**
371 * $value **string**
372
373
374
375 ### serialize
376
377 string PAMI\Message\Message::serialize()
378
379 Gives a string representation for this message, ready to be sent to
380 ami.
381
382
383
384 * Visibility: **public**
385 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
386
387
388
389
390 ### getActionID
391
392 string PAMI\Message\Message::getActionID()
393
394 Returns key: 'ActionID'.
395
396
397
398 * Visibility: **public**
399 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
400
401
402
1 PAMI\Message\Event\ConfbridgeListEvent
2 ===============
3
4 Event triggered when an action ConfbridgeList is issued.
5
6 PHP Version 5
7
8
9 * Class name: ConfbridgeListEvent
10 * Namespace: PAMI\Message\Event
11 * Parent class: [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
12
13
14
15 Constants
16 ----------
17
18
19 ### EOL
20
21 const EOL = "\r\n"
22
23
24
25
26
27 ### EOM
28
29 const EOM = "\r\n\r\n"
30
31
32
33
34
35 Properties
36 ----------
37
38
39 ### $rawContent
40
41 protected string $rawContent
42
43 Holds original message.
44
45
46
47 * Visibility: **protected**
48
49
50 ### $channelVariables
51
52 protected array<mixed,string> $channelVariables
53
54 Metadata. Specific channel variables.
55
56
57
58 * Visibility: **protected**
59
60
61 ### $lines
62
63 protected array<mixed,string> $lines
64
65 Message content, line by line. This is what it gets sent
66 or received literally.
67
68
69
70 * Visibility: **protected**
71
72
73 ### $variables
74
75 protected array<mixed,string> $variables
76
77 Metadata. Message variables (key/value).
78
79
80
81 * Visibility: **protected**
82
83
84 ### $keys
85
86 protected array<mixed,string> $keys
87
88 Metadata. Message "keys" i.e: Action: login
89
90
91
92 * Visibility: **protected**
93
94
95 ### $createdDate
96
97 protected integer $createdDate
98
99 Created date (unix timestamp).
100
101
102
103 * Visibility: **protected**
104
105
106 Methods
107 -------
108
109
110 ### getConference
111
112 string PAMI\Message\Event\ConfbridgeListEvent::getConference()
113
114 Returns key: 'Conference'.
115
116
117
118 * Visibility: **public**
119
120
121
122
123 ### getChannel
124
125 string PAMI\Message\Event\ConfbridgeListEvent::getChannel()
126
127 Returns key: 'Channel'.
128
129
130
131 * Visibility: **public**
132
133
134
135
136 ### getCallerIDNum
137
138 string PAMI\Message\Event\ConfbridgeListEvent::getCallerIDNum()
139
140 Returns key: 'CallerIDNum'.
141
142
143
144 * Visibility: **public**
145
146
147
148
149 ### getCallerIDName
150
151 string PAMI\Message\Event\ConfbridgeListEvent::getCallerIDName()
152
153 Returns key: 'CallerIDName'.
154
155
156
157 * Visibility: **public**
158
159
160
161
162 ### getMarkedUser
163
164 string PAMI\Message\Event\ConfbridgeListEvent::getMarkedUser()
165
166 Returns key: 'MarkedUser'.
167
168
169
170 * Visibility: **public**
171
172
173
174
175 ### getWaitMarked
176
177 string PAMI\Message\Event\ConfbridgeListEvent::getWaitMarked()
178
179 Returns key: 'WaitMarked'.
180
181
182
183 * Visibility: **public**
184
185
186
187
188 ### getEndMarked
189
190 string PAMI\Message\Event\ConfbridgeListEvent::getEndMarked()
191
192 Returns key: 'EndMarked'.
193
194
195
196 * Visibility: **public**
197
198
199
200
201 ### getWaiting
202
203 string PAMI\Message\Event\ConfbridgeListEvent::getWaiting()
204
205 Returns key: 'Waiting'.
206
207
208
209 * Visibility: **public**
210
211
212
213
214 ### getMuted
215
216 string PAMI\Message\Event\ConfbridgeListEvent::getMuted()
217
218 Returns key: 'Muted'.
219
220
221
222 * Visibility: **public**
223
224
225
226
227 ### getAnsweredTime
228
229 string PAMI\Message\Event\ConfbridgeListEvent::getAnsweredTime()
230
231 Returns key: 'AnsweredTime'.
232
233
234
235 * Visibility: **public**
236
237
238
239
240 ### getAdmin
241
242 string PAMI\Message\Event\ConfbridgeListEvent::getAdmin()
243
244 Returns key: 'Admin'.
245
246
247
248 * Visibility: **public**
249
250
251
252
253 ### getName
254
255 string PAMI\Message\Event\EventMessage::getName()
256
257 Returns key 'Event'.
258
259
260
261 * Visibility: **public**
262 * This method is defined by [PAMI\Message\Event\EventMessage](PAMI-Message-Event-EventMessage.md)
263
264
265
266
267 ### __sleep
268
269 array<mixed,string> PAMI\Message\Message::__sleep()
270
271 Serialize function.
272
273
274
275 * Visibility: **public**
276 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
277
278
279
280
281 ### getEventList
282
283 string PAMI\Message\IncomingMessage::getEventList()
284
285 Returns key 'EventList'. In respones, this will surely be a "start". In
286 events, should be a "complete".
287
288
289
290 * Visibility: **public**
291 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
292
293
294
295
296 ### getRawContent
297
298 string PAMI\Message\IncomingMessage::getRawContent()
299
300 Returns the original message content without parsing.
301
302
303
304 * Visibility: **public**
305 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
306
307
308
309
310 ### getAllChannelVariables
311
312 array PAMI\Message\IncomingMessage::getAllChannelVariables()
313
314 Returns the channel variables for all reported channels.
315
316 https://github.com/marcelog/PAMI/issues/85
317
318 The channel names will be lowercased.
319
320 * Visibility: **public**
321 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
322
323
324
325
326 ### getChannelVariables
327
328 array PAMI\Message\IncomingMessage::getChannelVariables(string $channel)
329
330 Returns the channel variables for the given channel.
331
332 https://github.com/marcelog/PAMI/issues/85
333
334 * Visibility: **public**
335 * This method is defined by [PAMI\Message\IncomingMessage](PAMI-Message-IncomingMessage.md)
336
337
338 #### Arguments
339 * $channel **string** - &lt;p&gt;Channel name. If not given, will return variables
340 for the &quot;current&quot; channel.&lt;/p&gt;
341
342
343
344 ### __construct
345
346 void PAMI\Message\Message::__construct()
347
348 Constructor.
349
350
351
352 * Visibility: **public**
353 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
354
355
356
357
358 ### getCreatedDate
359
360 integer PAMI\Message\Message::getCreatedDate()
361
362 Returns created date.
363
364
365
366 * Visibility: **public**
367 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
368
369
370
371
372 ### setVariable
373
374 void PAMI\Message\Message::setVariable(string $key, string $value)
375
376 Adds a variable to this message.
377
378
379
380 * Visibility: **public**
381 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
382
383
384 #### Arguments
385 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
386 * $value **string** - &lt;p&gt;Variable value.&lt;/p&gt;
387
388
389
390 ### getVariable
391
392 string PAMI\Message\Message::getVariable(string $key)
393
394 Returns a variable by name.
395
396
397
398 * Visibility: **public**
399 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
400
401
402 #### Arguments
403 * $key **string** - &lt;p&gt;Variable name.&lt;/p&gt;
404
405
406
407 ### setKey
408
409 void PAMI\Message\Message::setKey(string $key, string $value)
410
411 Adds a variable to this message.
412
413
414
415 * Visibility: **protected**
416 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
417
418
419 #### Arguments
420 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
421 * $value **string** - &lt;p&gt;Key value.&lt;/p&gt;
422
423
424
425 ### getKey
426
427 string PAMI\Message\Message::getKey(string $key)
428
429 Returns a key by name.
430
431
432
433 * Visibility: **public**
434 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
435
436
437 #### Arguments
438 * $key **string** - &lt;p&gt;Key name (i.e: Action).&lt;/p&gt;
439
440
441
442 ### getKeys
443
444 array<mixed,string> PAMI\Message\Message::getKeys()
445
446 Returns all keys for this message.
447
448
449
450 * Visibility: **public**
451 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
452
453
454
455
456 ### getVariables
457
458 array<mixed,string> PAMI\Message\Message::getVariables()
459
460 Returns all variabels for this message.
461
462
463
464 * Visibility: **public**
465 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
466
467
468
469
470 ### finishMessage
471
472 string PAMI\Message\Message::finishMessage($message)
473
474 Returns the end of message token appended to the end of a given message.
475
476
477
478 * Visibility: **protected**
479 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
480
481
482 #### Arguments
483 * $message **mixed**
484
485
486
487 ### serializeVariable
488
489 string PAMI\Message\Message::serializeVariable(string $key, string $value)
490
491 Returns the string representation for an ami action variable.
492
493
494
495 * Visibility: **private**
496 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
497
498
499 #### Arguments
500 * $key **string**
501 * $value **string**
502
503
504
505 ### serialize
506
507 string PAMI\Message\Message::serialize()
508
509 Gives a string representation for this message, ready to be sent to
510 ami.
511
512
513
514 * Visibility: **public**
515 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
516
517
518
519
520 ### getActionID
521
522 string PAMI\Message\Message::getActionID()
523
524 Returns key: 'ActionID'.
525
526
527
528 * Visibility: **public**
529 * This method is defined by [PAMI\Message\Message](PAMI-Message-Message.md)
530
531
532
...@@ -34,9 +34,7 @@ use PAMI\Message\OutgoingMessage; ...@@ -34,9 +34,7 @@ use PAMI\Message\OutgoingMessage;
34 use PAMI\Message\Message; 34 use PAMI\Message\Message;
35 use PAMI\Message\IncomingMessage; 35 use PAMI\Message\IncomingMessage;
36 use PAMI\Message\Action\LoginAction; 36 use PAMI\Message\Action\LoginAction;
37 use PAMI\Message\Action\LogoffAction;
38 use PAMI\Message\Response\ResponseMessage; 37 use PAMI\Message\Response\ResponseMessage;
39 use PAMI\Message\Event\EventMessage;
40 use PAMI\Message\Event\Factory\Impl\EventFactoryImpl; 38 use PAMI\Message\Event\Factory\Impl\EventFactoryImpl;
41 use PAMI\Listener\IEventListener; 39 use PAMI\Listener\IEventListener;
42 use PAMI\Client\Exception\ClientException; 40 use PAMI\Client\Exception\ClientException;
...@@ -60,7 +58,7 @@ class ClientImpl implements IClient ...@@ -60,7 +58,7 @@ class ClientImpl implements IClient
60 { 58 {
61 /** 59 /**
62 * PSR-3 logger. 60 * PSR-3 logger.
63 * @var Logger 61 * @var LoggerInterface
64 */ 62 */
65 private $logger; 63 private $logger;
66 64
...@@ -151,6 +149,12 @@ class ClientImpl implements IClient ...@@ -151,6 +149,12 @@ class ClientImpl implements IClient
151 private $lastActionId; 149 private $lastActionId;
152 150
153 /** 151 /**
152 * Event mask to apply on login action.
153 * @var string|null
154 */
155 private $eventMask;
156
157 /**
154 * Opens a tcp connection to ami. 158 * Opens a tcp connection to ami.
155 * 159 *
156 * @throws \PAMI\Client\Exception\ClientException 160 * @throws \PAMI\Client\Exception\ClientException
...@@ -173,7 +177,7 @@ class ClientImpl implements IClient ...@@ -173,7 +177,7 @@ class ClientImpl implements IClient
173 if ($this->socket === false) { 177 if ($this->socket === false) {
174 throw new ClientException('Error connecting to ami: ' . $errstr); 178 throw new ClientException('Error connecting to ami: ' . $errstr);
175 } 179 }
176 $msg = new LoginAction($this->user, $this->pass); 180 $msg = new LoginAction($this->user, $this->pass, $this->eventMask);
177 $asteriskId = @stream_get_line($this->socket, 1024, Message::EOL); 181 $asteriskId = @stream_get_line($this->socket, 1024, Message::EOL);
178 if (strstr($asteriskId, 'Asterisk') === false) { 182 if (strstr($asteriskId, 'Asterisk') === false) {
179 throw new ClientException( 183 throw new ClientException(
...@@ -434,7 +438,7 @@ class ClientImpl implements IClient ...@@ -434,7 +438,7 @@ class ClientImpl implements IClient
434 /** 438 /**
435 * Sets the logger implementation. 439 * Sets the logger implementation.
436 * 440 *
437 * @param Psr\Log\LoggerInterface $logger The PSR3-Logger 441 * @param LoggerInterface $logger The PSR3-Logger
438 * 442 *
439 * @return void 443 * @return void
440 */ 444 */
...@@ -453,12 +457,13 @@ class ClientImpl implements IClient ...@@ -453,12 +457,13 @@ class ClientImpl implements IClient
453 { 457 {
454 $this->logger = new NullLogger; 458 $this->logger = new NullLogger;
455 $this->host = $options['host']; 459 $this->host = $options['host'];
456 $this->port = intval($options['port']); 460 $this->port = (int) $options['port'];
457 $this->user = $options['username']; 461 $this->user = $options['username'];
458 $this->pass = $options['secret']; 462 $this->pass = $options['secret'];
459 $this->cTimeout = $options['connect_timeout']; 463 $this->cTimeout = $options['connect_timeout'];
460 $this->rTimeout = $options['read_timeout']; 464 $this->rTimeout = $options['read_timeout'];
461 $this->scheme = isset($options['scheme']) ? $options['scheme'] : 'tcp://'; 465 $this->scheme = isset($options['scheme']) ? $options['scheme'] : 'tcp://';
466 $this->eventMask = isset($options['event_mask']) ? $options['event_mask'] : null;
462 $this->eventListeners = array(); 467 $this->eventListeners = array();
463 $this->eventFactory = new EventFactoryImpl(); 468 $this->eventFactory = new EventFactoryImpl();
464 $this->incomingQueue = array(); 469 $this->incomingQueue = array();
......
1 <?php
2 /**
3 * BlindTransfer action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * BlindTransfer action message.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class BlindTransferAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param string $channel Transferer's channel.
50 * @param string $extension Extension to transfer to.
51 * @param string $context Context to transfer to.
52 */
53 public function __construct($channel, $extension, $context)
54 {
55 parent::__construct('BlindTransfer');
56 $this->setKey('Channel', $channel);
57 $this->setKey('Exten', $extension);
58 $this->setKey('Context', $context);
59 }
60 }
1 <?php
2 /**
3 * Returns detailed information about a bridge and the channels in it.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * Returns detailed information about a bridge and the channels in it.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Matt Styles <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class BridgeInfoAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param string $bridgeUniqueid The unique ID of the bridge about which to retrieve information.
50 *
51 * @return void
52 */
53 public function __construct($bridgeUniqueid)
54 {
55 parent::__construct('BridgeInfo');
56
57 $this->setKey('BridgeUniqueid', $bridgeUniqueid);
58 }
59 }
1 <?php 1 <?php
2 /**
3 * Challenge action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * Challenge action message.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ChallengeAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param string $authType Auth type
50 */
51 public function __construct($authType = 'MD5')
52 {
53 parent::__construct('Challenge');
54 $this->setKey('AuthType', $authType);
55 }
56 }
......
1 <?php
2 /**
3 * ConfbridgeList action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * Lists all users in a particular ConfBridge conference.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Matt Styles <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeListAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param string $conference Conference on which to act.
50 *
51 * @return void
52 */
53 public function __construct($conference)
54 {
55 parent::__construct('ConfbridgeList');
56 $this->setKey('Conference', $conference);
57 }
58 }
1 <?php 1 <?php
2 /**
3 * DAHDITransfer action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * DAHDITransfer action message.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class DAHDITransferAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param string $channel DAHDIChannel
50 */
51 public function __construct($channel)
52 {
53 parent::__construct('DAHDITransfer');
54 $this->setKey('DAHDIChannel', $channel);
55 }
56 }
......
...@@ -47,12 +47,17 @@ class HangupAction extends ActionMessage ...@@ -47,12 +47,17 @@ class HangupAction extends ActionMessage
47 * Constructor. 47 * Constructor.
48 * 48 *
49 * @param string $channel Channel to hangup. 49 * @param string $channel Channel to hangup.
50 * @param int $cause Hangup cause.
50 * 51 *
51 * @return void 52 * @return void
52 */ 53 */
53 public function __construct($channel) 54 public function __construct($channel, $cause = null)
54 { 55 {
55 parent::__construct('Hangup'); 56 parent::__construct('Hangup');
56 $this->setKey('Channel', $channel); 57 $this->setKey('Channel', $channel);
58
59 if (null !== $cause) {
60 $this->setKey('Cause', $cause);
61 }
57 } 62 }
58 } 63 }
......
...@@ -46,15 +46,20 @@ class LoginAction extends ActionMessage ...@@ -46,15 +46,20 @@ class LoginAction extends ActionMessage
46 /** 46 /**
47 * Constructor. 47 * Constructor.
48 * 48 *
49 * @param string $user AMI username. 49 * @param string $user AMI username.
50 * @param string $password AMI password. 50 * @param string $password AMI password.
51 * @param string|null $eventMask
51 * 52 *
52 * @return void 53 * @return void
53 */ 54 */
54 public function __construct($user, $password) 55 public function __construct($user, $password, $eventMask = null)
55 { 56 {
56 parent::__construct('Login'); 57 parent::__construct('Login');
57 $this->setKey('Username', $user); 58 $this->setKey('Username', $user);
58 $this->setKey('Secret', $password); 59 $this->setKey('Secret', $password);
60
61 if (null !== $eventMask) {
62 $this->setKey('Events', $eventMask);
63 }
59 } 64 }
60 } 65 }
......
1 <?php
2 /**
3 * MixMonitorMute action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * MixMonitorMute action message.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Matt Styles <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class MixMonitorMuteAction extends ActionMessage
45 {
46 const DIRECTION_READ = 'read';
47 const DIRECTION_WRITE = 'write';
48 const DIRECTION_BOTH = 'both';
49
50 /**
51 * Sets state key.
52 *
53 * @param bool $state Mute state
54 *
55 * @return void
56 */
57 public function setState($state)
58 {
59 $this->setKey('State', $state ? 1 : 0);
60 }
61
62 /**
63 * Sets state key.
64 *
65 * @param string $direction Which part of the recording to mute:
66 * read, write or both (from channel, to channel or both channels).
67 *
68 * @return void
69 */
70 public function setDirection($direction)
71 {
72 $this->setKey('Direction', $direction);
73 }
74
75 /**
76 * Constructor.
77 *
78 * @param string $channel Channel on which to act.
79 * @param bool $state Turn mute on or off
80 * @param string $direction Which part of the recording to mute:
81 * read, write or both (from channel, to channel or both channels).
82 */
83 public function __construct($channel, $state = true, $direction = 'both')
84 {
85 parent::__construct('MixMonitorMute');
86 $this->setKey('Channel', $channel);
87 $this->setState($state);
88 $this->setDirection($direction);
89 }
90 }
1 <?php 1 <?php
2 /**
3 * UserEvent action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * UserEvent action message.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class UserEventAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param string $userEvent UserEvent
50 * @param array $headers
51 */
52 public function __construct($userEvent, array $headers = [])
53 {
54 parent::__construct('UserEvent');
55 $this->setKey('UserEvent', $userEvent);
56 foreach ($headers as $key => $value) {
57 $this->setKey((string)$key, (string)$value);
58 }
59 }
60 }
......
...@@ -150,8 +150,8 @@ class VGSMSMSTxAction extends ActionMessage ...@@ -150,8 +150,8 @@ class VGSMSMSTxAction extends ActionMessage
150 public function setConcatTotalMsg($totalmsg) 150 public function setConcatTotalMsg($totalmsg)
151 { 151 {
152 $this->setKey('X-SMS-Concatenate-Total-Messages', $totalmsg); 152 $this->setKey('X-SMS-Concatenate-Total-Messages', $totalmsg);
153
154 } 153 }
154
155 /** 155 /**
156 * Sets Account key. 156 * Sets Account key.
157 * 157 *
......
1 <?php 1 <?php
2 /**
3 * WaitEvent action message.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Action
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Action;
31
32 /**
33 * WaitEvent action message.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Action
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class WaitEventAction extends ActionMessage
45 {
46 /**
47 * Constructor.
48 *
49 * @param int $timeout Timeout in seconds
50 */
51 public function __construct($timeout)
52 {
53 parent::__construct('WaitEvent');
54 $this->setKey('Timeout', (int)$timeout);
55 }
56 }
......
1 <?php
2 /**
3 * Event triggered when an action BridgeInfo is issued.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when an action BridgeInfo is issued.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Matt Styles <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class BridgeInfoChannelEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Channel'.
48 *
49 * @return string
50 */
51 public function getChannel()
52 {
53 return $this->getKey('Channel');
54 }
55
56 /**
57 * Returns key: 'ChannelState'.
58 *
59 * @return string
60 */
61 public function getChannelState()
62 {
63 return $this->getKey('ChannelState');
64 }
65
66 /**
67 * Returns key: 'ChannelStateDesc'.
68 *
69 * @return string
70 */
71 public function getChannelStateDesc()
72 {
73 return $this->getKey('ChannelStateDesc');
74 }
75
76 /**
77 * Returns key: 'CallerIDNum'.
78 *
79 * @return string
80 */
81 public function getCallerIDNum()
82 {
83 return $this->getKey('CallerIDNum');
84 }
85
86 /**
87 * Returns key: 'CallerIDName'.
88 *
89 * @return string
90 */
91 public function getCallerIDName()
92 {
93 return $this->getKey('CallerIDName');
94 }
95
96 /**
97 * Returns key: 'ConnectedLineNum'.
98 *
99 * @return string
100 */
101 public function getConnectedLineNum()
102 {
103 return $this->getKey('ConnectedLineNum');
104 }
105
106 /**
107 * Returns key: 'ConnectedLineName'.
108 *
109 * @return string
110 */
111 public function getConnectedLineName()
112 {
113 return $this->getKey('ConnectedLineName');
114 }
115
116 /**
117 * Returns key: 'AccountCode'.
118 *
119 * @return string
120 */
121 public function getAccountCode()
122 {
123 return $this->getKey('AccountCode');
124 }
125
126 /**
127 * Returns key: 'Context'.
128 *
129 * @return string
130 */
131 public function getContext()
132 {
133 return $this->getKey('Context');
134 }
135
136 /**
137 * Returns key: 'Exten'.
138 *
139 * @return string
140 */
141 public function getExten()
142 {
143 return $this->getKey('Exten');
144 }
145
146 /**
147 * Returns key: 'Priority'.
148 *
149 * @return string
150 */
151 public function getPriority()
152 {
153 return $this->getKey('Priority');
154 }
155
156 /**
157 * Returns key: 'Uniqueid'.
158 *
159 * @return string
160 */
161 public function getUniqueid()
162 {
163 return $this->getKey('Uniqueid');
164 }
165
166 /**
167 * Returns key: 'Linkedid'.
168 *
169 * @return string
170 */
171 public function getLinkedid()
172 {
173 return $this->getKey('Linkedid');
174 }
175 }
1 <?php
2 /**
3 * Event triggered for the end of the list when an action BridgeInfo is issued.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered for the end of the list when an action BridgeInfo is issued.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Matt Styles <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class BridgeInfoCompleteEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'BridgeUniqueid'.
48 *
49 * @return string
50 */
51 public function getBridgeUniqueid()
52 {
53 return $this->getKey('BridgeUniqueid');
54 }
55
56 /**
57 * Returns key: 'BridgeType'.
58 *
59 * @return string
60 */
61 public function getBridgeType()
62 {
63 return $this->getKey('BridgeType');
64 }
65
66 /**
67 * Returns key: 'BridgeTechnology'.
68 *
69 * @return string
70 */
71 public function getBridgeTechnology()
72 {
73 return $this->getKey('BridgeTechnology');
74 }
75
76 /**
77 * Returns key: 'BridgeCreator'.
78 *
79 * @return string
80 */
81 public function getBridgeCreator()
82 {
83 return $this->getKey('BridgeCreator');
84 }
85
86 /**
87 * Returns key: 'BridgeName'.
88 *
89 * @return string
90 */
91 public function getBridgeName()
92 {
93 return $this->getKey('BridgeName');
94 }
95
96 /**
97 * Returns key: 'BridgeNumChannels'.
98 *
99 * @return string
100 */
101 public function getBridgeNumChannels()
102 {
103 return $this->getKey('BridgeNumChannels');
104 }
105
106 /**
107 * Returns key: 'BridgeVideoSourceMode'.
108 *
109 * @return string
110 */
111 public function getBridgeVideoSourceMode()
112 {
113 return $this->getKey('BridgeVideoSourceMode');
114 }
115
116 /**
117 * Returns key: 'BridgeVideoSource'.
118 *
119 * @return string
120 */
121 public function getBridgeVideoSource()
122 {
123 return $this->getKey('BridgeVideoSource');
124 }
125 }
1 <?php
2 /**
3 * Event triggered when a confbridge is destroyed.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when a confbridge is destroyed.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeEndEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Privilege'.
48 *
49 * @return string
50 */
51 public function getPrivilege()
52 {
53 return $this->getKey('Privilege');
54 }
55
56 /**
57 * Returns key: 'Conference'.
58 *
59 * @return string
60 */
61 public function getConference()
62 {
63 return $this->getKey('Conference');
64 }
65
66 /**
67 * Returns key: 'BridgeUniqueid'.
68 *
69 * @return string
70 */
71 public function getBridgeUniqueid()
72 {
73 return $this->getKey('BridgeUniqueid');
74 }
75
76 /**
77 * Returns key: 'BridgeType'.
78 *
79 * @return string
80 */
81 public function getBridgeType()
82 {
83 return $this->getKey('BridgeType');
84 }
85
86 /**
87 * Returns key: 'BridgeTechnology'.
88 *
89 * @return string
90 */
91 public function getBridgeTechnology()
92 {
93 return $this->getKey('BridgeTechnology');
94 }
95
96 /**
97 * Returns key: 'BridgeCreator'.
98 *
99 * @return string
100 */
101 public function getBridgeCreator()
102 {
103 return $this->getKey('BridgeCreator');
104 }
105
106 /**
107 * Returns key: 'BridgeName'.
108 *
109 * @return string
110 */
111 public function getBridgeName()
112 {
113 return $this->getKey('BridgeName');
114 }
115
116 /**
117 * Returns key: 'BridgeNumChannels'.
118 *
119 * @return string
120 */
121 public function getBridgeNumChannels()
122 {
123 return $this->getKey('BridgeNumChannels');
124 }
125 }
1 <?php
2 /**
3 * Event triggered when a channel enters a confbridge.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when a channel enters a confbridge.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeJoinEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Privilege'.
48 *
49 * @return string
50 */
51 public function getPrivilege()
52 {
53 return $this->getKey('Privilege');
54 }
55
56 /**
57 * Returns key: 'Conference'.
58 *
59 * @return string
60 */
61 public function getConference()
62 {
63 return $this->getKey('Conference');
64 }
65
66 /**
67 * Returns key: 'BridgeUniqueid'.
68 *
69 * @return string
70 */
71 public function getBridgeUniqueid()
72 {
73 return $this->getKey('BridgeUniqueid');
74 }
75
76 /**
77 * Returns key: 'BridgeType'.
78 *
79 * @return string
80 */
81 public function getBridgeType()
82 {
83 return $this->getKey('BridgeType');
84 }
85
86 /**
87 * Returns key: 'BridgeTechnology'.
88 *
89 * @return string
90 */
91 public function getBridgeTechnology()
92 {
93 return $this->getKey('BridgeTechnology');
94 }
95
96 /**
97 * Returns key: 'BridgeCreator'.
98 *
99 * @return string
100 */
101 public function getBridgeCreator()
102 {
103 return $this->getKey('BridgeCreator');
104 }
105
106 /**
107 * Returns key: 'BridgeName'.
108 *
109 * @return string
110 */
111 public function getBridgeName()
112 {
113 return $this->getKey('BridgeName');
114 }
115
116 /**
117 * Returns key: 'BridgeNumChannels'.
118 *
119 * @return string
120 */
121 public function getBridgeNumChannels()
122 {
123 return $this->getKey('BridgeNumChannels');
124 }
125
126 /**
127 * Returns key: 'Channel'.
128 *
129 * @return string
130 */
131 public function getChannel()
132 {
133 return $this->getKey('Channel');
134 }
135
136 /**
137 * Returns key: 'ChannelState'.
138 *
139 * @return string
140 */
141 public function getChannelState()
142 {
143 return $this->getKey('ChannelState');
144 }
145
146 /**
147 * Returns key: 'ChannelStateDesc'.
148 *
149 * @return string
150 */
151 public function getChannelStateDesc()
152 {
153 return $this->getKey('ChannelStateDesc');
154 }
155
156 /**
157 * Returns key: 'CallerIDNum'.
158 *
159 * @return string
160 */
161 public function getCallerIDNum()
162 {
163 return $this->getKey('CallerIDNum');
164 }
165
166 /**
167 * Returns key: 'CallerIDName'.
168 *
169 * @return string
170 */
171 public function getCallerIDName()
172 {
173 return $this->getKey('CallerIDName');
174 }
175
176 /**
177 * Returns key: 'ConnectedLineNum'.
178 *
179 * @return string
180 */
181 public function getConnectedLineNum()
182 {
183 return $this->getKey('ConnectedLineNum');
184 }
185
186 /**
187 * Returns key: 'ConnectedLineName'.
188 *
189 * @return string
190 */
191 public function getConnectedLineName()
192 {
193 return $this->getKey('ConnectedLineName');
194 }
195
196 /**
197 * Returns key: 'AccountCode'.
198 *
199 * @return string
200 */
201 public function getAccountCode()
202 {
203 return $this->getKey('AccountCode');
204 }
205
206 /**
207 * Returns key: 'Context'.
208 *
209 * @return string
210 */
211 public function getContext()
212 {
213 return $this->getKey('Context');
214 }
215
216 /**
217 * Returns key: 'Exten'.
218 *
219 * @return string
220 */
221 public function getExten()
222 {
223 return $this->getKey('Exten');
224 }
225
226 /**
227 * Returns key: 'Priority'.
228 *
229 * @return string
230 */
231 public function getPriority()
232 {
233 return $this->getKey('Priority');
234 }
235
236 /**
237 * Returns key: 'Uniqueid'.
238 *
239 * @return string
240 */
241 public function getUniqueid()
242 {
243 return $this->getKey('Uniqueid');
244 }
245
246 /**
247 * Returns key: 'Linkedid'.
248 *
249 * @return string
250 */
251 public function getLinkedid()
252 {
253 return $this->getKey('Linkedid');
254 }
255
256 /**
257 * Returns key: 'Admin'.
258 *
259 * @return string
260 */
261 public function getAdmin()
262 {
263 return $this->getKey('Admin');
264 }
265 }
1 <?php
2 /**
3 * Event triggered when a channel leaves a confbridge.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when a channel leaves a confbridge.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeLeaveEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Privilege'.
48 *
49 * @return string
50 */
51 public function getPrivilege()
52 {
53 return $this->getKey('Privilege');
54 }
55
56 /**
57 * Returns key: 'Conference'.
58 *
59 * @return string
60 */
61 public function getConference()
62 {
63 return $this->getKey('Conference');
64 }
65
66 /**
67 * Returns key: 'BridgeUniqueid'.
68 *
69 * @return string
70 */
71 public function getBridgeUniqueid()
72 {
73 return $this->getKey('BridgeUniqueid');
74 }
75
76 /**
77 * Returns key: 'BridgeType'.
78 *
79 * @return string
80 */
81 public function getBridgeType()
82 {
83 return $this->getKey('BridgeType');
84 }
85
86 /**
87 * Returns key: 'BridgeTechnology'.
88 *
89 * @return string
90 */
91 public function getBridgeTechnology()
92 {
93 return $this->getKey('BridgeTechnology');
94 }
95
96 /**
97 * Returns key: 'BridgeCreator'.
98 *
99 * @return string
100 */
101 public function getBridgeCreator()
102 {
103 return $this->getKey('BridgeCreator');
104 }
105
106 /**
107 * Returns key: 'BridgeName'.
108 *
109 * @return string
110 */
111 public function getBridgeName()
112 {
113 return $this->getKey('BridgeName');
114 }
115
116 /**
117 * Returns key: 'BridgeNumChannels'.
118 *
119 * @return string
120 */
121 public function getBridgeNumChannels()
122 {
123 return $this->getKey('BridgeNumChannels');
124 }
125
126 /**
127 * Returns key: 'Channel'.
128 *
129 * @return string
130 */
131 public function getChannel()
132 {
133 return $this->getKey('Channel');
134 }
135
136 /**
137 * Returns key: 'ChannelState'.
138 *
139 * @return string
140 */
141 public function getChannelState()
142 {
143 return $this->getKey('ChannelState');
144 }
145
146 /**
147 * Returns key: 'ChannelStateDesc'.
148 *
149 * @return string
150 */
151 public function getChannelStateDesc()
152 {
153 return $this->getKey('ChannelStateDesc');
154 }
155
156 /**
157 * Returns key: 'CallerIDNum'.
158 *
159 * @return string
160 */
161 public function getCallerIDNum()
162 {
163 return $this->getKey('CallerIDNum');
164 }
165
166 /**
167 * Returns key: 'CallerIDName'.
168 *
169 * @return string
170 */
171 public function getCallerIDName()
172 {
173 return $this->getKey('CallerIDName');
174 }
175
176 /**
177 * Returns key: 'ConnectedLineNum'.
178 *
179 * @return string
180 */
181 public function getConnectedLineNum()
182 {
183 return $this->getKey('ConnectedLineNum');
184 }
185
186 /**
187 * Returns key: 'ConnectedLineName'.
188 *
189 * @return string
190 */
191 public function getConnectedLineName()
192 {
193 return $this->getKey('ConnectedLineName');
194 }
195
196 /**
197 * Returns key: 'AccountCode'.
198 *
199 * @return string
200 */
201 public function getAccountCode()
202 {
203 return $this->getKey('AccountCode');
204 }
205
206 /**
207 * Returns key: 'Context'.
208 *
209 * @return string
210 */
211 public function getContext()
212 {
213 return $this->getKey('Context');
214 }
215
216 /**
217 * Returns key: 'Exten'.
218 *
219 * @return string
220 */
221 public function getExten()
222 {
223 return $this->getKey('Exten');
224 }
225
226 /**
227 * Returns key: 'Priority'.
228 *
229 * @return string
230 */
231 public function getPriority()
232 {
233 return $this->getKey('Priority');
234 }
235
236 /**
237 * Returns key: 'Uniqueid'.
238 *
239 * @return string
240 */
241 public function getUniqueid()
242 {
243 return $this->getKey('Uniqueid');
244 }
245
246 /**
247 * Returns key: 'Linkedid'.
248 *
249 * @return string
250 */
251 public function getLinkedid()
252 {
253 return $this->getKey('Linkedid');
254 }
255
256 /**
257 * Returns key: 'Admin'.
258 *
259 * @return string
260 */
261 public function getAdmin()
262 {
263 return $this->getKey('Admin');
264 }
265 }
1 <?php
2 /**
3 * Event triggered for the end of the list when an action ConfbridgeList is issued.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 use PAMI\Message\Event\EventMessage;
33
34 /**
35 * Event triggered for the end of the list when an action ConfbridgeList is issued.
36 *
37 * PHP Version 5
38 *
39 * @category Pami
40 * @package Message
41 * @subpackage Event
42 * @author Matt Styles <[email protected]>
43 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
44 * @link http://marcelog.github.com/PAMI/
45 */
46 class ConfbridgeListCompleteEvent extends EventMessage
47 {
48 /**
49 * Returns key: 'ListItems'.
50 *
51 * @return string
52 */
53 public function getListItems()
54 {
55 return $this->getKey('ListItems');
56 }
57 }
1 <?php
2 /**
3 * Event triggered when an action ConfbridgeList is issued.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Matt Styles <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when an action ConfbridgeList is issued.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Matt Styles <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeListEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Conference'.
48 *
49 * @return string
50 */
51 public function getConference()
52 {
53 return $this->getKey('Conference');
54 }
55
56 /**
57 * Returns key: 'Channel'.
58 *
59 * @return string
60 */
61 public function getChannel()
62 {
63 return $this->getKey('Channel');
64 }
65
66 /**
67 * Returns key: 'CallerIDNum'.
68 *
69 * @return string
70 */
71 public function getCallerIDNum()
72 {
73 return $this->getKey('CallerIDNum');
74 }
75
76 /**
77 * Returns key: 'CallerIDName'.
78 *
79 * @return string
80 */
81 public function getCallerIDName()
82 {
83 return $this->getKey('CallerIDName');
84 }
85
86 /**
87 * Returns key: 'MarkedUser'.
88 *
89 * @return string
90 */
91 public function getMarkedUser()
92 {
93 return $this->getKey('MarkedUser');
94 }
95
96 /**
97 * Returns key: 'WaitMarked'.
98 *
99 * @return string
100 */
101 public function getWaitMarked()
102 {
103 return $this->getKey('WaitMarked');
104 }
105
106 /**
107 * Returns key: 'EndMarked'.
108 *
109 * @return string
110 */
111 public function getEndMarked()
112 {
113 return $this->getKey('EndMarked');
114 }
115
116 /**
117 * Returns key: 'Waiting'.
118 *
119 * @return string
120 */
121 public function getWaiting()
122 {
123 return $this->getKey('Waiting');
124 }
125
126 /**
127 * Returns key: 'Muted'.
128 *
129 * @return string
130 */
131 public function getMuted()
132 {
133 return $this->getKey('Muted');
134 }
135
136 /**
137 * Returns key: 'AnsweredTime'.
138 *
139 * @return string
140 */
141 public function getAnsweredTime()
142 {
143 return $this->getKey('AnsweredTime');
144 }
145
146 /**
147 * Returns key: 'Admin'.
148 *
149 * @return string
150 */
151 public function getAdmin()
152 {
153 return $this->getKey('Admin');
154 }
155 }
1 <?php
2 /**
3 * Event triggered when a channel is muted in a confbridge.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when a channel is muted in a confbridge.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeMuteEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Privilege'.
48 *
49 * @return string
50 */
51 public function getPrivilege()
52 {
53 return $this->getKey('Privilege');
54 }
55
56 /**
57 * Returns key: 'Conference'.
58 *
59 * @return string
60 */
61 public function getConference()
62 {
63 return $this->getKey('Conference');
64 }
65
66 /**
67 * Returns key: 'BridgeUniqueid'.
68 *
69 * @return string
70 */
71 public function getBridgeUniqueid()
72 {
73 return $this->getKey('BridgeUniqueid');
74 }
75
76 /**
77 * Returns key: 'BridgeType'.
78 *
79 * @return string
80 */
81 public function getBridgeType()
82 {
83 return $this->getKey('BridgeType');
84 }
85
86 /**
87 * Returns key: 'BridgeTechnology'.
88 *
89 * @return string
90 */
91 public function getBridgeTechnology()
92 {
93 return $this->getKey('BridgeTechnology');
94 }
95
96 /**
97 * Returns key: 'BridgeCreator'.
98 *
99 * @return string
100 */
101 public function getBridgeCreator()
102 {
103 return $this->getKey('BridgeCreator');
104 }
105
106 /**
107 * Returns key: 'BridgeName'.
108 *
109 * @return string
110 */
111 public function getBridgeName()
112 {
113 return $this->getKey('BridgeName');
114 }
115
116 /**
117 * Returns key: 'BridgeNumChannels'.
118 *
119 * @return string
120 */
121 public function getBridgeNumChannels()
122 {
123 return $this->getKey('BridgeNumChannels');
124 }
125
126 /**
127 * Returns key: 'Channel'.
128 *
129 * @return string
130 */
131 public function getChannel()
132 {
133 return $this->getKey('Channel');
134 }
135
136 /**
137 * Returns key: 'ChannelState'.
138 *
139 * @return string
140 */
141 public function getChannelState()
142 {
143 return $this->getKey('ChannelState');
144 }
145
146 /**
147 * Returns key: 'ChannelStateDesc'.
148 *
149 * @return string
150 */
151 public function getChannelStateDesc()
152 {
153 return $this->getKey('ChannelStateDesc');
154 }
155
156 /**
157 * Returns key: 'CallerIDNum'.
158 *
159 * @return string
160 */
161 public function getCallerIDNum()
162 {
163 return $this->getKey('CallerIDNum');
164 }
165
166 /**
167 * Returns key: 'CallerIDName'.
168 *
169 * @return string
170 */
171 public function getCallerIDName()
172 {
173 return $this->getKey('CallerIDName');
174 }
175
176 /**
177 * Returns key: 'ConnectedLineNum'.
178 *
179 * @return string
180 */
181 public function getConnectedLineNum()
182 {
183 return $this->getKey('ConnectedLineNum');
184 }
185
186 /**
187 * Returns key: 'ConnectedLineName'.
188 *
189 * @return string
190 */
191 public function getConnectedLineName()
192 {
193 return $this->getKey('ConnectedLineName');
194 }
195
196 /**
197 * Returns key: 'AccountCode'.
198 *
199 * @return string
200 */
201 public function getAccountCode()
202 {
203 return $this->getKey('AccountCode');
204 }
205
206 /**
207 * Returns key: 'Context'.
208 *
209 * @return string
210 */
211 public function getContext()
212 {
213 return $this->getKey('Context');
214 }
215
216 /**
217 * Returns key: 'Exten'.
218 *
219 * @return string
220 */
221 public function getExten()
222 {
223 return $this->getKey('Exten');
224 }
225
226 /**
227 * Returns key: 'Priority'.
228 *
229 * @return string
230 */
231 public function getPriority()
232 {
233 return $this->getKey('Priority');
234 }
235
236 /**
237 * Returns key: 'Uniqueid'.
238 *
239 * @return string
240 */
241 public function getUniqueid()
242 {
243 return $this->getKey('Uniqueid');
244 }
245
246 /**
247 * Returns key: 'Linkedid'.
248 *
249 * @return string
250 */
251 public function getLinkedid()
252 {
253 return $this->getKey('Linkedid');
254 }
255
256 /**
257 * Returns key: 'Admin'.
258 *
259 * @return string
260 */
261 public function getAdmin()
262 {
263 return $this->getKey('Admin');
264 }
265 }
1 <?php
2 /**
3 * Event triggered when a confbridge is created.
4 *
5 * PHP Version 5
6 *
7 * @category Pami
8 * @package Message
9 * @subpackage Event
10 * @author Marcelo Gornstein <[email protected]>
11 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
12 * @version SVN: $Id$
13 * @link http://marcelog.github.com/PAMI/
14 *
15 * Copyright 2011 Marcelo Gornstein <[email protected]>
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 */
30 namespace PAMI\Message\Event;
31
32 /**
33 * Event triggered when a confbridge is created.
34 *
35 * PHP Version 5
36 *
37 * @category Pami
38 * @package Message
39 * @subpackage Event
40 * @author Marcelo Gornstein <[email protected]>
41 * @license http://marcelog.github.com/PAMI/ Apache License 2.0
42 * @link http://marcelog.github.com/PAMI/
43 */
44 class ConfbridgeStartEvent extends EventMessage
45 {
46 /**
47 * Returns key: 'Privilege'.
48 *
49 * @return string
50 */
51 public function getPrivilege()
52 {
53 return $this->getKey('Privilege');
54 }
55
56 /**
57 * Returns key: 'Conference'.
58 *
59 * @return string
60 */
61 public function getConference()
62 {
63 return $this->getKey('Conference');
64 }
65
66 /**
67 * Returns key: 'BridgeUniqueid'.
68 *
69 * @return string
70 */
71 public function getBridgeUniqueid()
72 {
73 return $this->getKey('BridgeUniqueid');
74 }
75
76 /**
77 * Returns key: 'BridgeType'.
78 *
79 * @return string
80 */
81 public function getBridgeType()
82 {
83 return $this->getKey('BridgeType');
84 }
85
86 /**
87 * Returns key: 'BridgeTechnology'.
88 *
89 * @return string
90 */
91 public function getBridgeTechnology()
92 {
93 return $this->getKey('BridgeTechnology');
94 }
95
96 /**
97 * Returns key: 'BridgeCreator'.
98 *
99 * @return string
100 */
101 public function getBridgeCreator()
102 {
103 return $this->getKey('BridgeCreator');
104 }
105
106 /**
107 * Returns key: 'BridgeName'.
108 *
109 * @return string
110 */
111 public function getBridgeName()
112 {
113 return $this->getKey('BridgeName');
114 }
115
116 /**
117 * Returns key: 'BridgeNumChannels'.
118 *
119 * @return string
120 */
121 public function getBridgeNumChannels()
122 {
123 return $this->getKey('BridgeNumChannels');
124 }
125 }
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!