09-10-2020 05:10 AM
Hello,
We're using Broadworks Xtended Services Interface for calling purpose.
We have found following URL for new call
http(s)://host:port/com.broadsoft.xsi-actions/v2.0/user/<userid>/calls/new
We do not know what to use in the place of host:port.
Do we need to host any code or library provided by Broadworks on our server and then that URL need to be replaced here?
Please help us what to do. We don't know from where we need to start developing.
Thanks in advance.
09-10-2020 07:34 AM
please use "broadsoftsandboxxsp.cisco.com" for the host. you don't have to define a port.
09-10-2020 08:34 AM - edited 09-10-2020 08:38 AM
Thanks for your quick reply.
I have tried with given host, my URL is as follow,
But now it is responding with "401 Unauthorised", I have tried with Basic Auth using provided username and password. It is still not working.
I have tried in postman and with CURL php.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://broadsoftsandboxxsp.cisco.com/com.broadsoft.xsi-actions/v2.0/user/<userid>/calls/new?address=xxxxxxxxxx");
curl_setopt($ch,CURLOPT_USERPWD,"username:password");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array('address' => 'xxxxxxxxxx')));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close ($ch);
if ($server_output == "OK") {
echo "<pre>Success<br>"; print_r($server_output); echo "</pre>";
} else {
echo "<pre>ERRORS<br>"; print_r($server_output); echo "</pre>";
}
?>
Please help me, I'm stuck with this. How do I overcome 401 Unauthorised Error. What method should I use for Authentication.
Thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide