public MessageBase(SIPAuthenticateRequestDelegate sipRequestAuthenticator, SIPTransport transport, string userAgent)
 {
     MessageCore = new Dictionary <string, MessageBase>();
     Transport   = transport;
     UserAgent   = userAgent;
     _sipRequestAuthenticator = sipRequestAuthenticator;
 }
        //private SIPNotifyManager m_notifyManager;

        public SIPAppServerCore(
            SIPTransport sipTransport,
            GetCanonicalDomainDelegate getCanonicalDomain,
            SIPAssetGetDelegate<SIPAccount> getSIPAccount,
            SIPMonitorLogDelegate proxyLog,
            SIPCallManager callManager,
            SIPDialogueManager sipDialogueManager,
            //SIPNotifyManager notifyManager,
            SIPAuthenticateRequestDelegate sipAuthenticateRequest,
            SIPEndPoint outboundProxy)
        {
            try
            {
                m_sipTransport = sipTransport;
                m_callManager = callManager;
                m_sipDialogueManager = sipDialogueManager;
                //m_notifyManager = notifyManager;

                m_sipTransport.SIPTransportRequestReceived += GotRequest;
                m_sipTransport.SIPTransportResponseReceived += GotResponse;

                m_outboundProxy = outboundProxy;

                GetCanonicalDomain_External = getCanonicalDomain;
                GetSIPAccount_External = getSIPAccount;
                SIPMonitorLogEvent_External = proxyLog;
                SIPRequestAuthenticator_External = sipAuthenticateRequest;
            }
            catch (Exception excp)
            {
                logger.Error("Exception SIPAppServerCore (ctor). " + excp.Message);
                throw excp;
            }
        }
        public SIPServerUserAgent(
            SIPTransport sipTransport,
            SIPEndPoint outboundProxy,
            string sipUsername,
            string sipDomain,
            SIPCallDirection callDirection,
            GetSIPAccountDelegate getSIPAccount,
            SIPAuthenticateRequestDelegate sipAuthenticateRequest,
            SIPMonitorLogDelegate logDelegate,
            UASInviteTransaction uasTransaction)
        {
            m_sipTransport                  = sipTransport;
            m_outboundProxy                 = outboundProxy;
            m_sipUsername                   = sipUsername;
            m_sipDomain                     = sipDomain;
            CallDirection                   = callDirection;
            GetSIPAccount_External          = getSIPAccount;
            SIPAuthenticateRequest_External = sipAuthenticateRequest;
            Log_External                    = logDelegate ?? Log_External;
            m_uasTransaction                = uasTransaction;

            m_uasTransaction.TransactionTraceMessage       += TransactionTraceMessage;
            m_uasTransaction.UASInviteTransactionTimedOut  += ClientTimedOut;
            m_uasTransaction.UASInviteTransactionCancelled += UASTransactionCancelled;
            m_uasTransaction.TransactionRemoved            += new SIPTransactionRemovedDelegate(UASTransaction_TransactionRemoved);
        }
        public SIPNonInviteServerUserAgent(
            SIPTransport sipTransport,
            SIPEndPoint outboundProxy,
            string sipUsername,
            string sipDomain,
            SIPCallDirection callDirection,
            SIPAssetGetDelegate<SIPAccount> getSIPAccount,
            SIPAuthenticateRequestDelegate sipAuthenticateRequest,
            SIPMonitorLogDelegate logDelegate,
            SIPNonInviteTransaction transaction)
        {
            m_sipTransport = sipTransport;
            m_outboundProxy = outboundProxy;
            m_sipUsername = sipUsername;
            m_sipDomain = sipDomain;
            m_sipCallDirection = callDirection;
            GetSIPAccount_External = getSIPAccount;
            SIPAuthenticateRequest_External = sipAuthenticateRequest;
            Log_External = logDelegate ?? Log_External;
            m_transaction = transaction;

            m_transaction.TransactionTraceMessage += TransactionTraceMessage;
            //m_uasTransaction.UASInviteTransactionTimedOut += ClientTimedOut;
            //m_uasTransaction.UASInviteTransactionCancelled += UASTransactionCancelled;
            //m_uasTransaction.TransactionRemoved += new SIPTransactionRemovedDelegate(UASTransaction_TransactionRemoved);
            //m_uasTransaction.TransactionStateChanged += (t) => { logger.Debug("Transaction state change to " + t.TransactionState + ", uri=" + t.TransactionRequestURI.ToString() + "."); };
        }
