Example #1
0
        // Token: 0x06000A90 RID: 2704 RVA: 0x000455A4 File Offset: 0x000437A4
        private void DoRpc(MwiMessage message)
        {
            int    num    = 3;
            Server server = (Server)base.ConfigObject;

            while (num-- > 0)
            {
                string text = string.Empty;
                try
                {
                    using (UMMwiDeliveryRpcClient ummwiDeliveryRpcClient = new UMMwiDeliveryRpcClient(server.Fqdn))
                    {
                        text = ummwiDeliveryRpcClient.OperationName;
                        ummwiDeliveryRpcClient.SetTimeOut(10000);
                        int assistantLatencyMsec = (int)(ExDateTime.UtcNow.Subtract(message.EventTimeUtc).TotalMilliseconds + (double)base.AverageProcessingTimeMsec);
                        ExTraceGlobals.RpcTracer.TraceDebug((long)this.GetHashCode(), "ExRpcMwiTarget: Executing {0}. Mailbox:{1} {2} {3}", new object[]
                        {
                            text,
                            message.MailboxGuid,
                            message.UserName,
                            message.TenantGuid
                        });
                        ummwiDeliveryRpcClient.SendMwiMessage(message.MailboxGuid, message.DialPlanGuid, message.UserExtension, message.UserName, message.UnreadVoicemailCount, message.TotalVoicemailCount, assistantLatencyMsec, message.TenantGuid);
                        ExTraceGlobals.RpcTracer.TraceDebug((long)this.GetHashCode(), "ExRpcMwiTarget: {0} succeeded. Mailbox:{1} {2} {3}", new object[]
                        {
                            text,
                            message.MailboxGuid,
                            message.UserName,
                            message.TenantGuid
                        });
                    }
                    break;
                }
                catch (RpcException ex)
                {
                    ExTraceGlobals.RpcTracer.TraceWarning((long)this.GetHashCode(), "ExRpcMwiTarget: {0} failed. Mailbox:{1} RetryCount:{2} Error:{3} {4}", new object[]
                    {
                        text,
                        message.MailboxGuid,
                        num,
                        ex.ErrorCode,
                        ex
                    });
                    if (num == 0 || !UMErrorCode.IsNetworkError(ex.ErrorCode))
                    {
                        throw;
                    }
                }
            }
        }
Example #2
0
        // Token: 0x06000ABD RID: 2749 RVA: 0x00046480 File Offset: 0x00044680
        private void SendMwiMessage(MailboxInfo mailbox, MailboxSession itemStore)
        {
            StoreObjectId umsearchFolderId = MwiAssistant.GetUMSearchFolderId(itemStore);

            if (umsearchFolderId == null)
            {
                ExTraceGlobals.MWITracer.TraceWarning <MailboxInfo>((long)this.GetHashCode(), "MwiAssistant.SendMwiMessage(): Skipping event. Could not get Voice Mail search folder for {0}.", mailbox);
                return;
            }
            using (SearchFolder searchFolder = SearchFolder.Bind(itemStore, umsearchFolderId, new PropertyDefinition[]
            {
                FolderSchema.ItemCount,
                FolderSchema.UnreadCount
            }))
            {
                int itemCount = searchFolder.ItemCount;
                int num       = (int)searchFolder[FolderSchema.UnreadCount];
                ExTraceGlobals.MWITracer.TraceDebug <MailboxInfo, int, int>((long)this.GetHashCode(), "MwiAssistant.SendMwiMessage(): Sending MWI for user {0}, itemCount={1}, unreadCount={2}", mailbox, itemCount, num);
                IADSystemConfigurationLookup iadsystemConfigurationLookup = ADSystemConfigurationLookupFactory.CreateFromOrganizationId(mailbox.OrganizationId);
                Guid       externalDirectoryOrganizationId = iadsystemConfigurationLookup.GetExternalDirectoryOrganizationId();
                MwiMessage message = new MwiMessage(mailbox.Guid, mailbox.DialPlanGuid, mailbox.DisplayName, mailbox.UMExtension, num, itemCount, MwiAssistant.MessageExpirationTime, mailbox.EventTimeUtc, externalDirectoryOrganizationId);
                this.loadBalancer.SendMessage(message);
            }
        }
Example #3
0
 // Token: 0x06000A8F RID: 2703 RVA: 0x00045560 File Offset: 0x00043760
 public override void SendMessageAsync(MwiMessage message)
 {
     base.SendMessageAsync(message);
     ExRpcMwiTarget.MwiRpcAsyncState mwiRpcAsyncState = new ExRpcMwiTarget.MwiRpcAsyncState(message, new ExRpcMwiTarget.DoRpcDelegate(this.DoRpc));
     mwiRpcAsyncState.RpcDelegate.BeginInvoke(message, new AsyncCallback(this.RpcCompleted), mwiRpcAsyncState);
 }
Example #4
0
 // Token: 0x06000A97 RID: 2711 RVA: 0x00045826 File Offset: 0x00043A26
 internal MwiRpcAsyncState(MwiMessage message, ExRpcMwiTarget.DoRpcDelegate rpcDelegate)
 {
     this.message     = message;
     this.rpcDelegate = rpcDelegate;
 }