コード例 #1
0
 public SIPDialogEventSubscription(
     string sessionID,
     SIPURI resourceURI,
     SIPURI canonincalResourceURI,
     string filter,
     SIPDialogue subscriptionDialogue,
     int expiry,
     SIPAssetGetListDelegate <SIPDialogueAsset> getDialogues,
     SIPAssetGetByIdDelegate <SIPDialogueAsset> getDialogue
     )
     : base(sessionID, resourceURI, canonincalResourceURI, filter, subscriptionDialogue, expiry)
 {
     GetDialogues_External = getDialogues;
     GetDialogue_External  = getDialogue;
     DialogInfo            = new SIPEventDialogInfo(0, SIPEventDialogInfoStateEnum.full, resourceURI);
 }
コード例 #2
0
 public SIPDialogEventSubscription(
     SIPMonitorLogDelegate log,
     string sessionID,
     SIPURI resourceURI,
     SIPURI canonincalResourceURI,
     string filter,
     SIPDialogue subscriptionDialogue,
     int expiry,
     SIPAssetGetListDelegate<SIPDialogueAsset> getDialogues,
     SIPAssetGetByIdDelegate<SIPDialogueAsset> getDialogue
     )
     : base(log, sessionID, resourceURI, canonincalResourceURI, filter, subscriptionDialogue, expiry)
 {
     GetDialogues_External = getDialogues;
     GetDialogue_External = getDialogue;
     DialogInfo = new SIPEventDialogInfo(0, SIPEventDialogInfoStateEnum.full, resourceURI);
 }
コード例 #3
0
        private Dictionary <string, SIPEventSubscription> m_subscriptions = new Dictionary <string, SIPEventSubscription>(); // [monitor session ID, subscription].

        public NotifierSubscriptionsManager(
            SIPMonitorLogDelegate logDelegate,
            SIPAssetGetListDelegate <SIPDialogueAsset> getDialogues,
            SIPAssetGetByIdDelegate <SIPDialogueAsset> getDialogue,
            SIPAssetPersistor <SIPAccount> sipAssetPersistor,
            SIPAssetCountDelegate <SIPRegistrarBinding> getBindingsCount,
            SIPTransport sipTransport,
            SIPEndPoint outboundProxy,
            ISIPMonitorPublisher publisher)
        {
            MonitorLogEvent_External = logDelegate;
            GetDialogues_External    = getDialogues;
            GetDialogue_External     = getDialogue;
            GetSIPRegistrarBindingsCount_External = getBindingsCount;
            m_sipAssetPersistor            = sipAssetPersistor;
            m_sipTransport                 = sipTransport;
            m_outboundProxy                = outboundProxy;
            m_publisher                    = publisher;
            m_publisher.MonitorEventReady += MonitorEventAvailable;
        }
コード例 #4
0
        private Dictionary<string, SIPEventSubscription> m_subscriptions = new Dictionary<string, SIPEventSubscription>();    // [monitor session ID, subscription].

        public NotifierSubscriptionsManager(
            SIPMonitorLogDelegate logDelegate,
            SIPAssetGetListDelegate<SIPDialogueAsset> getDialogues,
            SIPAssetGetByIdDelegate<SIPDialogueAsset> getDialogue,
            SIPAssetPersistor<SIPAccount> sipAssetPersistor,
            SIPAssetCountDelegate<SIPRegistrarBinding> getBindingsCount,
            SIPTransport sipTransport,
            SIPEndPoint outboundProxy,
            ISIPMonitorPublisher publisher)
        {
            MonitorLogEvent_External = logDelegate;
            GetDialogues_External = getDialogues;
            GetDialogue_External = getDialogue;
            GetSIPRegistrarBindingsCount_External = getBindingsCount;
            m_sipAssetPersistor = sipAssetPersistor;
            m_sipTransport = sipTransport;
            m_outboundProxy = outboundProxy;
            m_publisher = publisher;
            m_publisher.MonitorEventReady += MonitorEventAvailable;
        }
コード例 #5
0
ファイル: SIPNotifierDaemon.cs プロジェクト: xycui/sipsorcery
 public SIPNotifierDaemon(
     SIPAssetGetDelegate <Customer> getCustomer,
     SIPAssetGetListDelegate <SIPDialogueAsset> getDialogues,
     SIPAssetGetByIdDelegate <SIPDialogueAsset> getDialogue,
     GetCanonicalDomainDelegate getDomain,
     SIPAssetPersistor <SIPAccount> sipAsssetPersistor,
     SIPAssetGetListDelegate <SIPRegistrarBinding> getSIPRegistrarBindings,
     SIPAssetGetListDelegate <SIPAccount> getSIPAccounts,
     SIPAssetCountDelegate <SIPRegistrarBinding> getBindingsCount,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator,
     ISIPMonitorPublisher publisher)
 {
     GetCustomer_External             = getCustomer;
     GetDialogues_External            = getDialogues;
     GetDialogue_External             = getDialogue;
     GetCanonicalDomain_External      = getDomain;
     m_sipAssetPersistor              = sipAsssetPersistor;
     GetSIPRegistrarBindings_External = getSIPRegistrarBindings;
     GetBindingsCount_External        = getBindingsCount;
     SIPAuthenticateRequest_External  = sipRequestAuthenticator;
     m_publisher = publisher ?? new SIPMonitorUDPSink(m_udpNotificationReceiverSocket);
 }