Esempio n. 5
0
        public void Initialize(SIPAuthenticateRequestDelegate sipRequestAuthenticator,
                               Dictionary <string, PlatformConfig> platformList,
                               SIPAccount account)
        {
            m_registrarCore = new RegistrarCore(Transport, true, true, sipRequestAuthenticator);
            m_registrarCore.Start(1);


            foreach (var item in platformList)
            {
                string      sipEndPointStr = "udp:" + item.Value.RemoteIP + ":" + item.Value.RemotePort;
                SIPEndPoint sipPoint       = SIPEndPoint.ParseSIPEndPoint(sipEndPointStr);
                for (int i = 0; i < 2; i++)
                {
                    CommandType cmdType = CommandType.Unknown;
                    if (i == 0)
                    {
                        cmdType = CommandType.Play;
                    }
                    else
                    {
                        cmdType = CommandType.Playback;
                    }
                    string             key     = item.Key + cmdType;
                    ISIPMonitorService monitor = new SIPMonitorCore_2011(this, item.Key, item.Value.ChannelName, sipPoint);
                    monitor.OnSIPServiceChanged += monitor_OnSIPServiceChanged;
                    MonitorService.Add(key, monitor);
                }
            }
        }
Esempio n. 6
0
        public SIPNonInviteServerUserAgent(
            SIPTransport sipTransport,
            SIPEndPoint outboundProxy,
            string sipUsername,
            string sipDomain,
            SIPCallDirection callDirection,
            SIPAssetGetDelegate <SIPAccount> getSIPAccount,
            SIPAuthenticateRequestDelegate sipAuthenticateRequest,
            SIPMonitorLogDelegate logDelegate,
            SIPNonInviteTransaction transaction)
        {
            m_sipTransport                  = sipTransport;
            m_outboundProxy                 = outboundProxy;
            m_sipUsername                   = sipUsername;
            m_sipDomain                     = sipDomain;
            m_sipCallDirection              = callDirection;
            GetSIPAccount_External          = getSIPAccount;
            SIPAuthenticateRequest_External = sipAuthenticateRequest;
            Log_External                    = logDelegate ?? Log_External;
            m_transaction                   = transaction;

            m_transaction.TransactionTraceMessage += TransactionTraceMessage;
            //m_uasTransaction.UASInviteTransactionTimedOut += ClientTimedOut;
            //m_uasTransaction.UASInviteTransactionCancelled += UASTransactionCancelled;
            //m_uasTransaction.TransactionRemoved += new SIPTransactionRemovedDelegate(UASTransaction_TransactionRemoved);
            //m_uasTransaction.TransactionStateChanged += (t) => { logger.Debug("Transaction state change to " + t.TransactionState + ", uri=" + t.TransactionRequestURI.ToString() + "."); };
        }
