Update api.twilo.php
This commit is contained in:
parent
2b5ae71d10
commit
fba64d4079
|
@ -8,3 +8,22 @@
|
||||||
|
|
||||||
loadHelper("twilio.api");
|
loadHelper("twilio.api");
|
||||||
|
|
||||||
|
$action = get_requested_value("action");
|
||||||
|
$from = get_requested_value("from");
|
||||||
|
$to = get_requested_value("to");
|
||||||
|
|
||||||
|
$sid = "";
|
||||||
|
$token = "";
|
||||||
|
|
||||||
|
switch($action) {
|
||||||
|
case "message":
|
||||||
|
$response = twilio_send_message($message, $from, $to, $sid, $token);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "voice":
|
||||||
|
$response = twilio_send_voice("", $from, $to, $sid, $token);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
header("Content-Type: application/json");
|
||||||
|
echo json_encode($response);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user