Forfaits VoIP - Click2call API ne fonctionne plus en soap ?
... / Click2call API ne fonctio...
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

Click2call API ne fonctionne plus en soap ?

Von
XavierD68
Erstellungsdatum 2021-08-31 16:32:53 (edited on 2024-09-04 11:38:41) in Forfaits VoIP

J'utilisais jusqu'à juillet 2021 le click2call d'OVH via leurs API
Le code était simple et ça marchait au poil.
> $soap = new SoapClient("https://www.ovh.com/soapi/soapi-re-1.16.wsdl");
> $soap -> telephonyClick2CallDo("$identifiant", "$mot_de_passe", "$ligne_from", "$ligne_dest", "$votre_ligne");

J'obtiens l'erreur suivante avec ce code (qui a toujours fonctionné)
> _SoapFault exception: soap:500] Application error in /var/www/html/idranet/clicktocallOVH.php:78 Stack trace: #0 /var/www/html/idranet/clicktocallOVH.php(78): SoapClient->__call('telephonyClick2...', Array) #1 {main}_

Je vais voir la doc et je tombe sur une explication qui n'a rien à voir et très mal expliquée
Il faut utiliser **/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/click2Call**

Donc déjà je met 3h à devicer ce qu'est le "serviceName" (c'est le n° de téléphone appelant)
et 3h à comprendre ce qu'est le {id} (c'est l'id d'un user obtenu grâce à /telephony/{billingAccount}/line/{serviceName}/click2CallUser)
Super la doc !!

Ensuite j'arrive à faire fonctionner l'API `/telephony/{billingAccount}/line/{serviceName}/click2CallUser/{id}/click2Call` dans l'interface proposée [par OVH ici


Je récupère le code PHP proposé, et là ils expliquent qu'il faut installer un PHP wrapper, mais il n'expliquent pas du tout où déposer ce machin, et pourquoi ils appellent ensuite "`__DIR__ . '/vendor/autoload.php'`;" alors qu'il n'y a aucun autoload dans le script chargé.

(et puis il faut aussi se créer des clefs d'API, mais là ça va)

Quelqu'un saurait-il m'aider à faire fonctionner ce Click2Call correctement SVP ?