Service
Class Service
Table of Contents
Methods
- canUse() : bool|null
- Can use.
- getFormattedOutputNumber() : mixed
- onInfoCallResult() : void
- OnInfoCallResult event handler.
- send() : string|null
- Send.
- sendFile() : string|null
- Send recordered audio file.
Methods
canUse()
Can use.
public
static canUse() : bool|null
Return values
bool|nullgetFormattedOutputNumber()
public
static getFormattedOutputNumber(mixed $value) : mixed
Parameters
- $value : mixed
onInfoCallResult()
OnInfoCallResult event handler.
public
static onInfoCallResult(int $callId, array<string|int, mixed> $callData) : void
Parameters
- $callId : int
-
Call id.
- $callData : array<string|int, mixed>
-
Call data.
send()
Send.
public
static send(string $outputNumber, string $number, string $text[, string $voiceLanguage = '' ][, string $voiceSpeed = '' ][, string $voiceVolume = '' ]) : string|null
Parameters
- $outputNumber : string
-
Id of the line to perform outgoing call.
- $number : string
-
Number to be called.
- $text : string
-
Text to say.
- $voiceLanguage : string = ''
-
TTS voice (@see: Tts\Language).
- $voiceSpeed : string = ''
-
TTS voice speed (@see Tts\Speed).
- $voiceVolume : string = ''
-
TTS voice volume (@see Tts\Volume).
Return values
string|nullsendFile()
Send recordered audio file.
public
static sendFile(string $outputNumber, string $number, string $fileUrl) : string|null
Parameters
- $outputNumber : string
-
Id of the line to perform outgoing call.
- $number : string
-
Number to be called.
- $fileUrl : string
-
Audio file to be voiced.