Esempio n. 7
0
 public SipMessageCore(
     SIPTransport sipTransport,
     SIPAssetGetDelegate <SIPAccount> getSIPAccount,
     GetCanonicalDomainDelegate getCanonicalDomain,
     bool mangleUACContact,
     bool strictRealmHandling,
     SIPUserAgentConfigurationManager userAgentConfigs,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator,
     string switchboarduserAgentPrefix,
     List <string> deviceList)
 {
     m_sipTransport                   = sipTransport;
     GetSIPAccount_External           = getSIPAccount;
     GetCanonicalDomain_External      = getCanonicalDomain;
     m_mangleUACContact               = mangleUACContact;
     m_strictRealmHandling            = strictRealmHandling;
     m_userAgentConfigs               = userAgentConfigs;
     SIPRequestAuthenticator_External = sipRequestAuthenticator;
     m_switchboarduserAgentPrefix     = switchboarduserAgentPrefix;
     m_userAgent  = m_userAgentConfigs.DefaultUserAgent ?? SIPConstants.SIP_USER_AGENT;
     MonitorItems = new Dictionary <string, SipMonitorCore>(500);
     foreach (string device in deviceList)
     {
         SipMonitorCore monitor = new SipMonitorCore(this, m_sipTransport, device);
         MonitorItems.Add(device, monitor);
     }
 }
Esempio n. 8
0
        //private SIPNotifyManager m_notifyManager;

        public SIPAppServerCore(
            SIPTransport sipTransport,
            GetCanonicalDomainDelegate getCanonicalDomain,
            SIPAssetGetDelegate <SIPAccount> getSIPAccount,
            SIPMonitorLogDelegate proxyLog,
            SIPCallManager callManager,
            SIPDialogueManager sipDialogueManager,
            //SIPNotifyManager notifyManager,
            SIPAuthenticateRequestDelegate sipAuthenticateRequest,
            SIPEndPoint outboundProxy)
        {
            try
            {
                m_sipTransport       = sipTransport;
                m_callManager        = callManager;
                m_sipDialogueManager = sipDialogueManager;
                //m_notifyManager = notifyManager;

                m_sipTransport.SIPTransportRequestReceived  += GotRequest;
                m_sipTransport.SIPTransportResponseReceived += GotResponse;

                m_outboundProxy = outboundProxy;

                GetCanonicalDomain_External      = getCanonicalDomain;
                GetSIPAccount_External           = getSIPAccount;
                SIPMonitorLogEvent_External      = proxyLog;
                SIPRequestAuthenticator_External = sipAuthenticateRequest;
            }
            catch (Exception excp)
            {
                logger.Error("Exception SIPAppServerCore (ctor). " + excp.Message);
                throw excp;
            }
        }
 public SIPMessageDaemon(
     List <SIPAccount> accounts,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator,
     Dictionary <string, PlatformConfig> platformList)
 {
     _accounts = accounts;
     SIPAuthenticateRequest_External = sipRequestAuthenticator;
     _platformList = platformList;
 }
 public RegistrarCore(
     SIPTransport sipTransport,
     bool mangleUACContact,
     bool strictRealmHandling,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator)
 {
     m_sipTransport                   = sipTransport;
     m_mangleUACContact               = mangleUACContact;
     m_strictRealmHandling            = strictRealmHandling;
     SIPRequestAuthenticator_External = sipRequestAuthenticator;
     m_serverAgent = SIPConstants.SIP_SERVER_STRING;
 }
Esempio n. 11
0
 public SIPRegistrarDaemon(
     GetCanonicalDomainDelegate getDomain,
     SIPAssetGetDelegate <SIPAccount> getSIPAccount,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator,
     List <string> deviceList)
 {
     GetCanonicalDomain_External     = getDomain;
     GetSIPAccount_External          = getSIPAccount;
     SIPAuthenticateRequest_External = sipRequestAuthenticator;
     _deviceList = deviceList;
     Initialize();
 }
