public static async Task ProcessEvent(IncomingCallEvent ev, UrlHelper url, HttpContextBase context) { Trace.WriteLine("IncomingCallEvent", "Events"); var call = new Call { Id = ev.CallId }; var callbackUrl = string.Format("http://{0}{1}", Common.Domain, url.Action("Bridged", "Events")); if (ev.From == Common.SipUri) { await call.AnswerOnIncoming(); await Call.Create(ev.To, Common.Caller, callbackUrl, ev.CallId); return; } if (ev.To == Common.PhoneNumberForIncomingCalls) { await call.AnswerOnIncoming(); await Call.Create(Common.SipUri, Common.Caller, callbackUrl, ev.CallId); } }