本文整理汇总了C#中TropoCSharp.Tropo.Tropo.call方法的典型用法代码示例。如果您正苦于以下问题:C# Tropo.call方法的具体用法?C# Tropo.call怎么用?C# Tropo.call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TropoCSharp.Tropo.Tropo
的用法示例。
在下文中一共展示了Tropo.call方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: testCallUsingCallObject
public void testCallUsingCallObject()
{
Tropo tropo = new Tropo();
Hashtable headers = new Hashtable();
headers.Add("foo", "bar");
headers.Add("bling", "baz");
StartRecording recording = new StartRecording(AudioFormat.mp3, Method.post, "http://blah.com/recordings/1234.wav", "jose", "password");
ArrayList to = new ArrayList(1);
to.Add("3055195825");
Call call = new Call();
call.recording = recording;
call.headers = headers;
call.timeout = 10;
call.answerOnMedia = false;
call.channel = Channel.text;
call.network = Network.sms;
call.to = to;
call.from = new Endpoint("3055551212", null, null, null);
tropo.call(call);
Assert.AreEqual(this.callJsonAllOptions, TropoJSON.render(tropo));
}
示例2: testToOnly
public void testToOnly()
{
ArrayList numbersToCall = new ArrayList(2);
numbersToCall.Add("3055195825");
numbersToCall.Add("3054445567");
Tropo tropo = new Tropo();
tropo.call(numbersToCall);
Assert.AreEqual(this.callJson, TropoJSON.render(tropo));
}
示例3: testCallUseAllOptions
public void testCallUseAllOptions()
{
Tropo tropo = new Tropo();
Hashtable headers = new Hashtable(2);
headers.Add("foo", "bar");
headers.Add("bling", "baz");
StartRecording recording = new StartRecording(AudioFormat.mp3, Method.post, "http://blah.com/recordings/1234.wav", "jose", "password");
tropo.call("3055195825", "3055551212", Network.sms, Channel.text, false, 10, headers, recording);
Assert.AreEqual(this.callJsonAllOptions, TropoJSON.render(tropo));
}