Example #1
0
        public void SendCall(CreateCallMessage callMessage)
        {
            var twilio  = new TwilioRestClient(TwillioConfig.AccountSid, TwillioConfig.AuthToken);
            var options = new CallOptions();

            options.Url  = TwilioIvrWriter.GetCallbackUrl(TwillioConfig.VoiceCallbackUrl, callMessage.Parameters);
            options.To   = callMessage.PhoneNumber;
            options.From = TwillioConfig.CallPhone;
            var call = twilio.InitiateOutboundCall(options);
        }
Example #2
0
        public string PostCall(CreateCallMessage call)
        {
            if (string.IsNullOrEmpty(call.Id))
            {
                call.Id = Guid.NewGuid().ToString();
            }

            Bus.Send(call);
            return(call.Id);
        }
Example #3
0
        public string Call([FromBody] CreateCallMessage createCallMessage)
        {
            Trace.WriteLine(createCallMessage);

            return(MessageChannelManager.PostCall(createCallMessage));
        }