API
Insert URL appel entrant
URL to receive incoming calls
URL: YOUR_CALLBACK_URL
YOUR_CALLBACK_URL contents should be like this
$calls =json_decode($_GET["calls"]); $obj=array(); $page=dirname(__FILE__).'/call.json'; if (file_exists($page)) { $file = file_get_contents($page); $res=json_decode($file); if(is_array($res)) $obj = $res; } $fh = fopen($page, 'w') or die ("can't open file"); array_push($obj,$calls); fwrite($fh, json_encode($obj)); fclose($fh);
Sample response
In case Of success
A JSON file named call.json is created in the same workspace as you YOUR_CALLBACK_URL { "title":"incoming call", "tel":" xxxxxxxxxxxx", "date_appel":"2019-07-05T15:11:04.485Z" }