Пример #1
0
        protected void InternalReportCallStatus(CallStatus status, string details)
        {
            if (details?.Length > 64)
            {
                throw new BuilderException("Cannot specify more than 64 characters for details");
            }

            _instructions.Add(new SvamletInstructionModel
            {
                Name    = "ReportCallStatus",
                Value   = status.ToString().ToLowerInvariant(),
                Details = details
            });
        }
Пример #2
0
        private async Task LogCallAsync(IncomingCall call, CallStatus status, bool isLoadTest = false)
        {
            var callLogMessage = new CallLog(call.CallSid)
            {
                callerNumber = call.From,
                calledNumber = call.To,
                statusId     = (int)status,
                statusName   = status.ToString(),
                routeKey     = string.Empty
            };

            if (isLoadTest)
            {
                callLogMessage.ttl = 300;
            }

            await _callLoggingService.CreateCallLogAsync(callLogMessage);
        }
Пример #3
0
        public static MvcHtmlString Status(this HtmlHelper html, CallStatus status)
        {
            string color;

            switch (status)
            {
            case CallStatus.Completed:
                color = "green";
                break;

            case CallStatus.Returned:
                color = "red";
                break;

            case CallStatus.Checked:
                color = "greenDark";
                break;

            default:
                color = "darken";
                break;
            }
            return(new MvcHtmlString(string.Format("<span class=\"fg-color-{0}\">{1}</span>", color, CustomTranslation.CallStatus.ResourceManager.GetString(status.ToString()))));
        }
Пример #4
0
 public ClientCallException(CallStatus status) : base(StringConsts.GLUE_CLIENT_CALL_ERROR + status.ToString())
 {
     m_Status = status;
 }
Пример #5
0
 public ClientCallException(CallStatus status)
     : base(StringConsts.GLUE_CLIENT_CALL_ERROR + status.ToString())
 {
     m_Status = status;
 }