Esempio n. 12
0
 public SIPRegistrarDaemon(
     GetCanonicalDomainDelegate getDomain,
     SIPAssetGetDelegate <SIPAccountAsset> getSIPAccount,
     SIPAssetPersistor <SIPRegistrarBinding> registrarBindingsPersistor,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator,
     SIPAssetPersistor <Customer> customerPersistor)
 {
     GetCanonicalDomain_External     = getDomain;
     GetSIPAccount_External          = getSIPAccount;
     m_registrarBindingsPersistor    = registrarBindingsPersistor;
     SIPAuthenticateRequest_External = sipRequestAuthenticator;
     CustomerPersistor_External      = customerPersistor;
 }
 public SIPRegistrarDaemon(
     GetCanonicalDomainDelegate getDomain,
     SIPAssetGetDelegate<SIPAccount> getSIPAccount,
     //SIPAssetGetFromDirectQueryDelegate<SIPAccount> getSIPAccountFromQuery,
     SIPAssetPersistor<SIPRegistrarBinding> registrarBindingsPersistor,
     SIPAuthenticateRequestDelegate sipRequestAuthenticator
     ) {
     GetCanonicalDomain_External = getDomain;
     GetSIPAccount_External = getSIPAccount;
     //GetSIPAccountFromQuery_External = getSIPAccountFromQuery;
     m_registrarBindingsPersistor = registrarBindingsPersistor;
     SIPAuthenticateRequest_External = sipRequestAuthenticator;
 }
Esempio n. 14
0
 public override void Initialize(SIPAuthenticateRequestDelegate sipRequestAuthenticator, SIPAccount account, SIPTransport transport)
 {
     PlatformType   = account.PlatformType;
     LocalSIPId     = account.LocalID;
     LocalEndPoint  = new SIPEndPoint(SIPProtocolsEnum.udp, account.LocalIP, account.LocalPort);
     RemoteSIPId    = account.RemoteID;
     RemoteEndPoint = new SIPEndPoint(SIPProtocolsEnum.udp, account.RemoteIP, account.RemotePort);
     Transport      = transport;
     if (PlatformType == Cores.PlatformType.UpPlatform)
     {
         Start();
     }
 }
