예제 #1
0
        public void Update(SipEventHandlerResult updateResult)
        {
            log.Debug($"WebGuiHubUpdater. Status: {updateResult.ChangeStatus}, Id: {updateResult.ChangedObjectId}, SipAddress: {updateResult.SipAddress}");

            if (updateResult.ChangeStatus == SipEventChangeStatus.CallStarted)
            {
                WebGuiHub.ThrottlingUpdateOngoingCalls();
                WebGuiHub.ThrottlingUpdateCodecsOnline();
            }

            if (updateResult.ChangeStatus == SipEventChangeStatus.CallClosed)
            {
                WebGuiHub.ThrottlingUpdateOngoingCalls();
                WebGuiHub.ThrottlingUpdateOldCalls();
                WebGuiHub.ThrottlingUpdateCodecsOnline();
            }

            if (updateResult.ChangeStatus == SipEventChangeStatus.CodecAdded ||
                updateResult.ChangeStatus == SipEventChangeStatus.CodecUpdated ||
                updateResult.ChangeStatus == SipEventChangeStatus.CodecRemoved)
            {
                WebGuiHub.ThrottlingUpdateCodecsOnline();
            }
        }
예제 #2
0
        public void Update(KamailioMessageHandlerResult updateResult)
        {
            log.Debug("GuiHubUpdater is updating. status={0}, id={1}", updateResult.ChangeStatus, updateResult.ChangedObjectId);

            if (updateResult.ChangeStatus == KamailioMessageChangeStatus.CallStarted)
            {
                WebGuiHub.ThrottlingUpdateOngoingCalls();
                WebGuiHub.ThrottlingUpdateCodecsOnline();
            }

            if (updateResult.ChangeStatus == KamailioMessageChangeStatus.CallClosed)
            {
                WebGuiHub.ThrottlingUpdateOngoingCalls();
                WebGuiHub.ThrottlingUpdateOldCalls();
                WebGuiHub.ThrottlingUpdateCodecsOnline();
            }

            if (updateResult.ChangeStatus == KamailioMessageChangeStatus.CodecAdded ||
                updateResult.ChangeStatus == KamailioMessageChangeStatus.CodecUpdated ||
                updateResult.ChangeStatus == KamailioMessageChangeStatus.CodecRemoved)
            {
                WebGuiHub.ThrottlingUpdateCodecsOnline();
            }
        }