public function TwilioController::voiceIncoming in Twilio 8
Invokes twilio_voice_incoming hook.
Parameters
string $number: The sender's mobile number.
string $number_twilio: The twilio recipient number.
array $options: Options array.
1 call to TwilioController::voiceIncoming()
- TwilioController::receiveVoice in src/
Controller/ TwilioController.php - Handle incoming voice requests.
File
- src/
Controller/ TwilioController.php, line 104
Class
- TwilioController
- Default controller for the twilio module.
Namespace
Drupal\twilio\ControllerCode
public function voiceIncoming($number, $number_twilio, array $options = array()) {
$voice = array(
'number' => $number,
'number_twilio' => $number_twilio,
);
// Invoke a hook for the incoming message so other modules can do things.
$this
->moduleHandler()
->invokeAll('twilio_voice_incoming', [
$voice,
$options,
]);
if ($this
->moduleHandler()
->moduleExists('rules')) {
rules_invoke_event('twilio_voice_incoming', $voice);
}
}