本文整理匯總了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));
}