Browse code

removed Telnyx Plivo Twilio Flowroute appinfo/info.xml appinfo/signature.json README.md lib/Controller/AuthorApiController.php

DoubleBastionAdmin authored on 20/08/2022 16:26:33
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,293 +0,0 @@
1
-<?php
2
-/**
3
- * Example for MultiParty Call
4
- */
5
-require 'vendor/autoload.php';
6
-
7
-use Plivo\Resources\PHLO\PhloRestClient;
8
-use Plivo\Exceptions\PlivoRestException;
9
-
10
-
11
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
12
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
13
-
14
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
15
-
16
-
17
-try {
18
-	$response = $multiPartyCall->call($trigger_source, $to, $role);
19
-	print_r($response);
20
-} catch (PlivoRestException $ex) {
21
-	print_r($ex);
22
-} 
23
-
24
-?>
25
-
26
-<?php
27
-/**
28
- * Example for MultiParty Warm transfer
29
- */
30
-require 'vendor/autoload.php';
31
-
32
-use Plivo\Resources\PHLO\PhloRestClient;
33
-use Plivo\Exceptions\PlivoRestException;
34
-
35
-
36
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
37
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
38
-
39
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
40
-
41
-
42
-try {
43
-	$response = $multiPartyCall->warm_transfer($trigger_source, $to, $role);
44
-	print_r($response);
45
-} catch (PlivoRestException $ex) {
46
-	print_r($ex);
47
-} 
48
-
49
-?>
50
-
51
-<?php
52
-/**
53
- * Example for MultiParty Cold transfer
54
- */
55
-require 'vendor/autoload.php';
56
-
57
-use Plivo\Resources\PHLO\PhloRestClient;
58
-use Plivo\Exceptions\PlivoRestException;
59
-
60
-
61
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
62
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
63
-
64
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
65
-
66
-
67
-try {
68
-	$response = $multiPartyCall->cold_transfer($trigger_source, $to, $role);
69
-	print_r($response);
70
-} catch (PlivoRestException $ex) {
71
-	print_r($ex);
72
-} 
73
-
74
-?>
75
-
76
-<?php
77
-/**
78
- * Example for MultiParty Abort transfer
79
- */
80
-require 'vendor/autoload.php';
81
-
82
-use Plivo\Resources\PHLO\PhloRestClient;
83
-use Plivo\Exceptions\PlivoRestException;
84
-
85
-
86
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
87
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
88
-
89
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
90
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
91
-
92
-try {
93
-	$response = $multiPartyCallMember->abort_transfer();
94
-	print_r($response);
95
-} catch (PlivoRestException $ex) {
96
-	print_r($ex);
97
-} 
98
-
99
-?>
100
-
101
-<?php
102
-/**
103
- * Example for MultiParty Voicemail Drop
104
- */
105
-require 'vendor/autoload.php';
106
-
107
-use Plivo\Resources\PHLO\PhloRestClient;
108
-use Plivo\Exceptions\PlivoRestException;
109
-
110
-
111
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
112
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
113
-
114
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
115
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
116
-
117
-try {
118
-	$response = $multiPartyCallMember->voicemail_drop();
119
-	print_r($response);
120
-} catch (PlivoRestException $ex) {
121
-	print_r($ex);
122
-} 
123
-
124
-?>
125
-
126
-<?php
127
-/**
128
- * Example for MultiParty Hangup
129
- */
130
-require 'vendor/autoload.php';
131
-
132
-use Plivo\Resources\PHLO\PhloRestClient;
133
-use Plivo\Exceptions\PlivoRestException;
134
-
135
-
136
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
137
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
138
-
139
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
140
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
141
-
142
-try {
143
-	$response = $multiPartyCallMember->hangup();
144
-	print_r($response);
145
-} catch (PlivoRestException $ex) {
146
-	print_r($ex);
147
-} 
148
-
149
-?>
150
-
151
-<?php
152
-/**
153
- * Example for MultiParty Hold
154
- */
155
-require 'vendor/autoload.php';
156
-
157
-use Plivo\Resources\PHLO\PhloRestClient;
158
-use Plivo\Exceptions\PlivoRestException;
159
-
160
-
161
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
162
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
163
-
164
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
165
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
166
-
167
-try {
168
-	$response = $multiPartyCallMember->hold();
169
-	print_r($response);
170
-} catch (PlivoRestException $ex) {
171
-	print_r($ex);
172
-} 
173
-
174
-?>
175
-
176
-<?php
177
-/**
178
- * Example for MultiParty Unhold
179
- */
180
-require 'vendor/autoload.php';
181
-
182
-use Plivo\Resources\PHLO\PhloRestClient;
183
-use Plivo\Exceptions\PlivoRestException;
184
-
185
-
186
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
187
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
188
-
189
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
190
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
191
-
192
-try {
193
-	$response = $multiPartyCallMember->unhold();
194
-	print_r($response);
195
-} catch (PlivoRestException $ex) {
196
-	print_r($ex);
197
-} 
198
-
199
-?>
200
-
201
-<?php
202
-/**
203
- * Example for MultiParty Resume
204
- */
205
-require 'vendor/autoload.php';
206
-
207
-use Plivo\Resources\PHLO\PhloRestClient;
208
-use Plivo\Exceptions\PlivoRestException;
209
-
210
-use Plivo\Resources\PHLO\PhloRestClient;
211
-use Plivo\Exceptions\PlivoRestException;
212
-
213
-
214
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
215
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
216
-
217
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
218
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
219
-
220
-try {
221
-	$response = $multiPartyCallMember->unhold();
222
-	print_r($response);
223
-} catch (PlivoRestException $ex) {
224
-	print_r($ex);
225
-} 
226
-
227
-?>
228
-
229
-<?php
230
-/**
231
- * Example for MultiParty Resume
232
- */
233
-require 'vendor/autoload.php';
234
-
235
-use Plivo\Resources\PHLO\PhloRestClient;
236
-use Plivo\Exceptions\PlivoRestException;
237
-
238
-
239
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
240
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
241
-
242
-$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
243
-$multiPartyCallMember = $multiPartyCall->member($memberAddress);
244
-
245
-try {
246
-	$response = $multiPartyCallMember->resume_call();
247
-	print_r($response);
248
-} catch (PlivoRestException $ex) {
249
-	print_r($ex);
250
-} 
251
-
252
-?>
253
-
254
-
255
-<?php
256
-/**
257
- * Example for API Request
258
- */
259
-require 'vendor/autoload.php';
260
-
261
-use Plivo\Resources\PHLO\PhloRestClient;
262
-use Plivo\Exceptions\PlivoRestException;
263
-
264
-
265
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
266
-$phlo = $client->phlo->get("YOUR_PHLO_ID");
267
-
268
-try {
269
-	$response = $phlo->run(["field1" => "value1", "field2" => "value2"]); // These are the fields entered in the PHLO console
270
-	print_r($response);
271
-} catch (PlivoRestException $ex) {
272
-	print_r($ex);
273
-} 
274
-
275
-?>
276
-
277
-<?php
278
-/**
279
- * Example for PHLO Getter
280
- */
281
-require 'vendor/autoload.php';
282
-
283
-use Plivo\Resources\PHLO\PhloRestClient;
284
-use Plivo\Exceptions\PlivoRestException;
285
-
286
-
287
-$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
288
-$phlo = $client->phlo->getPhlo("YOUR_PHLO_ID");
289
-print_r($response);
290
-
291
-?>
292
-
293
-
Browse code

