public void Test_SendCallVoiceComplete() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendCall = new CfSendCall { Type = CfBroadcastType.Voice, ToNumber = toNumberList, ScrubBroadcastDuplicates = true, Item = new CfVoiceBroadcastConfig { FromNumber = VerifyFromNumber, Item = "TTS: eeee", MachineSoundTextVoice = "SPANISH1", Item1 = "TTS: eeee", LocalTimeZoneRestriction = new CfLocalTimeZoneRestriction { BeginTime = new DateTime(2014, 01, 01, 09, 00, 00), EndTime = new DateTime(2014, 01, 01, 17, 00, 00) }, RetryConfig = new CfBroadcastConfigRetryConfig { MaxAttempts = 2, MinutesBetweenAttempts = 5, RetryPhoneTypes = new[] { CfRetryPhoneType.HomePhone }, RetryResults = new[] { CfResult.NoAns } } } }; var id = Client.SendCall(sendCall); Assert.IsNotNull(id); }
public void Test_SendCallIVRComplete() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendCall = new CfSendCall { Type = CfBroadcastType.Ivr, ToNumber = toNumberList, ScrubBroadcastDuplicates = true, Item = new CfIvrBroadcastConfig { FromNumber = VerifyFromNumber, DialplanXml = "<dialplan><play type=\"tts\">Congratulations! You have successfully configured a CallFire I V R.</play></dialplan>", LocalTimeZoneRestriction = new CfLocalTimeZoneRestriction { BeginTime = new DateTime(2014, 01, 01, 09, 00, 00), EndTime = new DateTime(2014, 01, 01, 17, 00, 00) }, RetryConfig = new CfBroadcastConfigRetryConfig { MaxAttempts = 2, MinutesBetweenAttempts = 5, RetryPhoneTypes = new[] { CfRetryPhoneType.HomePhone }, RetryResults = new[] { CfResult.NoAns } } } }; var id = Client.SendCall(sendCall); Assert.IsNotNull(id); }
public SendCall(CfSendCall cfSendCall) { RequestId = cfSendCall.RequestId; Type = EnumeratedMapper.ScreamingSnakeCase(cfSendCall.Type.ToString()); BroadcastName = cfSendCall.BroadcastName; ToNumber = ToNumberMapper.ToToNumber(cfSendCall.ToNumber); ScrubBroadcastDuplicates = cfSendCall.ScrubBroadcastDuplicates; Label = cfSendCall.Labels; Item = BroadcastConfigMapper.ToBroadcastConfig(cfSendCall.Item, cfSendCall.Type); }
public void Test_SendCallMandatoryFaild() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendCall = new CfSendCall { Type = CfBroadcastType.Text, ToNumber = toNumberList, Item = new CfTextBroadcastConfig() }; AssertClientException <WebException, CommunicationException>(() => Client.SendCall(sendCall)); }
public void Test_SendCallMandatoryIVR() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendCall = new CfSendCall { Type = CfBroadcastType.Ivr, ToNumber = toNumberList, Item = new CfIvrBroadcastConfig { DialplanXml = "<dialplan><play type=\"tts\">Congratulations! You have successfully configured a CallFire I V R.</play></dialplan>", FromNumber = VerifyFromNumber } }; var id = Client.SendCall(sendCall); Assert.IsNotNull(id); }
public void Test_SendCallMandatoryVoice() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendCall = new CfSendCall { Type = CfBroadcastType.Voice, ToNumber = toNumberList, Item = new CfVoiceBroadcastConfig { FromNumber = VerifyFromNumber, Item = "TTS: eeee", Item1 = "TTS: eeee" } }; var id = Client.SendCall(sendCall); Assert.IsNotNull(id); }
public void Test_SendCallLabelsRest() { CfToNumber[] toNumberList = { new CfToNumber { Value = VerifyFromNumber, ClientData = "Client1" } }; var sendCall = new CfSendCall { Type = CfBroadcastType.Voice, ToNumber = toNumberList, Item = new CfVoiceBroadcastConfig { FromNumber = VerifyFromNumber, Item = "TTS: eeee", Item1 = "TTS: eeee" }, Labels = new string[] { "Test_Label_1", "Test_Label_2" } }; var id = Client.SendCall(sendCall); Assert.IsNotNull(id); }
public void FixtureSetup() { Client = new RestCallClient(MockClient.User(), MockClient.Password()); var localTimeZoneRestriction = new CfLocalTimeZoneRestriction(DateTime.Now, DateTime.Now); CfResult[] result = { CfResult.Received }; CfRetryPhoneType[] phoneTypes = { CfRetryPhoneType.FirstNumber }; var broadcastConfigRestryConfig = new CfBroadcastConfigRetryConfig(1000, 2, result, phoneTypes); var ivrBroadcastConfig = new CfIvrBroadcastConfig(1, DateTime.Now, "14252163710", localTimeZoneRestriction, broadcastConfigRestryConfig, "<dialplan><play type=\"tts\">Congratulations! You have successfully configured a CallFire I V R.</play></dialplan>"); var toNumber = new[] { new CfToNumber("Data", null, "14252163710") }; var labels = new string[] { "Test_Label_1", "Test_Label_2" }; SendCall = new CfSendCall(String.Empty, CfBroadcastType.Ivr, "broadcastSoap", toNumber, false, labels, ivrBroadcastConfig); ActionQuery = new CfActionQuery(100, 0, 1836940001, 1092170001, new[] { CfActionState.Finished }, new[] { CfResult.La }, false, new DateTime(2014, 1, 1), new DateTime(2014, 12, 1), "12132609784", "14252163710", string.Empty); QuerySoundMeta = new CfQuery(); }
public long SendCall(CfSendCall cfSendCall) { return(CallService.SendCall(new SendCall(cfSendCall))); }
public long SendCall(CfSendCall cfSendCall) { var resource = BaseRequest <ResourceReference>(HttpMethod.Post, new SendCall(cfSendCall), new CallfireRestRoute <Call>()); return(resource.Id); }