当前位置: 首页>>代码示例>>C#>>正文


C# SIPMonitorLogDelegate类代码示例

本文整理汇总了C#中SIPMonitorLogDelegate的典型用法代码示例。如果您正苦于以下问题:C# SIPMonitorLogDelegate类的具体用法?C# SIPMonitorLogDelegate怎么用?C# SIPMonitorLogDelegate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SIPMonitorLogDelegate类属于命名空间,在下文中一共展示了SIPMonitorLogDelegate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SIPAppServerCore

        //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;
            }
        }
开发者ID:akalafrancis,项目名称:sipsorcery-mono,代码行数:36,代码来源:SIPAppServerCore.cs

示例2: SIPNonInviteServerUserAgent

        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() + "."); };
        }
开发者ID:sipsorcery,项目名称:sipsorcery,代码行数:27,代码来源:SIPNonInviteServerUserAgent.cs

示例3: ScriptLoader

        public ScriptLoader(
            SIPMonitorLogDelegate monitorLogger,
            string scriptPath)
        {
            try
            {
                m_monitorLogger = monitorLogger ?? m_monitorLogger;
                m_scriptPath = scriptPath;

                // File system watcher needs a fully qualified path.
                if (!m_scriptPath.Contains(Path.DirectorySeparatorChar.ToString()))
                {
                    m_scriptPath = Environment.CurrentDirectory + Path.DirectorySeparatorChar + m_scriptPath;
                }

                if (!File.Exists(m_scriptPath))
                {
                    throw new ApplicationException("Cannot load script file was not found at " + m_scriptPath + ".");
                }

                FileSystemWatcher runtimeWatcher = new FileSystemWatcher(Path.GetDirectoryName(m_scriptPath), Path.GetFileName(m_scriptPath));
                runtimeWatcher.Changed += new FileSystemEventHandler(ScriptChanged);
                runtimeWatcher.EnableRaisingEvents = true;
            }
            catch (Exception excp)
            {
                logger.Error("Exception ScriptLoader (ctor). " + excp.Message);
                throw excp;
            }
        }
开发者ID:sipsorcery,项目名称:sipsorcery,代码行数:30,代码来源:ScriptLoader.cs

示例4: SIPReferServerUserAgent

        public SIPReferServerUserAgent(SIPTransport sipTransport, SIPMonitorLogDelegate logDelegate, SIPNonInviteTransaction sipTransaction)
        {
            m_sipTransport = sipTransport;
            Log_External = logDelegate;
            m_sipTransaction = sipTransaction;

            m_sipTransaction.TransactionTraceMessage += TransactionTraceMessage;
            m_sipTransaction.NonInviteTransactionTimedOut += ClientTimedOut;

            // If external logging is not required assign an empty handler to stop null reference exceptions.
            if (Log_External == null)
            {
                Log_External = (e) => { };
            }

            var referTo = SIPURI.ParseSIPURI(m_sipTransaction.TransactionRequest.Header.ReferTo);
            var replacesParameter = SIPReplacesParameter.Parse(referTo.Headers.Get("Replaces"));

            ReplacedCall = new ReplacesCallDescriptor();
            ReplacedCall.CallId = replacesParameter.CallID;
            ReplacedCall.FromTag = replacesParameter.FromTag;
            ReplacedCall.ToTag = replacesParameter.ToTag;

            ReferToUri = referTo.CopyOf();
            ReferToUri.Headers.RemoveAll();
        }
开发者ID:TilmannBach,项目名称:sipsorcery-fork,代码行数:26,代码来源:SIPReferServerUserAgent.cs

示例5: RTCCCore

 public RTCCCore(
     SIPMonitorLogDelegate logDelegate,
     SIPDialogueManager sipDialogueManager,
     SIPAssetPersistor<SIPDialogueAsset> sipDialoguePersistor)
 {
     Log_External = logDelegate;
     m_sipDialogueManager = sipDialogueManager;
     m_sipDialoguePersistor = sipDialoguePersistor;
 }
开发者ID:TilmannBach,项目名称:sipsorcery-fork,代码行数:9,代码来源:RTCCCore.cs

示例6: GoogleVoiceSMS

 public GoogleVoiceSMS(
     SIPMonitorLogDelegate logDelegate,
     string username,
     string adminMemberId)
 {
     Log_External = logDelegate;
     m_username = username;
     m_adminMemberId = adminMemberId;
 }
开发者ID:Dawn2Yuan,项目名称:sipsorcery,代码行数:9,代码来源:GoogleVoiceSMS.cs

示例7: SIPProxyScriptFacade

 public SIPProxyScriptFacade(
     SIPMonitorLogDelegate proxyLogger,
     SIPTransport sipTransport,
     SIPProxyDispatcher dispatcher,
     GetAppServerDelegate getAppServer)
 {
     m_proxyLogger = proxyLogger;
     m_sipTransport = sipTransport;
     m_dispatcher = dispatcher;
     GetAppServer_External = getAppServer;
 }
开发者ID:sipsorcery,项目名称:sipsorcery,代码行数:11,代码来源:SIPProxyScriptFacade.cs

示例8: GoogleVoiceUserAgent

 public GoogleVoiceUserAgent(
     SIPTransport sipTransport,
     ISIPCallManager callManager,
     SIPMonitorLogDelegate logDelegate,
     string username,
     string adminMemberId,
     SIPEndPoint outboundProxy)
 {
     Owner = username;
     AdminMemberId = adminMemberId;
     m_googleVoiceCall = new GoogleVoiceCall(sipTransport, callManager, logDelegate, username, adminMemberId, outboundProxy);
     m_googleVoiceCall.CallProgress += new CallProgressDelegate(CallProgress);
 }
