public HttpResponseMessage VoiceMail(TwilioVoiceRequest request, [FromUri] Guid?callerId = null, [FromUri] int contactId = 0)
        {
            try
            {
                request.AddAdditionalFields(callerId, contactId);

                MissCall(request);

                return(GetHttpResponse(request.VoiceMail()));
            }
            catch (Exception e)
            {
                Log.Error(e);
                throw;
            }
        }
Exemple #2
0
        public HttpResponseMessage VoiceMail(TwilioVoiceRequest request, [FromUri] Guid?callerId = null, [FromUri] int contactId = 0)
        {
            try
            {
                using (var scope = DIHelper.Resolve())
                {
                    var daoFactory = scope.Resolve <DaoFactory>();
                    var voipEngine = new VoipEngine(daoFactory);
                    request.AddAdditionalFields(callerId, contactId);

                    MissCall(request, voipEngine);

                    return(GetHttpResponse(request.VoiceMail()));
                }
            }
            catch (Exception e)
            {
                Log.Error(e);
                throw;
            }
        }