我在Twilio中实施了电话会议,但它不起作用。错误是:
错误:11200 HTTP检索失败
更多细节:
405 - 不允许使用用于访问此页面的HTTP动词。
代码:
string AccountSid = "...";
string AuthToken = ".....";
var twilio = new TwilioRestClient(AccountSid, AuthToken);
string appversion = twilio.ApiVersion;
ArrayList participants = new ArrayList();
// participants.Add("+972599223072");
participants.Add(txtphone1.Text);
participants.Add(txtphone2.Text);
participants.Add(txtphone3.Text);
participants.Add(txtphone4.Text);
participants.Add(txtphone5.Text);
participants.Add(txtphone6.Text);
participants.Add(txtphone7.Text);
// Go through the participants array and call each person.
foreach (string user in participants)
{
if (user != "")
{
var options = new CallOptions();
options.Url = "http://sandbox4.eureeca.com/Conference/conference.xml";
options.To = user;
options.From = "+97243741357";
options.Method = "POST";
options.Record = true;
// options.StatusCallback = "/2010-04-01/Accounts/" + AccountSid + "/Calls";
var call = twilio.InitiateOutboundCall(options);
Console.WriteLine(call.Sid);
}
代码结束
Conference.xml content :
<?xml version="1.0" encoding="utf-8" ?>
<Response>
<Say>Joining a conference room</Say>
<Dial>
<Conference>MyConference</Conference>
</Dial>
</Response>
答案 0 :(得分:0)
Twilio传道者在这里。
看起来你是TwiML在静态XML文件中? Web服务器通常不允许POST请求到静态文件。您可以重新配置Web服务器以允许此操作,或者将CallOptions Method
属性更改为“GET”以告知Twilio对文件发出GET请求而不是POST。
希望有所帮助。