<?php
#Link to developer portal for connect to agent https://developer.exotel.com/api/#call-agent
$post_data = array(
'From' => "from_number",
'To' => "to_number",
'Url' => "http://my.exotel.com/Exotel/exoml/start_voice/0000000000",
'CallerId' => "000",
'CallType' => "trans"
);
$api_key = "api_key";
$api_token = "api_token";
$exotel_sid = "sid";
#Replace <subdomain> with the region of your account
#<subdomain> of Singapore cluster is @api.exotel.com
#<subdomain> of Mumbai cluster is @api.in.exotel.com
$url = "https://" . $api_key . ":" . $api_token . "@api.exotel.com/v1/Accounts/" . $exotel_sid . "/Calls/connect";
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$http_result = curl_exec($ch);
curl_close($ch);
echo "<pre>";
print "Response = ".print_r($http_result);
?>
嗨, 这是我通过 exotel 服务器连接两部手机的 curl 代码。我接到“发件人”号码的电话。接听电话后,它说号码设置不正确并要求使用应用集市。但是我在 app bazaar 中关联了我的号码,尽管我收到了这张便条。谁能帮帮我,我错在哪里?