2a8fd711 by Manish Mihsra

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

1 parent 5435bb9e
Showing 44 changed files with 6748 additions and 66 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 }
......
...@@ -48,13 +48,18 @@ class LoginAction extends ActionMessage ...@@ -48,13 +48,18 @@ class LoginAction extends ActionMessage
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 }
1 <?php
2 /**
3 * Event triggered when a channel in a Confbridge begins or ends talking
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 in a Confbridge begins or ends talking
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 ConfbridgeTalkingEvent 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: 'TalkingStatus'.
258 *
259 * @return string
260 */
261 public function getTalkingStatus()
262 {
263 return $this->getKey('TalkingStatus');
264 }
265
266 /**
267 * Returns key: 'Admin'.
268 *
269 * @return string
270 */
271 public function getAdmin()
272 {
273 return $this->getKey('Admin');
274 }
275 }
1 <?php
2 /**
3 * Event triggered when a channel is unmuted 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 unmuted 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 ConfbridgeUnmuteEvent 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 }
...@@ -302,4 +302,14 @@ class DialBeginEvent extends EventMessage ...@@ -302,4 +302,14 @@ class DialBeginEvent extends EventMessage
302 { 302 {
303 return $this->getKey('DialStatus'); 303 return $this->getKey('DialStatus');
304 } 304 }
305
306 /**
307 * Returns key: 'DialString'.
308 *
309 * @return string
310 */
311 public function getDialString()
312 {
313 return $this->getKey('DialString');
314 }
305 } 315 }
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
29 */ 29 */
30 namespace PAMI\Message\Event; 30 namespace PAMI\Message\Event;
31 31
32 use PAMI\Message\Event\EventMessage;
33
34 /** 32 /**
35 * Event triggered when a new extension is accessed. 33 * Event triggered when a new extension is accessed.
36 * 34 *
...@@ -66,7 +64,8 @@ class NewextenEvent extends EventMessage ...@@ -66,7 +64,8 @@ class NewextenEvent extends EventMessage
66 } 64 }
67 65
68 /** 66 /**
69 * Returns key: 'Exten'. 67 * Returns key: 'Extension'.
68 * @deprecated Please use {@see getExten()}.
70 * 69 *
71 * @return string 70 * @return string
72 */ 71 */
...@@ -76,6 +75,16 @@ class NewextenEvent extends EventMessage ...@@ -76,6 +75,16 @@ class NewextenEvent extends EventMessage
76 } 75 }
77 76
78 /** 77 /**
78 * Returns key: 'Exten'.
79 *
80 * @return string
81 */
82 public function getExten()
83 {
84 return $this->getKey('Exten') ?: $this->getKey('Extension');
85 }
86
87 /**
79 * Returns key: 'Context'. 88 * Returns key: 'Context'.
80 * 89 *
81 * @return string 90 * @return string
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
29 */ 29 */
30 namespace PAMI\Message\Event; 30 namespace PAMI\Message\Event;
31 31
32 use PAMI\Message\Event\EventMessage;
33
34 /** 32 /**
35 * Event triggered when a call is parked. 33 * Event triggered when a call is parked.
36 * 34 *
...@@ -77,81 +75,249 @@ class ParkedCallEvent extends EventMessage ...@@ -77,81 +75,249 @@ class ParkedCallEvent extends EventMessage
77 75
78 /** 76 /**
79 * Returns key: 'Timeout'. 77 * Returns key: 'Timeout'.
78 * @deprecated Deprecated since Asterisk 12. {@use ParkingTimeout()}.
80 * 79 *
81 * @return string 80 * @return string
82 */ 81 */
83 public function getTimeout() 82 public function getTimeout()
84 { 83 {
85 return $this->getKey('Timeout'); 84 return $this->getParkingTimeout();
86 } 85 }
87 86
88 /** 87 /**
89 * Returns key: 'ConnectedLineNum'. 88 * Returns key: 'ConnectedLineNum'.
89 * @deprecated Deprecated since Asterisk 12. {@use getParkeeConnectedLineNum()}.
90 * 90 *
91 * @return string 91 * @return string
92 */ 92 */
93 public function getConnectedLineNum() 93 public function getConnectedLineNum()
94 { 94 {
95 return $this->getKey('ConnectedLineNum'); 95 return $this->getParkeeConnectedLineNum();
96 } 96 }
97 97
98 /** 98 /**
99 * Returns key: 'ConnectedLineName'. 99 * Returns key: 'ConnectedLineName'.
100 * @deprecated Deprecated since Asterisk 12. {@use getParkeeConnectedLineName()}.
100 * 101 *
101 * @return string 102 * @return string
102 */ 103 */
103 public function getConnectedLineName() 104 public function getConnectedLineName()
104 { 105 {
105 return $this->getKey('ConnectedLineName'); 106 return $this->getParkeeConnectedLineName();
106 } 107 }
107 108
108 /** 109 /**
109 * Returns key: 'Channel'. 110 * Returns key: 'Channel'.
111 * @deprecated Deprecated since Asterisk 12. {@use getParkeeChannel()}.
110 * 112 *
111 * @return string 113 * @return string
112 */ 114 */
113 public function getChannel() 115 public function getChannel()
114 { 116 {
115 return $this->getKey('Channel'); 117 return $this->getParkeeChannel();
116 } 118 }
117 119
118 /** 120 /**
119 * Returns key: 'CallerIDNum'. 121 * Returns key: 'CallerIDNum'.
122 * @deprecated Deprecated since Asterisk 12. {@use getParkeeCallerIDNum()}.
120 * 123 *
121 * @return string 124 * @return string
122 */ 125 */
123 public function getCallerIDNum() 126 public function getCallerIDNum()
124 { 127 {
125 return $this->getKey('CallerIDNum'); 128 return $this->getParkeeCallerIDNum();
126 } 129 }
127 130
128 /** 131 /**
129 * Returns key: 'CallerIDName'. 132 * Returns key: 'CallerIDName'.
133 * @deprecated Deprecated since Asterisk 12. {@use getParkeeCallerIDName()}.
130 * 134 *
131 * @return string 135 * @return string
132 */ 136 */
133 public function getCallerIDName() 137 public function getCallerIDName()
134 { 138 {
135 return $this->getKey('CallerIDName'); 139 return $this->getParkeeCallerIDName();
136 } 140 }
137 141
138 /** 142 /**
139 * Returns key: 'UniqueID'. 143 * Returns key: 'UniqueID'.
144 * @deprecated Deprecated since Asterisk 12. {@use getParkeeUniqueid()}.
140 * 145 *
141 * @return string 146 * @return string
142 */ 147 */
143 public function getUniqueID() 148 public function getUniqueID()
144 { 149 {
145 return $this->getKey('UniqueID'); 150 return $this->getParkeeUniqueid();
146 } 151 }
147 152
148 /** 153 /**
149 * Returns key: 'Exten'. 154 * Returns key: 'Exten'.
155 * @deprecated Deprecated since Asterisk 12. {@use getParkingSpace()}.
150 * 156 *
151 * @return string 157 * @return string
152 */ 158 */
153 public function getExtension() 159 public function getExtension()
154 { 160 {
155 return $this->getKey('Exten'); 161 return $this->getParkingSpace();
162 }
163
164 /**
165 * Returns key: 'ParkeeChannel'.
166 *
167 * @return string
168 */
169 public function getParkeeChannel()
170 {
171 return $this->getKey('ParkeeChannel') ?: $this->getKey('Channel');
172 }
173
174 /**
175 * Returns key: 'ParkeeChannelState'.
176 *
177 * @return string
178 */
179 public function getParkeeChannelState()
180 {
181 return $this->getKey('ParkeeChannelState');
182 }
183
184 /**
185 * Returns key: 'ParkeeChannelStateDesc'.
186 *
187 * @return string
188 */
189 public function getParkeeChannelStateDesc()
190 {
191 return $this->getKey('ParkeeChannelStateDesc');
192 }
193
194 /**
195 * Returns key: 'ParkeeCallerIDNum'.
196 *
197 * @return string
198 */
199 public function getParkeeCallerIDNum()
200 {
201 return $this->getKey('ParkeeCallerIDNum') ?: $this->getKey('CallerIDNum');
202 }
203
204 /**
205 * Returns key: 'ParkeeCallerIDName'.
206 *
207 * @return string
208 */
209 public function getParkeeCallerIDName()
210 {
211 return $this->getKey('ParkeeCallerIDName') ?: $this->getKey('CallerIDName');
212 }
213
214 /**
215 * Returns key: 'ParkeeConnectedLineNum'.
216 *
217 * @return string
218 */
219 public function getParkeeConnectedLineNum()
220 {
221 return $this->getKey('ParkeeConnectedLineNum') ?: $this->getKey('ConnectedLineNum');
222 }
223
224 /**
225 * Returns key: 'ParkeeConnectedLineName'.
226 *
227 * @return string
228 */
229 public function getParkeeConnectedLineName()
230 {
231 return $this->getKey('ParkeeConnectedLineName') ?: $this->getKey('ConnectedLineName');
232 }
233
234 /**
235 * Returns key: 'ParkeeAccountCode'.
236 *
237 * @return string
238 */
239 public function getParkeeAccountCode()
240 {
241 return $this->getKey('ParkeeAccountCode');
242 }
243
244 /**
245 * Returns key: 'ParkeeContext'.
246 *
247 * @return string
248 */
249 public function getParkeeContext()
250 {
251 return $this->getKey('ParkeeContext');
252 }
253
254 /**
255 * Returns key: 'ParkeeExten'.
256 *
257 * @return string
258 */
259 public function getParkeeExten()
260 {
261 return $this->getKey('ParkeeExten');
262 }
263
264 /**
265 * Returns key: 'ParkeePriority'.
266 *
267 * @return string
268 */
269 public function getParkeePriority()
270 {
271 return $this->getKey('ParkeePriority');
272 }
273
274 /**
275 * Returns key: 'ParkeeUniqueid'.
276 *
277 * @return string
278 */
279 public function getParkeeUniqueid()
280 {
281 return $this->getKey('ParkeeUniqueid') ?: $this->getKey('UniqueId');
282 }
283
284 /**
285 * Returns key: 'ParkerDialString'.
286 *
287 * @return string
288 */
289 public function getParkerDialString()
290 {
291 return $this->getKey('ParkerDialString');
292 }
293
294 /**
295 * Returns key: 'ParkingSpace'.
296 *
297 * @return string
298 */
299 public function getParkingSpace()
300 {
301 return $this->getKey('ParkingSpace') ?: $this->getKey('Exten');
302 }
303
304 /**
305 * Returns key: 'ParkingTimeout'.
306 *
307 * @return string
308 */
309 public function getParkingTimeout()
310 {
311 return $this->getKey('ParkingTimeout') ?: $this->getKey('Timeout');
312 }
313
314 /**
315 * Returns key: 'ParkingDuration'.
316 *
317 * @return string
318 */
319 public function getParkingDuration()
320 {
321 return $this->getKey('ParkingDuration');
156 } 322 }
157 } 323 }
......
...@@ -164,13 +164,13 @@ class QueueCallerAbandonEvent extends EventMessage ...@@ -164,13 +164,13 @@ class QueueCallerAbandonEvent extends EventMessage
164 } 164 }
165 165
166 /** 166 /**
167 * Returns key: 'Uniqueid'. 167 * Returns key: 'UniqueID'.
168 * 168 *
169 * @return string 169 * @return string
170 */ 170 */
171 public function getUniqueid() 171 public function getUniqueID()
172 { 172 {
173 return $this->getKey('Uniqueid'); 173 return $this->getKey('UniqueID');
174 } 174 }
175 175
176 /** 176 /**
......
...@@ -192,4 +192,14 @@ class QueueCallerJoinEvent extends EventMessage ...@@ -192,4 +192,14 @@ class QueueCallerJoinEvent extends EventMessage
192 { 192 {
193 return $this->getKey('AccountCode'); 193 return $this->getKey('AccountCode');
194 } 194 }
195
196 /**
197 * Returns key: 'Priority'.
198 *
199 * @return string
200 */
201 public function getPriority()
202 {
203 return $this->getKey('Priority');
204 }
195 } 205 }
......
...@@ -192,4 +192,14 @@ class QueueCallerLeaveEvent extends EventMessage ...@@ -192,4 +192,14 @@ class QueueCallerLeaveEvent extends EventMessage
192 { 192 {
193 return $this->getKey('AccountCode'); 193 return $this->getKey('AccountCode');
194 } 194 }
195
196 /**
197 * Returns key: 'Priority'.
198 *
199 * @return string
200 */
201 public function getPriority()
202 {
203 return $this->getKey('Priority');
204 }
195 } 205 }
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
29 */ 29 */
30 namespace PAMI\Message\Event; 30 namespace PAMI\Message\Event;
31 31
32 use PAMI\Message\Event\EventMessage;
33
34 /** 32 /**
35 * Event triggered when a call is unparked. 33 * Event triggered when a call is unparked.
36 * 34 *
...@@ -67,81 +65,500 @@ class UnParkedCallEvent extends EventMessage ...@@ -67,81 +65,500 @@ class UnParkedCallEvent extends EventMessage
67 65
68 /** 66 /**
69 * Returns key: 'From'. 67 * Returns key: 'From'.
68 * @deprecated Deprecated since Asterisk 12. {@use getRetrieverChannel()}.
70 * 69 *
71 * @return string 70 * @return string
72 */ 71 */
73 public function getFrom() 72 public function getFrom()
74 { 73 {
75 return $this->getKey('From'); 74 return $this->getRetrieverChannel();
75 }
76
77 /**
78 * Returns key: 'Timeout'.
79 * @deprecated Deprecated since Asterisk 12. {@use ParkingTimeout()}.
80 *
81 * @return string
82 */
83 public function getTimeout()
84 {
85 return $this->getParkingTimeout();
76 } 86 }
77 87
78 /** 88 /**
79 * Returns key: 'ConnectedLineNum'. 89 * Returns key: 'ConnectedLineNum'.
90 * @deprecated Deprecated since Asterisk 12. {@use getParkeeConnectedLineNum()}.
80 * 91 *
81 * @return string 92 * @return string
82 */ 93 */
83 public function getConnectedLineNum() 94 public function getConnectedLineNum()
84 { 95 {
85 return $this->getKey('ConnectedLineNum'); 96 return $this->getParkeeConnectedLineNum();
86 } 97 }
87 98
88 /** 99 /**
89 * Returns key: 'ConnectedLineName'. 100 * Returns key: 'ConnectedLineName'.
101 * @deprecated Deprecated since Asterisk 12. {@use getParkeeConnectedLineName()}.
90 * 102 *
91 * @return string 103 * @return string
92 */ 104 */
93 public function getConnectedLineName() 105 public function getConnectedLineName()
94 { 106 {
95 return $this->getKey('ConnectedLineName'); 107 return $this->getParkeeConnectedLineName();
96 } 108 }
97 109
98 /** 110 /**
99 * Returns key: 'Channel'. 111 * Returns key: 'Channel'.
112 * @deprecated Deprecated since Asterisk 12. {@use getParkeeChannel()}.
100 * 113 *
101 * @return string 114 * @return string
102 */ 115 */
103 public function getChannel() 116 public function getChannel()
104 { 117 {
105 return $this->getKey('Channel'); 118 return $this->getParkeeChannel();
106 } 119 }
107 120
108 /** 121 /**
109 * Returns key: 'CallerIDNum'. 122 * Returns key: 'CallerIDNum'.
123 * @deprecated Deprecated since Asterisk 12. {@use getParkeeCallerIDNum()}.
110 * 124 *
111 * @return string 125 * @return string
112 */ 126 */
113 public function getCallerIDNum() 127 public function getCallerIDNum()
114 { 128 {
115 return $this->getKey('CallerIDNum'); 129 return $this->getParkeeCallerIDNum();
116 } 130 }
117 131
118 /** 132 /**
119 * Returns key: 'CallerIDName'. 133 * Returns key: 'CallerIDName'.
134 * @deprecated Deprecated since Asterisk 12. {@use getParkeeCallerIDName()}.
120 * 135 *
121 * @return string 136 * @return string
122 */ 137 */
123 public function getCallerIDName() 138 public function getCallerIDName()
124 { 139 {
125 return $this->getKey('CallerIDName'); 140 return $this->getParkeeCallerIDName();
126 } 141 }
127 142
128 /** 143 /**
129 * Returns key: 'UniqueID'. 144 * Returns key: 'UniqueID'.
145 * @deprecated Deprecated since Asterisk 12. {@use getParkeeUniqueid()}.
130 * 146 *
131 * @return string 147 * @return string
132 */ 148 */
133 public function getUniqueID() 149 public function getUniqueID()
134 { 150 {
135 return $this->getKey('UniqueID'); 151 return $this->getParkeeUniqueid();
136 } 152 }
137 153
138 /** 154 /**
139 * Returns key: 'Exten'. 155 * Returns key: 'Exten'.
156 * @deprecated Deprecated since Asterisk 12. {@use getParkingSpace()}.
140 * 157 *
141 * @return string 158 * @return string
142 */ 159 */
143 public function getExtension() 160 public function getExtension()
144 { 161 {
145 return $this->getKey('Exten'); 162 return $this->getParkingSpace();
163 }
164
165 /**
166 * Returns key: 'ParkeeChannel'.
167 *
168 * @return string
169 */
170 public function getParkeeChannel()
171 {
172 return $this->getKey('ParkeeChannel') ?: $this->getKey('Channel');
173 }
174
175 /**
176 * Returns key: 'ParkeeChannelState'.
177 *
178 * @return string
179 */
180 public function getParkeeChannelState()
181 {
182 return $this->getKey('ParkeeChannelState');
183 }
184
185 /**
186 * Returns key: 'ParkeeChannelStateDesc'.
187 *
188 * @return string
189 */
190 public function getParkeeChannelStateDesc()
191 {
192 return $this->getKey('ParkeeChannelStateDesc');
193 }
194
195 /**
196 * Returns key: 'ParkeeCallerIDNum'.
197 *
198 * @return string
199 */
200 public function getParkeeCallerIDNum()
201 {
202 return $this->getKey('ParkeeCallerIDNum') ?: $this->getKey('CallerIDNum');
203 }
204
205 /**
206 * Returns key: 'ParkeeCallerIDName'.
207 *
208 * @return string
209 */
210 public function getParkeeCallerIDName()
211 {
212 return $this->getKey('ParkeeCallerIDName') ?: $this->getKey('CallerIDName');
213 }
214
215 /**
216 * Returns key: 'ParkeeConnectedLineNum'.
217 *
218 * @return string
219 */
220 public function getParkeeConnectedLineNum()
221 {
222 return $this->getKey('ParkeeConnectedLineNum') ?: $this->getKey('ConnectedLineNum');
223 }
224
225 /**
226 * Returns key: 'ParkeeConnectedLineName'.
227 *
228 * @return string
229 */
230 public function getParkeeConnectedLineName()
231 {
232 return $this->getKey('ParkeeConnectedLineName') ?: $this->getKey('ConnectedLineName');
233 }
234
235 /**
236 * Returns key: 'ParkeeAccountCode'.
237 *
238 * @return string
239 */
240 public function getParkeeAccountCode()
241 {
242 return $this->getKey('ParkeeAccountCode');
243 }
244
245 /**
246 * Returns key: 'ParkeeContext'.
247 *
248 * @return string
249 */
250 public function getParkeeContext()
251 {
252 return $this->getKey('ParkeeContext');
253 }
254
255 /**
256 * Returns key: 'ParkeeExten'.
257 *
258 * @return string
259 */
260 public function getParkeeExten()
261 {
262 return $this->getKey('ParkeeExten');
263 }
264
265 /**
266 * Returns key: 'ParkeePriority'.
267 *
268 * @return string
269 */
270 public function getParkeePriority()
271 {
272 return $this->getKey('ParkeePriority');
273 }
274
275 /**
276 * Returns key: 'ParkeeUniqueid'.
277 *
278 * @return string
279 */
280 public function getParkeeUniqueid()
281 {
282 return $this->getKey('ParkeeUniqueid') ?: $this->getKey('UniqueId');
283 }
284
285 /**
286 * Returns key: 'ParkerDialString'.
287 *
288 * @return string
289 */
290 public function getParkerDialString()
291 {
292 return $this->getKey('ParkerDialString');
293 }
294
295 /**
296 * Returns key: 'ParkingSpace'.
297 *
298 * @return string
299 */
300 public function getParkingSpace()
301 {
302 return $this->getKey('ParkingSpace') ?: $this->getKey('Exten');
303 }
304
305 /**
306 * Returns key: 'ParkingTimeout'.
307 *
308 * @return string
309 */
310 public function getParkingTimeout()
311 {
312 return $this->getKey('ParkingTimeout') ?: $this->getKey('Timeout');
313 }
314
315 /**
316 * Returns key: 'ParkingDuration'.
317 *
318 * @return string
319 */
320 public function getParkingDuration()
321 {
322 return $this->getKey('ParkingDuration');
323 }
324
325 /**
326 * Returns key: 'ParkerChannel'.
327 *
328 * @return string
329 */
330 public function getParkerChannel()
331 {
332 return $this->getKey('ParkerChannel');
333 }
334
335 /**
336 * Returns key: 'ParkerChannelState'.
337 *
338 * @return string
339 */
340 public function getParkerChannelState()
341 {
342 return $this->getKey('ParkerChannelState');
343 }
344
345 /**
346 * Returns key: 'ParkerChannelStateDesc'.
347 *
348 * @return string
349 */
350 public function getParkerChannelStateDesc()
351 {
352 return $this->getKey('ParkerChannelStateDesc');
353 }
354
355 /**
356 * Returns key: 'ParkerCallerIDNum'.
357 *
358 * @return string
359 */
360 public function getParkerCallerIDNum()
361 {
362 return $this->getKey('ParkerCallerIDNum');
363 }
364
365 /**
366 * Returns key: 'ParkerCallerIDName'.
367 *
368 * @return string
369 */
370 public function getParkerCallerIDName()
371 {
372 return $this->getKey('ParkerCallerIDName');
373 }
374
375 /**
376 * Returns key: 'ParkerConnectedLineNum'.
377 *
378 * @return string
379 */
380 public function getParkerConnectedLineNum()
381 {
382 return $this->getKey('ParkerConnectedLineNum');
383 }
384
385 /**
386 * Returns key: 'ParkerConnectedLineName'.
387 *
388 * @return string
389 */
390 public function getParkerConnectedLineName()
391 {
392 return $this->getKey('ParkerConnectedLineName');
393 }
394
395 /**
396 * Returns key: 'ParkerAccountCode'.
397 *
398 * @return string
399 */
400 public function getParkerAccountCode()
401 {
402 return $this->getKey('ParkerAccountCode');
403 }
404
405 /**
406 * Returns key: 'ParkerContext'.
407 *
408 * @return string
409 */
410 public function getParkerContext()
411 {
412 return $this->getKey('ParkerContext');
413 }
414
415 /**
416 * Returns key: 'ParkerExten'.
417 *
418 * @return string
419 */
420 public function getParkerExten()
421 {
422 return $this->getKey('ParkerExten');
423 }
424
425 /**
426 * Returns key: 'ParkerPriority'.
427 *
428 * @return string
429 */
430 public function getParkerPriority()
431 {
432 return $this->getKey('ParkerPriority');
433 }
434
435 /**
436 * Returns key: 'ParkerUniqueid'.
437 *
438 * @return string
439 */
440 public function getParkerUniqueid()
441 {
442 return $this->getKey('ParkerUniqueid');
443 }
444
445 /**
446 * Returns key: 'RetrieverChannel'.
447 *
448 * @return string
449 */
450 public function getRetrieverChannel()
451 {
452 return $this->getKey('RetrieverChannel') ?: $this->getKey('From');
453 }
454
455 /**
456 * Returns key: 'RetrieverChannelState'.
457 *
458 * @return string
459 */
460 public function getRetrieverChannelState()
461 {
462 return $this->getKey('RetrieverChannelState');
463 }
464
465 /**
466 * Returns key: 'RetrieverChannelStateDesc'.
467 *
468 * @return string
469 */
470 public function getRetrieverChannelStateDesc()
471 {
472 return $this->getKey('RetrieverChannelStateDesc');
473 }
474
475 /**
476 * Returns key: 'RetrieverCallerIDNum'.
477 *
478 * @return string
479 */
480 public function getRetrieverCallerIDNum()
481 {
482 return $this->getKey('RetrieverCallerIDNum');
483 }
484
485 /**
486 * Returns key: 'RetrieverCallerIDName'.
487 *
488 * @return string
489 */
490 public function getRetrieverCallerIDName()
491 {
492 return $this->getKey('RetrieverCallerIDName');
493 }
494
495 /**
496 * Returns key: 'RetrieverConnectedLineNum'.
497 *
498 * @return string
499 */
500 public function getRetrieverConnectedLineNum()
501 {
502 return $this->getKey('RetrieverConnectedLineNum');
503 }
504
505 /**
506 * Returns key: 'RetrieverConnectedLineName'.
507 *
508 * @return string
509 */
510 public function getRetrieverConnectedLineName()
511 {
512 return $this->getKey('RetrieverConnectedLineName');
513 }
514
515 /**
516 * Returns key: 'RetrieverAccountCode'.
517 *
518 * @return string
519 */
520 public function getRetrieverAccountCode()
521 {
522 return $this->getKey('RetrieverAccountCode');
523 }
524
525 /**
526 * Returns key: 'RetrieverContext'.
527 *
528 * @return string
529 */
530 public function getRetrieverContext()
531 {
532 return $this->getKey('RetrieverContext');
533 }
534
535 /**
536 * Returns key: 'RetrieverExten'.
537 *
538 * @return string
539 */
540 public function getRetrieverExten()
541 {
542 return $this->getKey('RetrieverExten');
543 }
544
545 /**
546 * Returns key: 'RetrieverPriority'.
547 *
548 * @return string
549 */
550 public function getRetrieverPriority()
551 {
552 return $this->getKey('RetrieverPriority');
553 }
554
555 /**
556 * Returns key: 'RetrieverUniqueid'.
557 *
558 * @return string
559 */
560 public function getRetrieverUniqueid()
561 {
562 return $this->getKey('RetrieverUniqueid');
146 } 563 }
147 } 564 }
......
...@@ -108,7 +108,6 @@ abstract class Message ...@@ -108,7 +108,6 @@ abstract class Message
108 */ 108 */
109 public function setVariable($key, $value) 109 public function setVariable($key, $value)
110 { 110 {
111 $key = strtolower($key);
112 $this->variables[$key] = $value; 111 $this->variables[$key] = $value;
113 } 112 }
114 113
...@@ -121,7 +120,6 @@ abstract class Message ...@@ -121,7 +120,6 @@ abstract class Message
121 */ 120 */
122 public function getVariable($key) 121 public function getVariable($key)
123 { 122 {
124 $key = strtolower($key);
125 if (!isset($this->variables[$key])) { 123 if (!isset($this->variables[$key])) {
126 return null; 124 return null;
127 } 125 }
......
...@@ -111,6 +111,37 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -111,6 +111,37 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
111 /** 111 /**
112 * @test 112 * @test
113 */ 113 */
114 public function can_login()
115 {
116 $write = array(implode("\r\n", array(
117 'action: Login',
118 'actionid: 1432.123',
119 'username: foo',
120 'secret: bar',
121 ''
122 )));
123 $action = new \PAMI\Message\Action\LoginAction('foo', 'bar');
124 $client = $this->_start($write, $action);
125 }
126 /**
127 * @test
128 */
129 public function can_login_with_events()
130 {
131 $write = array(implode("\r\n", array(
132 'action: Login',
133 'actionid: 1432.123',
134 'username: foo',
135 'secret: bar',
136 'events: all',
137 ''
138 )));
139 $action = new \PAMI\Message\Action\LoginAction('foo', 'bar', 'all');
140 $client = $this->_start($write, $action);
141 }
142 /**
143 * @test
144 */
114 public function can_agent_logoff() 145 public function can_agent_logoff()
115 { 146 {
116 $write = array(implode("\r\n", array( 147 $write = array(implode("\r\n", array(
...@@ -156,6 +187,22 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -156,6 +187,22 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
156 /** 187 /**
157 * @test 188 * @test
158 */ 189 */
190 public function can_blindTransfer()
191 {
192 $write = array(implode("\r\n", array(
193 'action: BlindTransfer',
194 'actionid: 1432.123',
195 'channel: channel',
196 'exten: exten',
197 'context: context',
198 ''
199 )));
200 $action = new \PAMI\Message\Action\BlindTransferAction('channel', 'exten', 'context');
201 $client = $this->_start($write, $action);
202 }
203 /**
204 * @test
205 */
159 public function can_bridge() 206 public function can_bridge()
160 { 207 {
161 $write = array(implode("\r\n", array( 208 $write = array(implode("\r\n", array(
...@@ -172,6 +219,36 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -172,6 +219,36 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
172 /** 219 /**
173 * @test 220 * @test
174 */ 221 */
222 public function can_bridge_info()
223 {
224 $bridge_uniqueid = '57cb3a7e-0fa3-4e28-924f-d7728b0d7a9a';
225
226 $write = array(implode("\r\n", array(
227 'action: BridgeInfo',
228 'actionid: 1432.123',
229 'bridgeuniqueid: '. $bridge_uniqueid,
230 ''
231 )));
232 $action = new \PAMI\Message\Action\BridgeInfoAction($bridge_uniqueid);
233 $client = $this->_start($write, $action);
234 }
235 /**
236 * @test
237 */
238 public function can_challenge()
239 {
240 $write = array(implode("\r\n", array(
241 'action: Challenge',
242 'actionid: 1432.123',
243 'authtype: test',
244 ''
245 )));
246 $action = new \PAMI\Message\Action\ChallengeAction('test');
247 $client = $this->_start($write, $action);
248 }
249 /**
250 * @test
251 */
175 public function can_change_monitor() 252 public function can_change_monitor()
176 { 253 {
177 $write = array(implode("\r\n", array( 254 $write = array(implode("\r\n", array(
...@@ -201,6 +278,21 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -201,6 +278,21 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
201 /** 278 /**
202 * @test 279 * @test
203 */ 280 */
281 public function can_confbridge_list()
282 {
283 $conference = 'conf-59dba3997444e5';
284 $write = array(implode("\r\n", array(
285 'action: ConfbridgeList',
286 'actionid: 1432.123',
287 'conference: ' . $conference,
288 ''
289 )));
290 $action = new \PAMI\Message\Action\ConfbridgeListAction($conference);
291 $client = $this->_start($write, $action);
292 }
293 /**
294 * @test
295 */
204 public function can_confbridge_mute() 296 public function can_confbridge_mute()
205 { 297 {
206 $write = array(implode("\r\n", array( 298 $write = array(implode("\r\n", array(
...@@ -485,6 +577,20 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -485,6 +577,20 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
485 /** 577 /**
486 * @test 578 * @test
487 */ 579 */
580 public function can_dahdi_transfer()
581 {
582 $write = array(implode("\r\n", array(
583 'action: DAHDITransfer',
584 'actionid: 1432.123',
585 'dahdichannel: channel',
586 ''
587 )));
588 $action = new \PAMI\Message\Action\DAHDITransferAction('channel');
589 $client = $this->_start($write, $action);
590 }
591 /**
592 * @test
593 */
488 public function can_dbdel() 594 public function can_dbdel()
489 { 595 {
490 $write = array(implode("\r\n", array( 596 $write = array(implode("\r\n", array(
...@@ -647,6 +753,21 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -647,6 +753,21 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
647 /** 753 /**
648 * @test 754 * @test
649 */ 755 */
756 public function can_hangup_with_cause()
757 {
758 $write = array(implode("\r\n", array(
759 'action: Hangup',
760 'actionid: 1432.123',
761 'channel: channel',
762 'cause: 5',
763 ''
764 )));
765 $action = new \PAMI\Message\Action\HangupAction('channel', 5);
766 $client = $this->_start($write, $action);
767 }
768 /**
769 * @test
770 */
650 public function can_jabbersend() 771 public function can_jabbersend()
651 { 772 {
652 $write = array(implode("\r\n", array( 773 $write = array(implode("\r\n", array(
...@@ -1465,6 +1586,38 @@ class Test_Actions extends \PHPUnit_Framework_TestCase ...@@ -1465,6 +1586,38 @@ class Test_Actions extends \PHPUnit_Framework_TestCase
1465 /** 1586 /**
1466 * @test 1587 * @test
1467 */ 1588 */
1589 public function can_user_event()
1590 {
1591 $write = array(implode("\r\n", array(
1592 'action: UserEvent',
1593 'actionid: 1432.123',
1594 'userevent: FooEvent',
1595 'foo: Bar',
1596 'bar: Foo',
1597 ''
1598 )));
1599 $action = new \PAMI\Message\Action\UserEventAction('FooEvent', ['Foo' => 'Bar', 'Bar' => 'Foo']);
1600 $client = $this->_start($write, $action);
1601 }
1602
1603 /**
1604 * @test
1605 */
1606 public function can_wait_event()
1607 {
1608 $write = array(implode("\r\n", array(
1609 'action: WaitEvent',
1610 'actionid: 1432.123',
1611 'timeout: 20',
1612 ''
1613 )));
1614 $action = new \PAMI\Message\Action\WaitEventAction(20);
1615 $client = $this->_start($write, $action);
1616 }
1617
1618 /**
1619 * @test
1620 */
1468 public function can_set_actionid() 1621 public function can_set_actionid()
1469 { 1622 {
1470 $action = new \PAMI\Message\Action\PingAction(); 1623 $action = new \PAMI\Message\Action\PingAction();
......
...@@ -72,7 +72,37 @@ class Test_Events extends \PHPUnit_Framework_TestCase ...@@ -72,7 +72,37 @@ class Test_Events extends \PHPUnit_Framework_TestCase
72 'DongleSMSStatus', 'FullyBooted', 'DongleShowDevicesComplete', 'DongleDeviceEntry', 72 'DongleSMSStatus', 'FullyBooted', 'DongleShowDevicesComplete', 'DongleDeviceEntry',
73 'DongleNewUSSDBase64', 'DongleNewUSSD', 'DongleUSSDStatus', 'DongleNewCUSD', 73 'DongleNewUSSDBase64', 'DongleNewUSSD', 'DongleUSSDStatus', 'DongleNewCUSD',
74 'DongleStatus', 'CEL', 'JabberEvent', 'Registry', 'UserEvent', 74 'DongleStatus', 'CEL', 'JabberEvent', 'Registry', 'UserEvent',
75 'ParkedCall', 'UnParkedCall', 'Link' 75 'ParkedCall', 'UnParkedCall', 'Link',
76 'AGIExecStart',
77 'AGIExecEnd',
78 'AsyncAGIStart',
79 'AsyncAGIExec',
80 'AsyncAGIEnd',
81 'QueueCallerJoin',
82 'QueueCallerLeave',
83 'AttendedTransfer',
84 'BlindTransfer',
85 'DialBegin',
86 'DialEnd',
87 'DTMFBegin',
88 'DTMFEnd',
89 'BridgeCreate',
90 'BridgeDestroy',
91 'BridgeEnter',
92 'BridgeLeave',
93 'MusicOnHoldStart',
94 'MusicOnHoldStop',
95 'ConfbridgeStart',
96 'ConfbridgeEnd',
97 'ConfbridgeJoin',
98 'ConfbridgeLeave',
99 'ConfbridgeMute',
100 'ConfbridgeUnmute',
101 'ConfbridgeTalking',
102 'ConfbridgeList',
103 'ConfbridgeListComplete',
104 'BridgeInfoChannel',
105 'BridgeInfoComplete',
76 ); 106 );
77 $eventTranslatedValues = array( 107 $eventTranslatedValues = array(
78 'QueueMemberStatus' => array( 108 'QueueMemberStatus' => array(
...@@ -385,6 +415,7 @@ class Test_Events extends \PHPUnit_Framework_TestCase ...@@ -385,6 +415,7 @@ class Test_Events extends \PHPUnit_Framework_TestCase
385 'Application' => 'Application', 415 'Application' => 'Application',
386 'Priority' => 'Priority', 416 'Priority' => 'Priority',
387 'Extension' => 'Extension', 417 'Extension' => 'Extension',
418 'Exten' => 'Exten',
388 'Context' => 'Context', 419 'Context' => 'Context',
389 'UniqueID' => 'UniqueID', 420 'UniqueID' => 'UniqueID',
390 ), 421 ),
...@@ -745,26 +776,82 @@ class Test_Events extends \PHPUnit_Framework_TestCase ...@@ -745,26 +776,82 @@ class Test_Events extends \PHPUnit_Framework_TestCase
745 'Privilege' => 'Privilege', 776 'Privilege' => 'Privilege',
746 'Parkinglot' => 'Parkinglot', 777 'Parkinglot' => 'Parkinglot',
747 'From' => 'From', 778 'From' => 'From',
748 'Timeout' => 'Timeout', 779 'Timeout' => 'ParkingTimeout',
749 'ConnectedLineNum' => 'ConnectedLineNum', 780 'ConnectedLineNum' => 'ParkeeConnectedLineNum',
750 'ConnectedLineName' => 'ConnectedLineName', 781 'ConnectedLineName' => 'ParkeeConnectedLineName',
751 'Channel' => 'Channel', 782 'Channel' => 'ParkeeChannel',
752 'CallerIDNum' => 'CallerIDNum', 783 'CallerIDNum' => 'ParkeeCallerIDNum',
753 'CallerIDName' => 'CallerIDName', 784 'CallerIDName' => 'ParkeeCallerIDName',
754 'UniqueID' => 'UniqueID', 785 'UniqueID' => 'ParkeeUniqueid',
755 'Exten' => 'Exten' 786 'Exten' => 'ParkingSpace',
787 'ParkeeChannel' => 'ParkeeChannel',
788 'ParkeeChannelState' => 'ParkeeChannelState',
789 'ParkeeChannelStateDesc' => 'ParkeeChannelStateDesc',
790 'ParkeeCallerIDNum' => 'ParkeeCallerIDNum',
791 'ParkeeCallerIDName' => 'ParkeeCallerIDName',
792 'ParkeeConnectedLineNum' => 'ParkeeConnectedLineNum',
793 'ParkeeConnectedLineName' => 'ParkeeConnectedLineName',
794 'ParkeeAccountCode' => 'ParkeeAccountCode',
795 'ParkeeContext' => 'ParkeeContext',
796 'ParkeeExten' => 'ParkeeExten',
797 'ParkeePriority' => 'ParkeePriority',
798 'ParkeeUniqueid' => 'ParkeeUniqueid',
799 'ParkerDialString' => 'ParkerDialString',
800 'ParkingSpace' => 'ParkingSpace',
801 'ParkingTimeout' => 'ParkingTimeout',
802 'ParkingDuration' => 'ParkingDuration',
756 ), 803 ),
757 'UnParkedCall' => array( 804 'UnParkedCall' => array(
758 'Privilege' => 'Privilege', 805 'Privilege' => 'Privilege',
759 'Parkinglot' => 'Parkinglot', 806 'Parkinglot' => 'Parkinglot',
760 'From' => 'From', 807 'From' => 'RetrieverChannel',
761 'ConnectedLineNum' => 'ConnectedLineNum', 808 'ConnectedLineNum' => 'ParkeeConnectedLineNum',
762 'ConnectedLineName' => 'ConnectedLineName', 809 'ConnectedLineName' => 'ParkeeConnectedLineName',
763 'Channel' => 'Channel', 810 'Channel' => 'ParkeeChannel',
764 'CallerIDNum' => 'CallerIDNum', 811 'CallerIDNum' => 'ParkeeCallerIDNum',
765 'CallerIDName' => 'CallerIDName', 812 'CallerIDName' => 'ParkeeCallerIDName',
766 'UniqueID' => 'UniqueID', 813 'UniqueID' => 'ParkeeUniqueid',
767 'Exten' => 'Exten' 814 'Exten' => 'ParkingSpace',
815 'ParkeeChannel' => 'ParkeeChannel',
816 'ParkeeChannelState' => 'ParkeeChannelState',
817 'ParkeeChannelStateDesc' => 'ParkeeChannelStateDesc',
818 'ParkeeCallerIDNum' => 'ParkeeCallerIDNum',
819 'ParkeeCallerIDName' => 'ParkeeCallerIDName',
820 'ParkeeConnectedLineNum' => 'ParkeeConnectedLineNum',
821 'ParkeeConnectedLineName' => 'ParkeeConnectedLineName',
822 'ParkeeAccountCode' => 'ParkeeAccountCode',
823 'ParkeeContext' => 'ParkeeContext',
824 'ParkeeExten' => 'ParkeeExten',
825 'ParkeePriority' => 'ParkeePriority',
826 'ParkeeUniqueid' => 'ParkeeUniqueid',
827 'ParkerDialString' => 'ParkerDialString',
828 'ParkingSpace' => 'ParkingSpace',
829 'ParkingTimeout' => 'ParkingTimeout',
830 'ParkingDuration' => 'ParkingDuration',
831 'ParkerChannel' => 'ParkerChannel',
832 'ParkerChannelState' => 'ParkerChannelState',
833 'ParkerChannelStateDesc' => 'ParkerChannelStateDesc',
834 'ParkerCallerIDNum' => 'ParkerCallerIDNum',
835 'ParkerCallerIDName' => 'ParkerCallerIDName',
836 'ParkerConnectedLineNum' => 'ParkerConnectedLineNum',
837 'ParkerConnectedLineName' => 'ParkerConnectedLineName',
838 'ParkerAccountCode' => 'ParkerAccountCode',
839 'ParkerContext' => 'ParkerContext',
840 'ParkerExten' => 'ParkerExten',
841 'ParkerPriority' => 'ParkerPriority',
842 'ParkerUniqueid' => 'ParkerUniqueid',
843 'RetrieverChannel' => 'RetrieverChannel',
844 'RetrieverChannelState' => 'RetrieverChannelState',
845 'RetrieverChannelStateDesc' => 'RetrieverChannelStateDesc',
846 'RetrieverCallerIDNum' => 'RetrieverCallerIDNum',
847 'RetrieverCallerIDName' => 'RetrieverCallerIDName',
848 'RetrieverConnectedLineNum' => 'RetrieverConnectedLineNum',
849 'RetrieverConnectedLineName' => 'RetrieverConnectedLineName',
850 'RetrieverAccountCode' => 'RetrieverAccountCode',
851 'RetrieverContext' => 'RetrieverContext',
852 'RetrieverExten' => 'RetrieverExten',
853 'RetrieverPriority' => 'RetrieverPriority',
854 'RetrieverUniqueid' => 'RetrieverUniqueid',
768 ), 855 ),
769 'Link' => array( 856 'Link' => array(
770 'Privilege' => 'Privilege', 857 'Privilege' => 'Privilege',
...@@ -775,6 +862,580 @@ class Test_Events extends \PHPUnit_Framework_TestCase ...@@ -775,6 +862,580 @@ class Test_Events extends \PHPUnit_Framework_TestCase
775 'Channel1' => 'Channel1', 862 'Channel1' => 'Channel1',
776 'Channel2' => 'Channel2' 863 'Channel2' => 'Channel2'
777 ), 864 ),
865 'AGIExecStart' => array(
866 'Channel' => 'Channel',
867 'ChannelState' => 'ChannelState',
868 'ChannelStateDesc' => 'ChannelStateDesc',
869 'CallerIDNum' => 'CallerIDNum',
870 'CallerIDName' => 'CallerIDName',
871 'ConnectedLineNum' => 'ConnectedLineNum',
872 'ConnectedLineName' => 'ConnectedLineName',
873 'AccountCode' => 'AccountCode',
874 'Context' => 'Context',
875 'Exten' => 'Exten',
876 'Priority' => 'Priority',
877 'Uniqueid' => 'Uniqueid',
878 'Command' => 'Command',
879 'CommandId' => 'CommandId',
880 ),
881 'AGIExecEnd' => array(
882 'Channel' => 'Channel',
883 'ChannelState' => 'ChannelState',
884 'ChannelStateDesc' => 'ChannelStateDesc',
885 'CallerIDNum' => 'CallerIDNum',
886 'CallerIDName' => 'CallerIDName',
887 'ConnectedLineNum' => 'ConnectedLineNum',
888 'ConnectedLineName' => 'ConnectedLineName',
889 'AccountCode' => 'AccountCode',
890 'Context' => 'Context',
891 'Exten' => 'Exten',
892 'Priority' => 'Priority',
893 'Uniqueid' => 'Uniqueid',
894 'Command' => 'Command',
895 'CommandId' => 'CommandId',
896 'ResultCode' => 'ResultCode',
897 'Result' => 'Result',
898 ),
899 'AsyncAGIStart' => array(
900 'Channel' => 'Channel',
901 'ChannelState' => 'ChannelState',
902 'ChannelStateDesc' => 'ChannelStateDesc',
903 'CallerIDNum' => 'CallerIDNum',
904 'CallerIDName' => 'CallerIDName',
905 'ConnectedLineNum' => 'ConnectedLineNum',
906 'ConnectedLineName' => 'ConnectedLineName',
907 'AccountCode' => 'AccountCode',
908 'Context' => 'Context',
909 'Exten' => 'Exten',
910 'Priority' => 'Priority',
911 'Uniqueid' => 'Uniqueid',
912 'Env' => 'Env',
913 ),
914 'AsyncAGIExec' => array(
915 'Channel' => 'Channel',
916 'ChannelState' => 'ChannelState',
917 'ChannelStateDesc' => 'ChannelStateDesc',
918 'CallerIDNum' => 'CallerIDNum',
919 'CallerIDName' => 'CallerIDName',
920 'ConnectedLineNum' => 'ConnectedLineNum',
921 'ConnectedLineName' => 'ConnectedLineName',
922 'AccountCode' => 'AccountCode',
923 'Context' => 'Context',
924 'Exten' => 'Exten',
925 'Priority' => 'Priority',
926 'Uniqueid' => 'Uniqueid',
927 'CommandID' => 'CommandID',
928 'Result' => 'Result',
929 ),
930 'AsyncAGIEnd' => array(
931 'Channel' => 'Channel',
932 'ChannelState' => 'ChannelState',
933 'ChannelStateDesc' => 'ChannelStateDesc',
934 'CallerIDNum' => 'CallerIDNum',
935 'CallerIDName' => 'CallerIDName',
936 'ConnectedLineNum' => 'ConnectedLineNum',
937 'ConnectedLineName' => 'ConnectedLineName',
938 'AccountCode' => 'AccountCode',
939 'Context' => 'Context',
940 'Exten' => 'Exten',
941 'Priority' => 'Priority',
942 'Uniqueid' => 'Uniqueid',
943 ),
944 'QueueCallerJoin' => array(
945 'Channel' => 'Channel',
946 'ChannelState' => 'ChannelState',
947 'ChannelStateDesc' => 'ChannelStateDesc',
948 'CallerIDNum' => 'CallerIDNum',
949 'CallerIDName' => 'CallerIDName',
950 'ConnectedLineNum' => 'ConnectedLineNum',
951 'ConnectedLineName' => 'ConnectedLineName',
952 'AccountCode' => 'AccountCode',
953 'Context' => 'Context',
954 'Exten' => 'Exten',
955 'Priority' => 'Priority',
956 'Uniqueid' => 'Uniqueid',
957 'Queue' => 'Queue',
958 'Position' => 'Position',
959 'Count' => 'Count',
960 ),
961 'QueueCallerLeave' => array(
962 'Channel' => 'Channel',
963 'ChannelState' => 'ChannelState',
964 'ChannelStateDesc' => 'ChannelStateDesc',
965 'CallerIDNum' => 'CallerIDNum',
966 'CallerIDName' => 'CallerIDName',
967 'ConnectedLineNum' => 'ConnectedLineNum',
968 'ConnectedLineName' => 'ConnectedLineName',
969 'AccountCode' => 'AccountCode',
970 'Context' => 'Context',
971 'Exten' => 'Exten',
972 'Priority' => 'Priority',
973 'Uniqueid' => 'Uniqueid',
974 'Queue' => 'Queue',
975 'Count' => 'Count',
976 'Position' => 'Position',
977 ),
978 'AttendedTransfer' => array(
979 'Result' => 'Result',
980 'OrigTransfererChannel' => 'OrigTransfererChannel',
981 'OrigTransfererChannelState' => 'OrigTransfererChannelState',
982 'OrigTransfererChannelStateDesc' => 'OrigTransfererChannelStateDesc',
983 'OrigTransfererCallerIDNum' => 'OrigTransfererCallerIDNum',
984 'OrigTransfererCallerIDName' => 'OrigTransfererCallerIDName',
985 'OrigTransfererConnectedLineNum' => 'OrigTransfererConnectedLineNum',
986 'OrigTransfererConnectedLineName' => 'OrigTransfererConnectedLineName',
987 'OrigTransfererAccountCode' => 'OrigTransfererAccountCode',
988 'OrigTransfererContext' => 'OrigTransfererContext',
989 'OrigTransfererExten' => 'OrigTransfererExten',
990 'OrigTransfererPriority' => 'OrigTransfererPriority',
991 'OrigTransfererUniqueid' => 'OrigTransfererUniqueid',
992 'OrigBridgeUniqueid' => 'OrigBridgeUniqueid',
993 'OrigBridgeType' => 'OrigBridgeType',
994 'OrigBridgeTechnology' => 'OrigBridgeTechnology',
995 'OrigBridgeCreator' => 'OrigBridgeCreator',
996 'OrigBridgeName' => 'OrigBridgeName',
997 'OrigBridgeNumChannels' => 'OrigBridgeNumChannels',
998 'SecondTransfererChannel' => 'SecondTransfererChannel',
999 'SecondTransfererChannelState' => 'SecondTransfererChannelState',
1000 'SecondTransfererChannelStateDesc' => 'SecondTransfererChannelStateDesc',
1001 'SecondTransfererCallerIDNum' => 'SecondTransfererCallerIDNum',
1002 'SecondTransfererCallerIDName' => 'SecondTransfererCallerIDName',
1003 'SecondTransfererConnectedLineNum' => 'SecondTransfererConnectedLineNum',
1004 'SecondTransfererConnectedLineName' => 'SecondTransfererConnectedLineName',
1005 'SecondTransfererAccountCode' => 'SecondTransfererAccountCode',
1006 'SecondTransfererContext' => 'SecondTransfererContext',
1007 'SecondTransfererExten' => 'SecondTransfererExten',
1008 'SecondTransfererPriority' => 'SecondTransfererPriority',
1009 'SecondTransfererUniqueid' => 'SecondTransfererUniqueid',
1010 'SecondBridgeUniqueid' => 'SecondBridgeUniqueid',
1011 'SecondBridgeType' => 'SecondBridgeType',
1012 'SecondBridgeTechnology' => 'SecondBridgeTechnology',
1013 'SecondBridgeCreator' => 'SecondBridgeCreator',
1014 'SecondBridgeName' => 'SecondBridgeName',
1015 'SecondBridgeNumChannels' => 'SecondBridgeNumChannels',
1016 'DestType' => 'DestType',
1017 'DestBridgeUniqueid' => 'DestBridgeUniqueid',
1018 'DestApp' => 'DestApp',
1019 'LocalOneChannel' => 'LocalOneChannel',
1020 'LocalOneChannelState' => 'LocalOneChannelState',
1021 'LocalOneChannelStateDesc' => 'LocalOneChannelStateDesc',
1022 'LocalOneCallerIDNum' => 'LocalOneCallerIDNum',
1023 'LocalOneCallerIDName' => 'LocalOneCallerIDName',
1024 'LocalOneConnectedLineNum' => 'LocalOneConnectedLineNum',
1025 'LocalOneConnectedLineName' => 'LocalOneConnectedLineName',
1026 'LocalOneAccountCode' => 'LocalOneAccountCode',
1027 'LocalOneContext' => 'LocalOneContext',
1028 'LocalOneExten' => 'LocalOneExten',
1029 'LocalOnePriority' => 'LocalOnePriority',
1030 'LocalOneUniqueid' => 'LocalOneUniqueid',
1031 'LocalTwoChannel' => 'LocalTwoChannel',
1032 'LocalTwoChannelState' => 'LocalTwoChannelState',
1033 'LocalTwoChannelStateDesc' => 'LocalTwoChannelStateDesc',
1034 'LocalTwoCallerIDNum' => 'LocalTwoCallerIDNum',
1035 'LocalTwoCallerIDName' => 'LocalTwoCallerIDName',
1036 'LocalTwoConnectedLineNum' => 'LocalTwoConnectedLineNum',
1037 'LocalTwoConnectedLineName' => 'LocalTwoConnectedLineName',
1038 'LocalTwoAccountCode' => 'LocalTwoAccountCode',
1039 'LocalTwoContext' => 'LocalTwoContext',
1040 'LocalTwoExten' => 'LocalTwoExten',
1041 'LocalTwoPriority' => 'LocalTwoPriority',
1042 'LocalTwoUniqueid' => 'LocalTwoUniqueid',
1043 'DestTransfererChannel' => 'DestTransfererChannel',
1044 'TransfereeChannel' => 'TransfereeChannel',
1045 'TransfereeChannelState' => 'TransfereeChannelState',
1046 'TransfereeChannelStateDesc' => 'TransfereeChannelStateDesc',
1047 'TransfereeCallerIDNum' => 'TransfereeCallerIDNum',
1048 'TransfereeCallerIDName' => 'TransfereeCallerIDName',
1049 'TransfereeConnectedLineNum' => 'TransfereeConnectedLineNum',
1050 'TransfereeConnectedLineName' => 'TransfereeConnectedLineName',
1051 'TransfereeAccountCode' => 'TransfereeAccountCode',
1052 'TransfereeContext' => 'TransfereeContext',
1053 'TransfereeExten' => 'TransfereeExten',
1054 'TransfereePriority' => 'TransfereePriority',
1055 'TransfereeUniqueid' => 'TransfereeUniqueid',
1056 ),
1057 'BlindTransfer' => array(
1058 'Result' => 'Result',
1059 'TransfererChannel' => 'TransfererChannel',
1060 'TransfererChannelState' => 'TransfererChannelState',
1061 'TransfererChannelStateDesc' => 'TransfererChannelStateDesc',
1062 'TransfererCallerIDNum' => 'TransfererCallerIDNum',
1063 'TransfererCallerIDName' => 'TransfererCallerIDName',
1064 'TransfererConnectedLineNum' => 'TransfererConnectedLineNum',
1065 'TransfererConnectedLineName' => 'TransfererConnectedLineName',
1066 'TransfererAccountCode' => 'TransfererAccountCode',
1067 'TransfererContext' => 'TransfererContext',
1068 'TransfererExten' => 'TransfererExten',
1069 'TransfererPriority' => 'TransfererPriority',
1070 'TransfererUniqueid' => 'TransfererUniqueid',
1071 'TransfereeChannel' => 'TransfereeChannel',
1072 'TransfereeChannelState' => 'TransfereeChannelState',
1073 'TransfereeChannelStateDesc' => 'TransfereeChannelStateDesc',
1074 'TransfereeCallerIDNum' => 'TransfereeCallerIDNum',
1075 'TransfereeCallerIDName' => 'TransfereeCallerIDName',
1076 'TransfereeConnectedLineNum' => 'TransfereeConnectedLineNum',
1077 'TransfereeConnectedLineName' => 'TransfereeConnectedLineName',
1078 'TransfereeAccountCode' => 'TransfereeAccountCode',
1079 'TransfereeContext' => 'TransfereeContext',
1080 'TransfereeExten' => 'TransfereeExten',
1081 'TransfereePriority' => 'TransfereePriority',
1082 'TransfereeUniqueid' => 'TransfereeUniqueid',
1083 'BridgeUniqueid' => 'BridgeUniqueid',
1084 'BridgeType' => 'BridgeType',
1085 'BridgeTechnology' => 'BridgeTechnology',
1086 'BridgeCreator' => 'BridgeCreator',
1087 'BridgeName' => 'BridgeName',
1088 'BridgeNumChannels' => 'BridgeNumChannels',
1089 'IsExternal' => 'IsExternal',
1090 'Context' => 'Context',
1091 'Extension' => 'Extension',
1092 ),
1093 'DialBegin' => array(
1094 'Channel' => 'Channel',
1095 'ChannelState' => 'ChannelState',
1096 'ChannelStateDesc' => 'ChannelStateDesc',
1097 'CallerIDNum' => 'CallerIDNum',
1098 'CallerIDName' => 'CallerIDName',
1099 'ConnectedLineNum' => 'ConnectedLineNum',
1100 'ConnectedLineName' => 'ConnectedLineName',
1101 'AccountCode' => 'AccountCode',
1102 'Context' => 'Context',
1103 'Exten' => 'Exten',
1104 'Priority' => 'Priority',
1105 'Uniqueid' => 'Uniqueid',
1106 'DestChannel' => 'DestChannel',
1107 'DestChannelState' => 'DestChannelState',
1108 'DestChannelStateDesc' => 'DestChannelStateDesc',
1109 'DestCallerIDNum' => 'DestCallerIDNum',
1110 'DestCallerIDName' => 'DestCallerIDName',
1111 'DestConnectedLineNum' => 'DestConnectedLineNum',
1112 'DestConnectedLineName' => 'DestConnectedLineName',
1113 'DestAccountCode' => 'DestAccountCode',
1114 'DestContext' => 'DestContext',
1115 'DestExten' => 'DestExten',
1116 'DestPriority' => 'DestPriority',
1117 'DestUniqueid' => 'DestUniqueid',
1118 'DialString' => 'DialString',
1119 ),
1120 'DialEnd' => array(
1121 'Channel' => 'Channel',
1122 'ChannelState' => 'ChannelState',
1123 'ChannelStateDesc' => 'ChannelStateDesc',
1124 'CallerIDNum' => 'CallerIDNum',
1125 'CallerIDName' => 'CallerIDName',
1126 'ConnectedLineNum' => 'ConnectedLineNum',
1127 'ConnectedLineName' => 'ConnectedLineName',
1128 'AccountCode' => 'AccountCode',
1129 'Context' => 'Context',
1130 'Exten' => 'Exten',
1131 'Priority' => 'Priority',
1132 'Uniqueid' => 'Uniqueid',
1133 'DestChannel' => 'DestChannel',
1134 'DestChannelState' => 'DestChannelState',
1135 'DestChannelStateDesc' => 'DestChannelStateDesc',
1136 'DestCallerIDNum' => 'DestCallerIDNum',
1137 'DestCallerIDName' => 'DestCallerIDName',
1138 'DestConnectedLineNum' => 'DestConnectedLineNum',
1139 'DestConnectedLineName' => 'DestConnectedLineName',
1140 'DestAccountCode' => 'DestAccountCode',
1141 'DestContext' => 'DestContext',
1142 'DestExten' => 'DestExten',
1143 'DestPriority' => 'DestPriority',
1144 'DestUniqueid' => 'DestUniqueid',
1145 'DialStatus' => 'DialStatus',
1146 ),
1147 'DTMFBegin' => array(
1148 'Channel' => 'Channel',
1149 'ChannelState' => 'ChannelState',
1150 'ChannelStateDesc' => 'ChannelStateDesc',
1151 'CallerIDNum' => 'CallerIDNum',
1152 'CallerIDName' => 'CallerIDName',
1153 'ConnectedLineNum' => 'ConnectedLineNum',
1154 'ConnectedLineName' => 'ConnectedLineName',
1155 'AccountCode' => 'AccountCode',
1156 'Context' => 'Context',
1157 'Exten' => 'Exten',
1158 'Priority' => 'Priority',
1159 'Uniqueid' => 'Uniqueid',
1160 'Digit' => 'Digit',
1161 'Direction' => 'Direction',
1162 ),
1163 'DTMFEnd' => array(
1164 'Channel' => 'Channel',
1165 'ChannelState' => 'ChannelState',
1166 'ChannelStateDesc' => 'ChannelStateDesc',
1167 'CallerIDNum' => 'CallerIDNum',
1168 'CallerIDName' => 'CallerIDName',
1169 'ConnectedLineNum' => 'ConnectedLineNum',
1170 'ConnectedLineName' => 'ConnectedLineName',
1171 'AccountCode' => 'AccountCode',
1172 'Context' => 'Context',
1173 'Exten' => 'Exten',
1174 'Priority' => 'Priority',
1175 'Uniqueid' => 'Uniqueid',
1176 'Digit' => 'Digit',
1177 'DurationMs' => 'DurationMs',
1178 'Direction' => 'Direction',
1179 ),
1180 'BridgeCreate' => array(
1181 'BridgeUniqueid' => 'BridgeUniqueid',
1182 'BridgeType' => 'BridgeType',
1183 'BridgeTechnology' => 'BridgeTechnology',
1184 'BridgeCreator' => 'BridgeCreator',
1185 'BridgeName' => 'BridgeName',
1186 'BridgeNumChannels' => 'BridgeNumChannels',
1187 ),
1188 'BridgeDestroy' => array(
1189 'BridgeUniqueid' => 'BridgeUniqueid',
1190 'BridgeType' => 'BridgeType',
1191 'BridgeTechnology' => 'BridgeTechnology',
1192 'BridgeCreator' => 'BridgeCreator',
1193 'BridgeName' => 'BridgeName',
1194 'BridgeNumChannels' => 'BridgeNumChannels',
1195 ),
1196 'BridgeEnter' => array(
1197 'BridgeUniqueid' => 'BridgeUniqueid',
1198 'BridgeType' => 'BridgeType',
1199 'BridgeTechnology' => 'BridgeTechnology',
1200 'BridgeCreator' => 'BridgeCreator',
1201 'BridgeName' => 'BridgeName',
1202 'BridgeNumChannels' => 'BridgeNumChannels',
1203 'Channel' => 'Channel',
1204 'ChannelState' => 'ChannelState',
1205 'ChannelStateDesc' => 'ChannelStateDesc',
1206 'CallerIDNum' => 'CallerIDNum',
1207 'CallerIDName' => 'CallerIDName',
1208 'ConnectedLineNum' => 'ConnectedLineNum',
1209 'ConnectedLineName' => 'ConnectedLineName',
1210 'AccountCode' => 'AccountCode',
1211 'Context' => 'Context',
1212 'Exten' => 'Exten',
1213 'Priority' => 'Priority',
1214 'Uniqueid' => 'Uniqueid',
1215 'SwapUniqueid' => 'SwapUniqueid',
1216 ),
1217 'BridgeLeave' => array(
1218 'BridgeUniqueid' => 'BridgeUniqueid',
1219 'BridgeType' => 'BridgeType',
1220 'BridgeTechnology' => 'BridgeTechnology',
1221 'BridgeCreator' => 'BridgeCreator',
1222 'BridgeName' => 'BridgeName',
1223 'BridgeNumChannels' => 'BridgeNumChannels',
1224 'Channel' => 'Channel',
1225 'ChannelState' => 'ChannelState',
1226 'ChannelStateDesc' => 'ChannelStateDesc',
1227 'CallerIDNum' => 'CallerIDNum',
1228 'CallerIDName' => 'CallerIDName',
1229 'ConnectedLineNum' => 'ConnectedLineNum',
1230 'ConnectedLineName' => 'ConnectedLineName',
1231 'AccountCode' => 'AccountCode',
1232 'Context' => 'Context',
1233 'Exten' => 'Exten',
1234 'Priority' => 'Priority',
1235 'Uniqueid' => 'Uniqueid',
1236 ),
1237 'MusicOnHoldStart' => array(
1238 'Channel' => 'Channel',
1239 'ChannelState' => 'ChannelState',
1240 'ChannelStateDesc' => 'ChannelStateDesc',
1241 'CallerIDNum' => 'CallerIDNum',
1242 'CallerIDName' => 'CallerIDName',
1243 'ConnectedLineNum' => 'ConnectedLineNum',
1244 'ConnectedLineName' => 'ConnectedLineName',
1245 'AccountCode' => 'AccountCode',
1246 'Context' => 'Context',
1247 'Exten' => 'Exten',
1248 'Priority' => 'Priority',
1249 'Uniqueid' => 'Uniqueid',
1250 'Class' => 'Class',
1251 ),
1252 'MusicOnHoldStop' => array(
1253 'Channel' => 'Channel',
1254 'ChannelState' => 'ChannelState',
1255 'ChannelStateDesc' => 'ChannelStateDesc',
1256 'CallerIDNum' => 'CallerIDNum',
1257 'CallerIDName' => 'CallerIDName',
1258 'ConnectedLineNum' => 'ConnectedLineNum',
1259 'ConnectedLineName' => 'ConnectedLineName',
1260 'AccountCode' => 'AccountCode',
1261 'Context' => 'Context',
1262 'Exten' => 'Exten',
1263 'Priority' => 'Priority',
1264 'Uniqueid' => 'Uniqueid',
1265 ),
1266 'ConfbridgeStart' => array(
1267 'Conference' => 'Conference',
1268 'BridgeUniqueid' => 'BridgeUniqueid',
1269 'BridgeType' => 'BridgeType',
1270 'BridgeTechnology' => 'BridgeTechnology',
1271 'BridgeCreator' => 'BridgeCreator',
1272 'BridgeName' => 'BridgeName',
1273 'BridgeNumChannels' => 'BridgeNumChannels',
1274 ),
1275 'ConfbridgeEnd' => array(
1276 'Conference' => 'Conference',
1277 'BridgeUniqueid' => 'BridgeUniqueid',
1278 'BridgeType' => 'BridgeType',
1279 'BridgeTechnology' => 'BridgeTechnology',
1280 'BridgeCreator' => 'BridgeCreator',
1281 'BridgeName' => 'BridgeName',
1282 'BridgeNumChannels' => 'BridgeNumChannels',
1283 ),
1284 'ConfbridgeJoin' => array(
1285 'Conference' => 'Conference',
1286 'BridgeUniqueid' => 'BridgeUniqueid',
1287 'BridgeType' => 'BridgeType',
1288 'BridgeTechnology' => 'BridgeTechnology',
1289 'BridgeCreator' => 'BridgeCreator',
1290 'BridgeName' => 'BridgeName',
1291 'BridgeNumChannels' => 'BridgeNumChannels',
1292 'Channel' => 'Channel',
1293 'ChannelState' => 'ChannelState',
1294 'ChannelStateDesc' => 'ChannelStateDesc',
1295 'CallerIDNum' => 'CallerIDNum',
1296 'CallerIDName' => 'CallerIDName',
1297 'ConnectedLineNum' => 'ConnectedLineNum',
1298 'ConnectedLineName' => 'ConnectedLineName',
1299 'AccountCode' => 'AccountCode',
1300 'Context' => 'Context',
1301 'Exten' => 'Exten',
1302 'Priority' => 'Priority',
1303 'Uniqueid' => 'Uniqueid',
1304 'Linkedid' => 'Linkedid',
1305 'Admin' => 'Admin',
1306 ),
1307 'ConfbridgeLeave' => array(
1308 'Conference' => 'Conference',
1309 'BridgeUniqueid' => 'BridgeUniqueid',
1310 'BridgeType' => 'BridgeType',
1311 'BridgeTechnology' => 'BridgeTechnology',
1312 'BridgeCreator' => 'BridgeCreator',
1313 'BridgeName' => 'BridgeName',
1314 'BridgeNumChannels' => 'BridgeNumChannels',
1315 'Channel' => 'Channel',
1316 'ChannelState' => 'ChannelState',
1317 'ChannelStateDesc' => 'ChannelStateDesc',
1318 'CallerIDNum' => 'CallerIDNum',
1319 'CallerIDName' => 'CallerIDName',
1320 'ConnectedLineNum' => 'ConnectedLineNum',
1321 'ConnectedLineName' => 'ConnectedLineName',
1322 'AccountCode' => 'AccountCode',
1323 'Context' => 'Context',
1324 'Exten' => 'Exten',
1325 'Priority' => 'Priority',
1326 'Uniqueid' => 'Uniqueid',
1327 'Linkedid' => 'Linkedid',
1328 'Admin' => 'Admin',
1329 ),
1330 'ConfbridgeMute' => array(
1331 'Conference' => 'Conference',
1332 'BridgeUniqueid' => 'BridgeUniqueid',
1333 'BridgeType' => 'BridgeType',
1334 'BridgeTechnology' => 'BridgeTechnology',
1335 'BridgeCreator' => 'BridgeCreator',
1336 'BridgeName' => 'BridgeName',
1337 'BridgeNumChannels' => 'BridgeNumChannels',
1338 'Channel' => 'Channel',
1339 'ChannelState' => 'ChannelState',
1340 'ChannelStateDesc' => 'ChannelStateDesc',
1341 'CallerIDNum' => 'CallerIDNum',
1342 'CallerIDName' => 'CallerIDName',
1343 'ConnectedLineNum' => 'ConnectedLineNum',
1344 'ConnectedLineName' => 'ConnectedLineName',
1345 'AccountCode' => 'AccountCode',
1346 'Context' => 'Context',
1347 'Exten' => 'Exten',
1348 'Priority' => 'Priority',
1349 'Uniqueid' => 'Uniqueid',
1350 'Linkedid' => 'Linkedid',
1351 'Admin' => 'Admin',
1352 ),
1353 'ConfbridgeUnmute' => array(
1354 'Conference' => 'Conference',
1355 'BridgeUniqueid' => 'BridgeUniqueid',
1356 'BridgeType' => 'BridgeType',
1357 'BridgeTechnology' => 'BridgeTechnology',
1358 'BridgeCreator' => 'BridgeCreator',
1359 'BridgeName' => 'BridgeName',
1360 'BridgeNumChannels' => 'BridgeNumChannels',
1361 'Channel' => 'Channel',
1362 'ChannelState' => 'ChannelState',
1363 'ChannelStateDesc' => 'ChannelStateDesc',
1364 'CallerIDNum' => 'CallerIDNum',
1365 'CallerIDName' => 'CallerIDName',
1366 'ConnectedLineNum' => 'ConnectedLineNum',
1367 'ConnectedLineName' => 'ConnectedLineName',
1368 'AccountCode' => 'AccountCode',
1369 'Context' => 'Context',
1370 'Exten' => 'Exten',
1371 'Priority' => 'Priority',
1372 'Uniqueid' => 'Uniqueid',
1373 'Linkedid' => 'Linkedid',
1374 'Admin' => 'Admin',
1375 ),
1376 'ConfbridgeTalking' => array(
1377 'Conference' => 'Conference',
1378 'BridgeUniqueid' => 'BridgeUniqueid',
1379 'BridgeType' => 'BridgeType',
1380 'BridgeTechnology' => 'BridgeTechnology',
1381 'BridgeCreator' => 'BridgeCreator',
1382 'BridgeName' => 'BridgeName',
1383 'BridgeNumChannels' => 'BridgeNumChannels',
1384 'Channel' => 'Channel',
1385 'ChannelState' => 'ChannelState',
1386 'ChannelStateDesc' => 'ChannelStateDesc',
1387 'CallerIDNum' => 'CallerIDNum',
1388 'CallerIDName' => 'CallerIDName',
1389 'ConnectedLineNum' => 'ConnectedLineNum',
1390 'ConnectedLineName' => 'ConnectedLineName',
1391 'AccountCode' => 'AccountCode',
1392 'Context' => 'Context',
1393 'Exten' => 'Exten',
1394 'Priority' => 'Priority',
1395 'Uniqueid' => 'Uniqueid',
1396 'Linkedid' => 'Linkedid',
1397 'TalkingStatus' => 'TalkingStatus',
1398 'Admin' => 'Admin',
1399 ),
1400 'ConfbridgeList' => array(
1401 'Conference' => 'Conference',
1402 'Channel' => 'Channel',
1403 'CallerIDNum' => 'CallerIDNum',
1404 'CallerIDName' => 'CallerIDName',
1405 'MarkedUser' => 'MarkedUser',
1406 'WaitMarked' => 'WaitMarked',
1407 'EndMarked' => 'EndMarked',
1408 'Waiting' => 'Waiting',
1409 'Muted' => 'Muted',
1410 'AnsweredTime' => 'AnsweredTime',
1411 'Admin' => 'Admin',
1412 ),
1413 'ConfbridgeListComplete' => array('ListItems' => 'ListItems'),
1414 'BridgeInfoChannel' => array(
1415 'Channel' => 'Channel',
1416 'ChannelState' => 'ChannelState',
1417 'ChannelStateDesc' => 'ChannelStateDesc',
1418 'CallerIDNum' => 'CallerIDNum',
1419 'CallerIDName' => 'CallerIDName',
1420 'ConnectedLineNum' => 'ConnectedLineNum',
1421 'ConnectedLineName' => 'ConnectedLineName',
1422 'AccountCode' => 'AccountCode',
1423 'Context' => 'Context',
1424 'Exten' => 'Exten',
1425 'Priority' => 'Priority',
1426 'Uniqueid' => 'Uniqueid',
1427 'Linkedid' => 'Linkedid',
1428 ),
1429 'BridgeInfoComplete' => array(
1430 'BridgeUniqueid' => 'BridgeUniqueid',
1431 'BridgeType' => 'BridgeType',
1432 'BridgeTechnology' => 'BridgeTechnology',
1433 'BridgeCreator' => 'BridgeCreator',
1434 'BridgeName' => 'BridgeName',
1435 'BridgeNumChannels' => 'BridgeNumChannels',
1436 'BridgeVideoSourceMode' => 'BridgeVideoSourceMode',
1437 'BridgeVideoSource' => 'BridgeVideoSource',
1438 ),
778 ); 1439 );
779 $eventGetters = array( 1440 $eventGetters = array(
780 'UserEvent' => array( 1441 'UserEvent' => array(
...@@ -843,7 +1504,10 @@ class Test_Events extends \PHPUnit_Framework_TestCase ...@@ -843,7 +1504,10 @@ class Test_Events extends \PHPUnit_Framework_TestCase
843 'X-vGSM-ME-State' => 'State', 1504 'X-vGSM-ME-State' => 'State',
844 ), 1505 ),
845 'ParkedCall' => array('Exten' => 'Extension'), 1506 'ParkedCall' => array('Exten' => 'Extension'),
846 'UnParkedCall' => array('Exten' => 'Extension') 1507 'UnParkedCall' => array('Exten' => 'Extension'),
1508 'AGIExecStart' => array(
1509
1510 ),
847 ); 1511 );
848 foreach ($eventNames as $eventName) { 1512 foreach ($eventNames as $eventName) {
849 $this->_testEvent($eventName, $eventGetters, $eventValues[$eventName], $eventTranslatedValues); 1513 $this->_testEvent($eventName, $eventGetters, $eventValues[$eventName], $eventTranslatedValues);
...@@ -896,7 +1560,13 @@ class Test_Events extends \PHPUnit_Framework_TestCase ...@@ -896,7 +1560,13 @@ class Test_Events extends \PHPUnit_Framework_TestCase
896 if (isset($translatedValues[$eventName][$key])) { 1560 if (isset($translatedValues[$eventName][$key])) {
897 $value = $translatedValues[$eventName][$key]; 1561 $value = $translatedValues[$eventName][$key];
898 } 1562 }
899 $this->assertEquals($event->$methodName(), $value); 1563
1564 $this->assertTrue(
1565 method_exists($event, $methodName),
1566 sprintf('Method %s doesn\'t exixt in event %s', $methodName, get_class($event))
1567 );
1568
1569 $this->assertEquals($event->$methodName(), $value, $eventName);
900 } 1570 }
901 } 1571 }
902 } 1572 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!