Home Forums Voip – Development D Orders Manager Reply To: Orders Manager

Krunal
Participant
Post count: 199

Reply of #2398

1) Before place order first check the status of numbers (available or not);
=> above step will covered by requesting the function/request “getStatusByNumberSearch” (see 3.7.2 in API document).

Request;
$check_filter_element = [
‘telephoneNumber’ => [XXXXXXX222],
];
//here getParamas() is use for authentication.
try {
$fullPathToWsdl = “https://animate.peerlessnetwork.com/api/axis/APIService?wsdl”;

// Instantiate the SoapClient object.
ini_set(‘default_socket_timeout’, 5000);
$client = new SoapClient($fullPathToWsdl,
array(
‘trace’ => true,
‘connection_timeout’ => 500000,
‘cache_wsdl’ => WSDL_CACHE_BOTH,
‘keep_alive’ => false,
)
);

$final_param = $this->getPParams()+$check_filter_element;
$numberArray = $client->getStatusByNumberSearch($final_param);

return $numberArray;

} catch (Exception $e) {
echo “SOAP Request failed: \n\t”, $e->faultstring, “\n\t”, $e->faultcode, “\n”;
}

Response;
stdClass Object
(
[return] => stdClass Object
(
[result] => stdClass Object
(
[entry] => Array
(
[0] => stdClass Object
(
[key] => XXXXXXX222
[value] => No information is available.
)
)
)
)
)