diff --git a/sms_contact/aws.php b/sms_contact/aws.php new file mode 100644 index 0000000..441d518 --- /dev/null +++ b/sms_contact/aws.php @@ -0,0 +1,42 @@ +getBalance(); + $message = preg_replace('/\r?\n/m', '\n', trim($json['Message'])); + + if ($balance < $config['reserve']) { + header("HTTP/1.0 402 Payment Required"); + die(); + } + + $sipgate->sendSMS($config['recipient'], $message, NULL, $config['recipient']); + break; + + default: + header("HTTP/1.1 501 Not Implemented"); + } +} +else { + header("HTTP/1.1 405 Method Not Allowed"); +} + +?>