Esempio n. 15
0
 public override void Initialize(SIPAuthenticateRequestDelegate sipRequestAuthenticator, SIPAccount account, SIPTransport transport)
 {
     PlatformType   = account.PlatformType;
     LocalSIPId     = account.LocalID;
     LocalEndPoint  = new SIPEndPoint(SIPProtocolsEnum.udp, account.LocalIP, account.LocalPort);
     RemoteSIPId    = account.RemoteID;
     RemoteEndPoint = new SIPEndPoint(SIPProtocolsEnum.udp, account.RemoteIP, account.RemotePort);
     Transport      = transport;
     MonitorService = new Dictionary <string, ISIPMonitorService>();
     if (PlatformType == PlatformType.DownPlatform)
     {
         m_registrarCore = new RegistrarCore(Transport, true, true, sipRequestAuthenticator);
         m_registrarCore.Start(1);
     }
 }
        public void Initialize(SIPAuthenticateRequestDelegate sipRequestAuthenticator,
                               Dictionary <string, PlatformConfig> platformList,
                               SIPAccount account)
        {
            LocalEndPoint = SIPEndPoint.ParseSIPEndPoint("udp:" + account.LocalIP.ToString() + ":" + account.LocalPort);
            LocalSIPId    = account.LocalID;
            //foreach (var account in accounts)
            //{
            //    SIPEndPoint remoteEP = SIPEndPoint.ParseSIPEndPoint("udp:" + account.SIPDomain);
            //    RemoteTrans.Add(remoteEP.ToString(), account.SIPUsername);
            //    if (LocalEndPoint == null)
            //    {
            //        LocalEndPoint = SIPEndPoint.ParseSIPEndPoint("udp:" + account.LocalIP.ToString() + ":" + account.LocalPort);
            //    }
            //    if (LocalSIPId == null)
            //    {
            //        LocalSIPId = account.LocalID;
            //    }
            //}

            m_registrarCore = new RegistrarCore(Transport, true, true, sipRequestAuthenticator);
            m_registrarCore.Start(1);
            MonitorService = new Dictionary <string, ISIPMonitorService>();

            foreach (var item in platformList)
            {
                string      sipEndPointStr = "udp:" + item.Value.RemoteIP + ":" + item.Value.RemotePort;
                SIPEndPoint sipPoint       = SIPEndPoint.ParseSIPEndPoint(sipEndPointStr);
                for (int i = 0; i < 2; i++)
                {
                    CommandType cmdType = CommandType.Unknown;
                    if (i == 0)
                    {
                        cmdType = CommandType.Play;
                    }
                    else
                    {
                        cmdType = CommandType.Playback;
                    }
                    string             key     = item.Key + cmdType;
                    ISIPMonitorService monitor = new SIPMonitorCore(this, item.Key, item.Value.ChannelName, sipPoint);
                    monitor.OnSIPServiceChanged += monitor_OnSIPServiceChanged;
                    MonitorService.Add(key, monitor);
                }
            }
        }
        public void Initialize(string switchboarduserAgentPrefix,
                               SIPAuthenticateRequestDelegate sipRequestAuthenticator,
                               GetCanonicalDomainDelegate getCanonicalDomain,
                               SIPAssetGetDelegate <SIPAccount> getSIPAccount,
                               SIPUserAgentConfigurationManager userAgentConfigs,
                               SIPRegistrarBindingsManager registrarBindingsManager,
                               Dictionary <string, string> devList)
        {
            m_registrarCore = new RegistrarCore(Transport, registrarBindingsManager, getSIPAccount, getCanonicalDomain, true, true, userAgentConfigs, sipRequestAuthenticator, switchboarduserAgentPrefix);
            m_registrarCore.Start(1);
            MonitorService = new Dictionary <string, ISIPMonitorService>();

            foreach (var item in devList)
            {
                ISIPMonitorService monitor = new SIPMonitorCore(this, item.Key, item.Value);
                monitor.OnSIPServiceChanged += monitor_OnSIPServiceChanged;
                MonitorService.Add(item.Key, monitor);
            }
        }
        public RegistrarCore(
            SIPTransport sipTransport,
            SIPRegistrarBindingsManager registrarBindingsManager,
            SIPAssetGetDelegate <SIPAccountAsset> getSIPAccount,
            GetCanonicalDomainDelegate getCanonicalDomain,
            bool mangleUACContact,
            bool strictRealmHandling,
            SIPMonitorLogDelegate proxyLogDelegate,
            SIPUserAgentConfigurationManager userAgentConfigs,
            SIPAuthenticateRequestDelegate sipRequestAuthenticator,
            string switchboarduserAgentPrefix,
            SIPAssetPersistor <Customer> customerPersistor)
        {
            m_sipTransport                   = sipTransport;
            m_registrarBindingsManager       = registrarBindingsManager;
            GetSIPAccount_External           = getSIPAccount;
            GetCanonicalDomain_External      = getCanonicalDomain;
            m_mangleUACContact               = mangleUACContact;
            m_strictRealmHandling            = strictRealmHandling;
            m_registrarLogEvent              = proxyLogDelegate;
            m_userAgentConfigs               = userAgentConfigs;
            SIPRequestAuthenticator_External = sipRequestAuthenticator;
            m_switchboarduserAgentPrefix     = switchboarduserAgentPrefix;
            CustomerPersistor_External       = customerPersistor;

            //try
            //{
            //    if (!switchboardCertificateName.IsNullOrBlank())
            //    {
            //        X509Certificate2 switchboardCertificate = AppState.LoadCertificate(StoreLocation.LocalMachine, switchboardCertificateName, false);
            //        m_switchbboardRSAProvider = (RSACryptoServiceProvider)switchboardCertificate.PrivateKey;
            //        logger.Debug("Switchboard RSA provider successfully loaded from " + switchboardCertificateName + " certificate.");
            //    }
            //}
            //catch (Exception excp)
            //{
            //    logger.Error("Exception loading switchboard certificate using " + switchboardCertificateName + ". " + excp.Message);
            //}
        }
