diff --git a/lib/Api.php b/lib/Api.php index d187a68..6cbc97a 100644 --- a/lib/Api.php +++ b/lib/Api.php @@ -37,6 +37,8 @@ use Zadarma_API\Webhook\NotifyOutStart; use Zadarma_API\Webhook\NotifyRecord; use Zadarma_API\Webhook\NotifyStart; +use Zadarma_API\Webhook\NotifySpeechRecognition; +use Zadarma_API\Webhook\NotifySms; class Api extends Client { @@ -694,6 +696,14 @@ public function getWebhookEvent($eventFilter = null, $postData = null, $signatur $notify = new NotifyRecord($postData); break; + case AbstractNotify::EVENT_SPEECH_RECOGNITION: + $notify = new NotifySpeechRecognition($postData); + break; + + case AbstractNotify::EVENT_SMS: + $notify = new NotifySms($postData); + break; + default: return null; } diff --git a/lib/Webhook/AbstractNotify.php b/lib/Webhook/AbstractNotify.php index 5c806a1..2fca783 100644 --- a/lib/Webhook/AbstractNotify.php +++ b/lib/Webhook/AbstractNotify.php @@ -12,6 +12,8 @@ abstract class AbstractNotify extends \Zadarma_API\Response\Response const EVENT_OUT_END = 'NOTIFY_OUT_END'; const EVENT_RECORD = 'NOTIFY_RECORD'; const EVENT_IVR = 'NOTIFY_IVR'; + const EVENT_SPEECH_RECOGNITION = 'SPEECH_RECOGNITION'; + const EVENT_SMS = 'SMS'; public $event; diff --git a/lib/Webhook/NotifySms.php b/lib/Webhook/NotifySms.php new file mode 100644 index 0000000..2e598e6 --- /dev/null +++ b/lib/Webhook/NotifySms.php @@ -0,0 +1,23 @@ +result; + } +} \ No newline at end of file diff --git a/lib/Webhook/NotifySpeechRecognition.php b/lib/Webhook/NotifySpeechRecognition.php new file mode 100644 index 0000000..0c25744 --- /dev/null +++ b/lib/Webhook/NotifySpeechRecognition.php @@ -0,0 +1,26 @@ +result; + } +} \ No newline at end of file