开发者ID:akalafrancis,项目名称:sipsorcery-mono,代码行数:13,代码来源:GoogleVoiceUserAgent.cs

示例9: DialPlanExecutingScript

        public Action Cleanup;  // A function delegate that will be called when the script is completed to allow any cleanup actions to take place.

        public DialPlanExecutingScript(SIPMonitorLogDelegate logDelegate)
        {
            ScriptNumber = ++ScriptCounter % Int32.MaxValue;
            Id = Guid.NewGuid();

            var setup = ScriptRuntimeSetup.ReadConfiguration();
            var scriptRuntime = Ruby.CreateRuntime(setup);
            DialPlanScriptEngine = Ruby.GetEngine(scriptRuntime);

            //DialPlanScriptEngine = Ruby.CreateEngine();

            DialPlanScriptScope = DialPlanScriptEngine.CreateScope();

            LogDelegate = logDelegate;
        }
开发者ID:akalafrancis,项目名称:sipsorcery-mono,代码行数:17,代码来源:DialPlanExecutingScript.cs

示例10: JingleUserAgent

          public JingleUserAgent(
            string owner,
            string adminMemberId,
            SIPMonitorLogDelegate logDelegate)
        {
            Owner = owner;
            AdminMemberId = adminMemberId;
            Log_External = logDelegate;

            // If external logging is not required assign an empty handler to stop null reference exceptions.
            if (Log_External == null)
            {
                Log_External = (e) => { };
            }
        }
开发者ID:akalafrancis,项目名称:sipsorcery-mono,代码行数:15,代码来源:JingleUserAgent.cs

示例11: DialPlanScriptContext

 public DialPlanScriptContext(           
     SIPMonitorLogDelegate monitorLogDelegate,
     SIPTransport sipTransport,
     DialogueBridgeCreatedDelegate createBridge,
     SIPEndPoint outboundProxy,
     ISIPServerUserAgent sipServerUserAgent,
     SIPDialPlan dialPlan,
     List<SIPProvider> sipProviders,
     string traceDirectory,
     string callersNetworkId,
     Guid customerId)
     : base(monitorLogDelegate, sipTransport, createBridge, outboundProxy, sipServerUserAgent, dialPlan, sipProviders, traceDirectory, callersNetworkId, customerId)
 {
     ContextType = DialPlanContextsEnum.Script;
 }
开发者ID:akalafrancis,项目名称:sipsorcery-mono,代码行数:15,代码来源:DialPlanScriptContext.cs

示例12: SIPNonInviteClientUserAgent

        public SIPNonInviteClientUserAgent(
            SIPTransport sipTransport,
            SIPEndPoint outboundProxy,
            SIPCallDescriptor callDescriptor,
            string owner,
            string adminMemberID,
            SIPMonitorLogDelegate logDelegate)
        {
            m_sipTransport = sipTransport;
            m_outboundProxy = outboundProxy;
            m_callDescriptor = callDescriptor;
            m_owner = owner;
            m_adminMemberID = adminMemberID;

            Log_External = logDelegate;
        }
开发者ID:TilmannBach,项目名称:sipsorcery-fork,代码行数:16,代码来源:SIPNonInviteClientUserAgent.cs

示例13: SIPDialogEventSubscription

 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);
 }
开发者ID:akalafrancis,项目名称:sipsorcery-mono,代码行数:17,代码来源:SIPDialogEventSubscription.cs

示例14: DialPlanLineContext

 public DialPlanLineContext(
     SIPMonitorLogDelegate monitorLogDelegate,
     SIPTransport sipTransport,
     DialogueBridgeCreatedDelegate createBridge,
     SIPEndPoint outboundProxy,
     ISIPServerUserAgent sipServerUserAgent,
     SIPDialPlan dialPlan,
     List<SIPProvider> sipProviders,
     string traceDirectory,
     string callersNetworkId,
     Customer customer)
     : base(monitorLogDelegate, sipTransport, createBridge, outboundProxy, sipServerUserAgent, dialPlan, sipProviders, traceDirectory, callersNetworkId, customer, null, null)
 {
     ContextType = DialPlanContextsEnum.Line;
      string[] dialPlanEntries = dialPlan.DialPlanScript.Split(new char[] { '\n' });
      ParseDialPlan(dialPlanEntries);
 }
开发者ID:sipsorcery,项目名称:sipsorcery,代码行数:17,代码来源:DialPlanLineContext.cs

示例15: CallbackApp

 public CallbackApp(
     SIPTransport sipTransport, 
     ISIPCallManager callManager,
     DialStringParser dialStringParser, 
     SIPMonitorLogDelegate logDelegate, 
     string username,
     string adminMemberId,
     SIPEndPoint outboundProxy)
 {
     m_sipTransport = sipTransport;
     m_callManager = callManager;
     m_dialStringParser = dialStringParser;
     Log_External = logDelegate;
     m_username = username;
     m_adminMemberId = adminMemberId;
     m_outboundProxy = outboundProxy;
 }
开发者ID:TilmannBach,项目名称:sipsorcery-fork,代码行数:17,代码来源:CallbackApp.cs


注:本文中的SIPMonitorLogDelegate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。