Created repository.

DoubleBastionAdmin authored on 01/03/2022 23:47:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,293 @@
1
+<?php
2
+/**
3
+ * Example for MultiParty Call
4
+ */
5
+require 'vendor/autoload.php';
6
+
7
+use Plivo\Resources\PHLO\PhloRestClient;
8
+use Plivo\Exceptions\PlivoRestException;
9
+
10
+
11
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
12
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
13
+
14
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
15
+
16
+
17
+try {
18
+	$response = $multiPartyCall->call($trigger_source, $to, $role);
19
+	print_r($response);
20
+} catch (PlivoRestException $ex) {
21
+	print_r($ex);
22
+} 
23
+
24
+?>
25
+
26
+<?php
27
+/**
28
+ * Example for MultiParty Warm transfer
29
+ */
30
+require 'vendor/autoload.php';
31
+
32
+use Plivo\Resources\PHLO\PhloRestClient;
33
+use Plivo\Exceptions\PlivoRestException;
34
+
35
+
36
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
37
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
38
+
39
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
40
+
41
+
42
+try {
43
+	$response = $multiPartyCall->warm_transfer($trigger_source, $to, $role);
44
+	print_r($response);
45
+} catch (PlivoRestException $ex) {
46
+	print_r($ex);
47
+} 
48
+
49
+?>
50
+
51
+<?php
52
+/**
53
+ * Example for MultiParty Cold transfer
54
+ */
55
+require 'vendor/autoload.php';
56
+
57
+use Plivo\Resources\PHLO\PhloRestClient;
58
+use Plivo\Exceptions\PlivoRestException;
59
+
60
+
61
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
62
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
63
+
64
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
65
+
66
+
67
+try {
68
+	$response = $multiPartyCall->cold_transfer($trigger_source, $to, $role);
69
+	print_r($response);
70
+} catch (PlivoRestException $ex) {
71
+	print_r($ex);
72
+} 
73
+
74
+?>
75
+
76
+<?php
77
+/**
78
+ * Example for MultiParty Abort transfer
79
+ */
80
+require 'vendor/autoload.php';
81
+
82
+use Plivo\Resources\PHLO\PhloRestClient;
83
+use Plivo\Exceptions\PlivoRestException;
84
+
85
+
86
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
87
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
88
+
89
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
90
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
91
+
92
+try {
93
+	$response = $multiPartyCallMember->abort_transfer();
94
+	print_r($response);
95
+} catch (PlivoRestException $ex) {
96
+	print_r($ex);
97
+} 
98
+
99
+?>
100
+
101
+<?php
102
+/**
103
+ * Example for MultiParty Voicemail Drop
104
+ */
105
+require 'vendor/autoload.php';
106
+
107
+use Plivo\Resources\PHLO\PhloRestClient;
108
+use Plivo\Exceptions\PlivoRestException;
109
+
110
+
111
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
112
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
113
+
114
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
115
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
116
+
117
+try {
118
+	$response = $multiPartyCallMember->voicemail_drop();
119
+	print_r($response);
120
+} catch (PlivoRestException $ex) {
121
+	print_r($ex);
122
+} 
123
+
124
+?>
125
+
126
+<?php
127
+/**
128
+ * Example for MultiParty Hangup
129
+ */
130
+require 'vendor/autoload.php';
131
+
132
+use Plivo\Resources\PHLO\PhloRestClient;
133
+use Plivo\Exceptions\PlivoRestException;
134
+
135
+
136
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
137
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
138
+
139
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
140
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
141
+
142
+try {
143
+	$response = $multiPartyCallMember->hangup();
144
+	print_r($response);
145
+} catch (PlivoRestException $ex) {
146
+	print_r($ex);
147
+} 
148
+
149
+?>
150
+
151
+<?php
152
+/**
153
+ * Example for MultiParty Hold
154
+ */
155
+require 'vendor/autoload.php';
156
+
157
+use Plivo\Resources\PHLO\PhloRestClient;
158
+use Plivo\Exceptions\PlivoRestException;
159
+
160
+
161
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
162
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
163
+
164
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
165
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
166
+
167
+try {
168
+	$response = $multiPartyCallMember->hold();
169
+	print_r($response);
170
+} catch (PlivoRestException $ex) {
171
+	print_r($ex);
172
+} 
173
+
174
+?>
175
+
176
+<?php
177
+/**
178
+ * Example for MultiParty Unhold
179
+ */
180
+require 'vendor/autoload.php';
181
+
182
+use Plivo\Resources\PHLO\PhloRestClient;
183
+use Plivo\Exceptions\PlivoRestException;
184
+
185
+
186
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
187
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
188
+
189
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
190
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
191
+
192
+try {
193
+	$response = $multiPartyCallMember->unhold();
194
+	print_r($response);
195
+} catch (PlivoRestException $ex) {
196
+	print_r($ex);
197
+} 
198
+
199
+?>
200
+
201
+<?php
202
+/**
203
+ * Example for MultiParty Resume
204
+ */
205
+require 'vendor/autoload.php';
206
+
207
+use Plivo\Resources\PHLO\PhloRestClient;
208
+use Plivo\Exceptions\PlivoRestException;
209
+
210
+use Plivo\Resources\PHLO\PhloRestClient;
211
+use Plivo\Exceptions\PlivoRestException;
212
+
213
+
214
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
215
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
216
+
217
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
218
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
219
+
220
+try {
221
+	$response = $multiPartyCallMember->unhold();
222
+	print_r($response);
223
+} catch (PlivoRestException $ex) {
224
+	print_r($ex);
225
+} 
226
+
227
+?>
228
+
229
+<?php
230
+/**
231
+ * Example for MultiParty Resume
232
+ */
233
+require 'vendor/autoload.php';
234
+
235
+use Plivo\Resources\PHLO\PhloRestClient;
236
+use Plivo\Exceptions\PlivoRestException;
237
+
238
+
239
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
240
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
241
+
242
+$multiPartyCall = $phlo->multiPartyCall()->get("YOUR_NODE_ID");
243
+$multiPartyCallMember = $multiPartyCall->member($memberAddress);
244
+
245
+try {
246
+	$response = $multiPartyCallMember->resume_call();
247
+	print_r($response);
248
+} catch (PlivoRestException $ex) {
249
+	print_r($ex);
250
+} 
251
+
252
+?>
253
+
254
+
255
+<?php
256
+/**
257
+ * Example for API Request
258
+ */
259
+require 'vendor/autoload.php';
260
+
261
+use Plivo\Resources\PHLO\PhloRestClient;
262
+use Plivo\Exceptions\PlivoRestException;
263
+
264
+
265
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
266
+$phlo = $client->phlo->get("YOUR_PHLO_ID");
267
+
268
+try {
269
+	$response = $phlo->run(["field1" => "value1", "field2" => "value2"]); // These are the fields entered in the PHLO console
270
+	print_r($response);
271
+} catch (PlivoRestException $ex) {
272
+	print_r($ex);
273
+} 
274
+
275
+?>
276
+
277
+<?php
278
+/**
279
+ * Example for PHLO Getter
280
+ */
281
+require 'vendor/autoload.php';
282
+
283
+use Plivo\Resources\PHLO\PhloRestClient;
284
+use Plivo\Exceptions\PlivoRestException;
285
+
286
+
287
+$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
288
+$phlo = $client->phlo->getPhlo("YOUR_PHLO_ID");
289
+print_r($response);
290
+
291
+?>
292
+
293
+