接口数据 处理 主要看sign签名的规则
$params = $this->getRequest()->getPost();
//客户号码
//客户电话
$from_number = $params['tel'] = '13888888888';
//中继号码
$to_number = '021123456';
//管理系统 邮箱
$email = '123454545@qq.com';
//秘钥
$open_api_token = 'nce jieianscindsa-sdfas';
$time = Comm_Tools::getFullDate();
$timestamp = strtotime($time);
//签名 认证 参数
$sign = SHA1($email.'&'.$open_api_token.'&'.$timestamp);
//post数据传输 需要组合数据 参数和数据一一对应
$data = array('from_number'=>$from_number,
'to_number'=>'01080908300',
'email'=>$email,
'timestamp'=>$timestamp,
'sign'=>$sign
);
//接口地址
$url = urldecode('https://host.ip.cn/callcenter/web_callback/');
//GET方式的直接使用
$file_contents = file_get_content('https://host.ip.cn/callcenter/web_callback?a=Apiss&b=Insdfdex&c=tel') ;
//POST方式得用下面的(需要开启PHP curl支持)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// post数据
curl_setopt($ch, CURLOPT_POST, 1);
// post的变量
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
print_r($response);
//$response = Comm_Tools::curl($url, 'POST',$data,$attributes);