PHP code example of iahunter / php5-callmanager-axl

1. Go to this page and download the library: Download iahunter/php5-callmanager-axl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iahunter / php5-callmanager-axl example snippets




$URL    = "https://10.11.12.13:8443/axl"; // Prod CUCM           
$SCHEMA = "./axl/schema/10.5/AXLAPI.wsdl";                 
$USER   = "username";
$PASS   = "password";

try {
    $CUCM = new \Iahunter\CallmanagerAXL\Callmanager($URL, $SCHEMA, $USER, $PASS);
    
    $DP = $CUCM->get_device_pool_names();        
    print_r($DP);                                          

} catch (\Exception $E) {        
    echo "Error communicating with callmanager: {$E->getMessage()}".PHP_EOL;
}



$URL    = "https://10.11.12.13:8443/axl"; // Prod CUCM           
$SCHEMA = "./axl/schema/10.5/AXLAPI.wsdl";                 
$USER   = "username";
$PASS   = "password";

try {
    $CUCM = new \Iahunter\CallmanagerAXL\Callmanager($URL, $SCHEMA, $USER, $PASS);

    $PHONES = $CUCM->get_phone_names();        
    print_r($PHONES);                                          

} catch (\Exception $E) {        
    echo "Error communicating with callmanager: {$E->getMessage()}".PHP_EOL;
}