Forfaits VoIP - API - Playaudio
... / API - Playaudio
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

API - Playaudio

Von
LucasM
Erstellungsdatum 2019-04-23 18:06:12 (edited on 2024-09-04 13:51:11) in Forfaits VoIP

Salut,

Toujours avec mes APIs, je cherche à lire un fichier audio (mp3) via l'API automatic call

$ovh = new Api( 'xxxxxxxxxx', // Application Key
'xxxxxxxxxx', // Application Secret
'ovh-eu', // Endpoint of API OVH Europe (List of available endpoints)
'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post('/telephony/{billingAccount}/line/{serviceName}/automaticCall', array(
'bridgeNumberDialplan' => NULL, // Number to call if transfer in dialplan selected (type: phoneNumber)
'calledNumber' => NULL, // Number to call (type: phoneNumber)
'callingNumber' => NULL, // Optional, number where the call come from (type: phoneNumber)
'dialplan' => 'PlayAudioFile', // Dialplan used for the call (type: telephony.CallsGeneratorDialplanEnum)
'isAnonymous' => false, // For anonymous call (type: boolean)
**'playbackAudioFileDialplan' => _NULL_, // Name of the audioFile (if needed) with extention. This audio file must have been upload previously (type: string)**
'timeout' => NULL, // Timeout (in seconds). Default is 20 seconds (type: long)
'ttsTextDialplan' => NULL, // Text to read if TTS on dialplan selected (type: string)
));

print_r( $result );

Le nom du fichier à lire, je l'ai mis dans le dossier du script, j'ai donc indiqué sur le champ en gras "monfichier.mp3", ça ne donne rien, l'appel se produit mais ça racroche immédiatement.
Le fichier n'est pas lu. J'ai pensé que ça ne trouvait pas le fichier, j'ai donc mis la constante __DIR__ devant, toujours rien. Puis l'URL (web)... Toujours rien. Quelqu'un peut-il m'aider ? Savez-vous ce qu'il faut indiquer ?

Merci d'avance,
LM