BD-FBP94
08/08/2016, 16h39
Depuis que je les ai récupérées, je n'ai pas eu à modifier ces valeurs... mais peut être y a t'il un intérêt à créer des comptes différents en fonction des différentes actions que l'on peut avoir à faire...
(array_key_exists("caller", $_GET))? $votre_ligne_qui_appel=filter_input(INPUT_GET, 'caller', FILTER_SANITIZE_STRING) : $votre_ligne_qui_appel=''; (array_key_exists("called", $_GET))? $ligne_a_appeler=filter_input(INPUT_GET, 'called', FILTER_SANITIZE_STRING) : $ligne_a_appeler=''; //ATTENTION, pour ces 2 N°, format international obligatoire. $ApplicationKey ='zVXCryDx9aFoQ8Cl'; $ApplicationSecret ='Cfq1cQhx1CWeAL62iDxAWCuxkKM8aOf0'; $ConsumerKey ='nNlwUhw96SA4kqUKPLOls9gd9yPtleXd'; $billingAccount ='ovhtel-12345678-1';//groupe de facturation qui détient les lignes $servicename =$votre_ligne_qui_appel;//nom du service, si il s'agit d'une ligne, c'est le numéro au format international
require __DIR__ . '/vendor/autoload.php'; use \Ovh\Api; //*Script d'appel $ovh = new Api( $ApplicationKey, // Application Key $ApplicationSecret, // Application Secret 'ovh-eu', // Endpoint of API OVH Europe (List of available endpoints) $ConsumerKey); // Consumer Key $result = $ovh->post('/telephony/'.$billingAccount.'/line/'.$servicename.'/click2Call', array( 'calledNumber' => $ligne_a_appeler, // Required: (type: string) 'callingNumber' => $votre_ligne_qui_appel, // (type: string) 'intercom' => 'true', // Activate the calling number in intercom mode automatically (pick up and speaker automatic activation). (type: boolean) ));//*/ print_r( $result );
$ovh = new OvhApi(); $result = array(); $result = $ovh->post('/telephony/'.$billingAccount.'/line/'.$servicename.'/click2Call', array( 'calledNumber' => $ligne_a_appeler, // Required: (type: string) 'callingNumber' => $votre_ligne_qui_appel, // (type: string) 'intercom' => 'true', // Active l'appel en mode intercome (type: boolean) )); print_r( $result );
$ovh = new OvhApi(); $result = array(); $result = $ovh->post('/telephony/'.$billingAccount.'/line/'.$servicename.'/click2Call', array( 'calledNumber' => $ligne_a_appeler, // Required: (type: string) 'intercom' => 'true', // Activate the calling number in intercom mode automatically (pick up and speaker automatic activation). (type: boolean) )); print_r ($result);
----- The following addresses had permanent fatal errors -----(reason: 550 sorry, user over quota [mail545] (#5.1.1)) ----- Transcript of session follows ----- ... while talking to mx2.ovh.net.: >>> RCPT To: <<< 550 sorry, user over quota [mail545] (#5.1.1) 550 5.1.1 ... User unknown >>> DATA <<< 557 RCPT TO first, sorry, you have to learn SMTP RFC before talk to me (#5.7.1)
/**
* First, download the latest release of PHP wrapper on github
* And include this script into the folder with extracted files
*/
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;
/**
* Instanciate an OVH Client.
* You can generate new credentials with full access to your account on
* the token creation page
*/
$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}/click2Call', array(
'calledNumber' => 'xxxx', // Required: (type: string)
'intercom' => 'false', // Activate the calling number in intercom mode automatically (pick up and speaker automatic activation). (type: boolean)
));
print_r( $result );
?>
désolé si l'information n'est pas remontée jusqu'à vous
telephonyClick2CallDo("$identifiant", "$mot_de_passe", "$votre_ligne_qui_appel", "$ligne_a_appeler", "$votre_ligne"); echo "telephonyClick2CallDo successfull\n"; } catch(SoapFault $fault) { echo $fault; } ?>