/// <inheritdoc/> protected override async Task Consume(IncomingInboxIntegrationEvent message) { if (message?.CallerExtension == null) { _logger.Warning($"Требуется {nameof(message.CallerExtension)} on IncomingInboxIntegrationEvent"); return; } _logger.Debug($"Start processing an integration event {nameof(IncomingInboxIntegrationEvent)}.", new Dictionary <string, string> { { nameof(message.ContractInboxItemType), $"{message.ContractInboxItemType}" }, { nameof(message.CallerExtension), $"{message.CallerExtension}" } }); await _callManagementService.AddIncomingCall(message); if (message.ContractInboxItemType == ContractInboxItemType.Sms) { _metric.SmsAdded(); } else { _metric.CallAdded(); } }