Child pages
  • Sample PHP Code
Skip to end of metadata
Go to start of metadata

Retrieves current active call list, prints total number of currently active calls.

Replace IP.ADDR.OF.SIPX with the IP address of your primary sipXecs server

#!/usr/bin/php
<?php
$client = new SoapClient(NULL, array('cache_wsdl' => WSDL_CACHE_NONE, 'location' => "http://IP.ADDR.OF.SIPX:8130", 'uri' => "urn:CdrService"));
try {
        $total = count($client->__soapCall("getActiveCalls", array(), array('soapaction' => "getActiveCalls")));
} catch (Exception $e) {
        print "0";
        print "\n";
        exit(1);
}
print $total;
print "\n";
?>
  • No labels