Esempio n. 19
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);
 }
        public void Initialize(SIPAuthenticateRequestDelegate SIPAuthenticateRequest_External, List <SIPAccount> accounts)
        {
            foreach (var account in accounts)
            {
                MessageBase msg = null;
                switch (account.PlatformVersion)
                {
                case PlatformVersion.VERSION_2011:
                    msg = new SIPMessageCore_2011();
                    break;

                case PlatformVersion.VERSION_2014:
                    break;

                case PlatformVersion.VERSION_2016:
                    msg = new SIPMessageCore_2016();
                    break;
                }
                msg.Initialize(_sipRequestAuthenticator, account, Transport);
                string msgKey = account.RemoteIP + ":" + account.RemotePort;
                MessageCore.Add(msgKey, msg);
            }
        }
Esempio n. 21
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"); });
        }
Esempio n. 22
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"); });
        }
 public SIPDialogueManager(
     SIPTransport sipTransport,
     SIPEndPoint outboundProxy,
     SIPMonitorLogDelegate logDelegate,
     SIPAssetPersistor<SIPDialogueAsset> sipDialoguePersistor,
     SIPAssetPersistor<SIPCDRAsset> sipCDRPersistor,
     SIPAuthenticateRequestDelegate authenticateRequestDelegate,
     SIPAssetGetDelegate<SIPAccount> getSIPAccount,
     GetCanonicalDomainDelegate getCanonicalDomain)
 {
     m_sipTransport = sipTransport;
     m_outboundProxy = outboundProxy;
     Log_External = logDelegate;
     m_sipDialoguePersistor = sipDialoguePersistor;
     m_sipCDRPersistor = sipCDRPersistor;
     SIPAuthenticateRequest_External = authenticateRequestDelegate;
     GetSIPAccount_External = getSIPAccount;
     GetCanonicalDomain_External = getCanonicalDomain;
 }
        public RegistrarCore(
            SIPTransport sipTransport,
            SIPRegistrarBindingsManager registrarBindingsManager,
            SIPAssetGetDelegate<SIPAccount> getSIPAccount,
            GetCanonicalDomainDelegate getCanonicalDomain,
            bool mangleUACContact,
            bool strictRealmHandling,
            SIPMonitorLogDelegate proxyLogDelegate,
            SIPUserAgentConfigurationManager userAgentConfigs,
            SIPAuthenticateRequestDelegate sipRequestAuthenticator,
            string switchboardCertificateName)
        {
            m_sipTransport = sipTransport;
            m_registrarBindingsManager = registrarBindingsManager;
            GetSIPAccount_External = getSIPAccount;
            GetCanonicalDomain_External = getCanonicalDomain;
            m_mangleUACContact = mangleUACContact;
            m_strictRealmHandling = strictRealmHandling;
            m_registrarLogEvent = proxyLogDelegate;
            m_userAgentConfigs = userAgentConfigs;
            SIPRequestAuthenticator_External = sipRequestAuthenticator;

            try
            {
                if (!switchboardCertificateName.IsNullOrBlank())
                {
                    X509Certificate2 switchboardCertificate = AppState.LoadCertificate(StoreLocation.LocalMachine, switchboardCertificateName, false);
                    m_switchbboardRSAProvider = (RSACryptoServiceProvider)switchboardCertificate.PrivateKey;
                    logger.Debug("Switchboard RSA provider successfully loaded from " + switchboardCertificateName + " certificate.");
                }
            }
            catch (Exception excp)
            {
                logger.Error("Exception loading switchboard certificate using " + switchboardCertificateName + ". " + excp.Message);
            }
        }
Esempio n. 25
0
 public void Initialize(SIPAuthenticateRequestDelegate sipRequestAuthenticator, Dictionary <string, PlatformConfig> _platformList, SIPAccount account)
 {
 }
 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);
 }
 public virtual void Initialize(SIPAuthenticateRequestDelegate sipRequestAuthenticator, SIPAccount account, SIPTransport trasnport)
 {
 }