Ma société possède un abonnement VOIP et notre standard téléphonique passe par cet abonnement.
Je cherche à automatiser un appel avec l’API « telephony » en utilisant un numéro fourni par OVH.
Sur la console web (https://api.ovh.com/console/ dans le navigateur), tout se passe bien lorsque je teste :
POST https://api.ovh.com/console/#/telephony/{billingAccount}/line/{serviceName}/automaticCall
billingAccount = mon identifiant ovhtel (ovhtel-XXXXXX-1)
serviceName = mon numéro de téléphone OVH (00339XXXXXXXX)
bridgeNumberDialplan=NULL, # Number to call if transfer in dialplan selected (type: phoneNumber)
calledNumber='00336XXXXXXXX', # Number to call (type: phoneNumber)
callingNumber= NULL, # Optional, number where the call come from (type: phoneNumber)
dialplan='ReadText', # 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=120, # Timeout (in seconds). Default is 20 seconds (type: long)
ttsTextDialplan='. . . . salut . . . comment vas-tu ce matin ? . . . . . . . .', # Text to read if TTS on dialplan selected (type: string)
=> J’obtiens bien un appel sur mon mobile.
L'identifiant de la connexion retourné est : 414025472
Dans mon script PYTHON:
Je me connecte à l'API OVH:
import ovh
client = ovh.Client(
endpoint = 'ovh-eu',
application_key = 'xxxxxxxx',
application_secret = 'xxxxxxxx',
consumer_key = 'xxxxxxxx',
)
client.get('/telephony/ovhtel-XXXXXX-1/line/00339XXXXXXXX')
# OK: J'obtiens une réponse correcte à cette requête
# Je suis donc bien connecté sur l'API OV
client.get('/telephony/ovhtel- XXXXXX -1/line/00339XXXXXXXX'/automaticCall/414025472')
# L'identifiant "414025472" est celui de la connexion via api.ovh.com
# OK: J'obtiens bien un retour JSON me donnant les infos relatives à ma connexion avec succès sur api.ovh.com
client.post('/telephony/ovhtel- XXXXXX -1/line/00339XXXXXXXX'/automaticCall',
bridgeNumberDialplan=None, # Number to call if transfer in dialplan selected (type: phoneNumber)
calledNumber='00336XXXXXXXX', # Number to call (type: phoneNumber)
callingNumber=None, # Optional, number where the call come from (type: phoneNumber)
dialplan='ReadText', # Dialplan used for the call (type: telephony.CallsGeneratorDialplanEnum)
isAnonymous=False, # For anonymous call (type: boolean)
playbackAudioFileDialplan=None, # Name of the audioFile (if needed) with extention. This audio file must have been upload previously (type: string)
timeout=120, # Timeout (in seconds). Default is 20 seconds (type: long)
ttsTextDialplan='. . . . salut . . . comment vas-tu ce matin ? . . . . . . . .', # Text to read if TTS on dialplan selected (type: string)
)
# Je reprends STRICTEMENT les mêmes paramètres que ceux fournis par la console du browser (copier-coller)
# ERREUR: J'obtiens l'exception: "This call has not been granted".
=> Ce retour de l'API m'incite à penser qu'il y un problème de droit, rencontré sur endpoint = 'ovh-eu' mais pas sur "https://api.ovh.com/" ??
Forfaits VoIP - API "telephony" : Automatisation d'appel AutomaticCall
Related questions
- Configuration SIP VOH avec une application SIP sur android
55042
12.09.2019 07:50
- Sip ovh sur android ?
54283
04.06.2017 19:32
- Un numéro injoignable et support ovh ne répond pas aux demandes
50280
25.04.2018 09:06
- VOIP + 4G BOX besoin d'aide
45419
17.03.2017 11:13
- Configuration Zoiper pour Android 8.1.0
43928
18.01.2019 19:01
- Paramétrage Serveur SIP et compte SIP sur Huawei E5186s-22a
43319
21.12.2017 09:47
- Téléphonie en Belgique
43111
09.12.2016 07:31
- Cisco 8851 reçu non configuré
39609
07.06.2018 08:53
- Ip interdite sur Téléphone Yealink W60P
38965
03.01.2019 18:21
- Ligne tel OVH configurée sur BBOX3 Proximus
33436
07.12.2021 07:51