コード例 #6
0
 public SIPNotifierDaemon(
     SIPAssetGetDelegate<Customer> getCustomer,
     SIPAssetGetListDelegate<SIPDialogueAsset> getDialogues,
     SIPAssetGetByIdDelegate<SIPDialogueAsset> getDialogue,
     GetCanonicalDomainDelegate getDomain,
     SIPAssetPersistor<SIPAccount> sipAsssetPersistor,
     SIPAssetGetListDelegate<SIPRegistrarBinding> getSIPRegistrarBindings,
     SIPAssetGetListDelegate<SIPAccount> getSIPAccounts,
     SIPAssetCountDelegate<SIPRegistrarBinding> getBindingsCount,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator,
     ISIPMonitorPublisher publisher)
 {
     GetCustomer_External = getCustomer;
     GetDialogues_External = getDialogues;
     GetDialogue_External = getDialogue;
     GetCanonicalDomain_External = getDomain;
     m_sipAssetPersistor = sipAsssetPersistor;
     GetSIPRegistrarBindings_External = getSIPRegistrarBindings;
     GetBindingsCount_External = getBindingsCount;
     SIPAuthenticateRequest_External = sipRequestAuthenticator;
     m_publisher = publisher ?? new SIPMonitorUDPSink(m_udpNotificationReceiverSocket);
 }
コード例 #7
0
ファイル: SIPNotifierCore.cs プロジェクト: xycui/sipsorcery
        public NotifierCore(
            SIPMonitorLogDelegate logDelegate,
            SIPTransport sipTransport,
            SIPAssetGetDelegate <Customer> getCustomer,
            SIPAssetGetListDelegate <SIPDialogueAsset> getDialogues,
            SIPAssetGetByIdDelegate <SIPDialogueAsset> getDialogue,
            GetCanonicalDomainDelegate getCanonicalDomain,
            SIPAssetPersistor <SIPAccount> sipAssetPersistor,
            SIPAssetCountDelegate <SIPRegistrarBinding> getBindingsCount,
            SIPAuthenticateRequestDelegate sipRequestAuthenticator,
            SIPEndPoint outboundProxy,
            ISIPMonitorPublisher publisher)
        {
            MonitorLogEvent_External         = logDelegate;
            m_sipTransport                   = sipTransport;
            GetCustomer_External             = getCustomer;
            m_sipAssetPersistor              = sipAssetPersistor;
            GetCanonicalDomain_External      = getCanonicalDomain;
            SIPRequestAuthenticator_External = sipRequestAuthenticator;
            m_outboundProxy                  = outboundProxy;
            m_subscriptionsManager           = new NotifierSubscriptionsManager(MonitorLogEvent_External, getDialogues, getDialogue, m_sipAssetPersistor, getBindingsCount, m_sipTransport, m_outboundProxy, publisher);

            ThreadPool.QueueUserWorkItem(delegate { ProcessSubscribeRequest(NOTIFIER_THREAD_NAME_PREFIX + "1"); });
        }
コード例 #8
0
 public SIPRegistrationAgentCore(
     SIPMonitorLogDelegate logDelegate,
     SIPTransport sipTransport,
     SIPEndPoint outboundProxy,
     SIPAssetGetByIdDelegate<SIPProvider> getSIPProviderById,
     SIPAssetUpdateDelegate<SIPProvider> updateSIPProvider,
     SIPAssetUpdatePropertyDelegate<SIPProvider> updateSIPProviderProperty,
     SIPAssetPersistor<SIPProviderBinding> bindingPersistor,
     bool disAllowPrivateIPRegistrars)
 {
     StatefulProxyLogEvent_External = logDelegate;
     GetSIPProviderById_External = getSIPProviderById;
     UpdateSIPProvider_External = updateSIPProvider;
     UpdateSIPProviderProperty_External = updateSIPProviderProperty;
     m_bindingPersistor = bindingPersistor;
     m_sipTransport = sipTransport;
     m_outboundProxy = outboundProxy;
     m_disallowPrivateIPRegistrars = disAllowPrivateIPRegistrars;
 }
コード例 #9
0
        public NotifierCore(
            SIPMonitorLogDelegate logDelegate,
            SIPTransport sipTransport,
            SIPAssetGetDelegate<Customer> getCustomer,
            SIPAssetGetListDelegate<SIPDialogueAsset> getDialogues,
            SIPAssetGetByIdDelegate<SIPDialogueAsset> getDialogue,
            GetCanonicalDomainDelegate getCanonicalDomain,
            SIPAssetPersistor<SIPAccount> sipAssetPersistor,
            SIPAssetCountDelegate<SIPRegistrarBinding> getBindingsCount,
            SIPAuthenticateRequestDelegate sipRequestAuthenticator,
            SIPEndPoint outboundProxy,
            ISIPMonitorPublisher publisher)
        {
            MonitorLogEvent_External = logDelegate;
            m_sipTransport = sipTransport;
            GetCustomer_External = getCustomer;
            m_sipAssetPersistor = sipAssetPersistor;
            GetCanonicalDomain_External = getCanonicalDomain;
            SIPRequestAuthenticator_External = sipRequestAuthenticator;
            m_outboundProxy = outboundProxy;
            m_subscriptionsManager = new NotifierSubscriptionsManager(MonitorLogEvent_External, getDialogues, getDialogue, m_sipAssetPersistor, getBindingsCount, m_sipTransport, m_outboundProxy, publisher);

            ThreadPool.QueueUserWorkItem(delegate { ProcessSubscribeRequest(NOTIFIER_THREAD_NAME_PREFIX + "1"); });
        }