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


Java SipStack类代码示例

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


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

示例1: stopSipStack

import javax.sip.SipStack; //导入依赖的package包/类
public static void stopSipStack(SipStack sipStack, SipListener listener) {
    Iterator<SipProvider> sipProviderIterator = sipStack.getSipProviders();
    try{
        while (sipProviderIterator.hasNext()) {
            SipProvider sipProvider = sipProviderIterator.next();
            ListeningPoint[] listeningPoints = sipProvider.getListeningPoints();
            for (ListeningPoint listeningPoint : listeningPoints) {
                sipProvider.removeListeningPoint(listeningPoint);
                sipStack.deleteListeningPoint(listeningPoint);
                listeningPoints = sipProvider.getListeningPoints();
            }
            sipProvider.removeSipListener(listener);
            sipStack.deleteSipProvider(sipProvider);
            sipProviderIterator = sipStack.getSipProviders();
        }
    } catch (Exception e) {
        throw new IllegalStateException("Cant remove the listening points or sip providers", e);
    }

    sipStack.stop();
    sipStack = null;
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:23,代码来源:NoToTagOn1xxDialogLeakTest.java

示例2: setSipStack

import javax.sip.SipStack; //导入依赖的package包/类
public void setSipStack(SipStack sipStack) {
	if(sipStack instanceof SIPTransactionStack) {
		this.sipStack = (SIPTransactionStack)sipStack;
        this.stackLogger = this.sipStack.getStackLogger();
	}
	else
		throw new IllegalArgumentException("sipStack must be a SIPTransactionStack");
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:9,代码来源:ServerLog.java

示例3: init

import javax.sip.SipStack; //导入依赖的package包/类
public void init(SipStack stack) {
	callAnalyzer = new CallAnalyzer(((SipStackImpl) stack));
	Properties props = ((SipStackImpl) stack).getConfigurationProperties();
	Long checkingInterval = Long.parseLong(
			props.getProperty(CallAnalysisInterceptor.class.getName() + ".checkingInterval", "1000"));
	Long minStuckTime = Long.parseLong(
			props.getProperty(CallAnalysisInterceptor.class.getName() + ".minStuckTIme", "4000"));
	Long minTimeBetweenDumps = Long.parseLong(
			props.getProperty(CallAnalysisInterceptor.class.getName() + ".minTimeBetweenDumps", "2000"));
	MetricAnalysisConfiguration config = new MetricAnalysisConfiguration(
			checkingInterval, minTimeBetweenDumps, minStuckTime);
	callAnalyzer.configure(interceptorCheckpoint, config);
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:14,代码来源:CallAnalysisInterceptor.java

示例4: init

import javax.sip.SipStack; //导入依赖的package包/类
public void init(SipStack stack) {
	sipStack = (SipStackImpl) stack;
	logger.logInfo("Initializing congestion control valve");
	String serverTransactionsString = sipStack.getConfigurationProperties().getProperty("gov.nist.javax.sip.MAX_SERVER_TRANSACTIONS", "10000");
	serverTransactionTableHighwaterMark = new Integer(serverTransactionsString);
	String dropResponseStatusString = sipStack.getConfigurationProperties().getProperty("DROP_RESPONSE_STATUS", "503");
	dropResponseStatus = new Integer(dropResponseStatusString);
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:9,代码来源:CongestionControlMessageValve.java

示例5: BackToBackUserAgent

import javax.sip.SipStack; //导入依赖的package包/类
public BackToBackUserAgent(int port1, int port2) {
    SipFactory sipFactory = null;
    sipFactory = SipFactory.getInstance();
    sipFactory.setPathName("gov.nist");
    Properties properties = new Properties();
    this.protocolObjects = new ProtocolObjects("backtobackua","gov.nist","udp",true,true, false);

 
    try {
        headerFactory = protocolObjects.headerFactory;
        addressFactory = protocolObjects.addressFactory;
        messageFactory = protocolObjects.messageFactory;
        SipStack sipStack = protocolObjects.sipStack;
        ListeningPoint lp1 = sipStack.createListeningPoint("127.0.0.1", port1, "udp");
        ListeningPoint lp2 = sipStack.createListeningPoint("127.0.0.1", port2, "udp");
        SipProvider sp1 = sipStack.createSipProvider(lp1);
        SipProvider sp2 = sipStack.createSipProvider(lp2);
        this.listeningPoints[0] = lp1;
        this.listeningPoints[1] = lp2;
        this.providers[0] = sp1;
        this.providers[1] = sp2;
        sp1.addSipListener(this);
        sp2.addSipListener(this);
    } catch (Exception ex) {
        
    }

}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:29,代码来源:BackToBackUserAgent.java

示例6: init

import javax.sip.SipStack; //导入依赖的package包/类
public synchronized boolean init()
{
	if (initialized == true)
		return true;
	initialized = true;
	logger.info("Starting the collector stack...");
	try {
		SipStack sipStack;
		Configuration configuration;
		configuration = new Configuration();
		configuration.setStackName(STACK_NAME);
		SipFactory.getInstance().setPathName("gov.nist");
		sipStack = SipFactory.getInstance().createSipStack(configuration);
		RequestMessage.initFactory(SipFactory.getInstance(), configuration);
		ListeningPoint reaperUdp = sipStack.createListeningPoint(configuration.getWriteInterface(), configuration.getWritePort(), "udp");
		collectorProvider = sipStack.createSipProvider(reaperUdp);
		collectorProvider.addSipListener(new CollectorListener());
		collectorProvider.setAutomaticDialogSupportEnabled(false);
		logger.info("Collector SIP stack initialized successfully");
	}
	catch (Exception e)
	{
		logger.error("Error initializing stack: ", e);
		return false;
	}
	return true;
}
 
开发者ID:lmangani,项目名称:Reaper,代码行数:28,代码来源:CollectorStack.java

示例7: init

import javax.sip.SipStack; //导入依赖的package包/类
public synchronized boolean init()
{
	if (initialized == true)
		return true;
	initialized = true;
	logger.info("Starting the reaper stack...");
	try {
		SipStack sipStack;
		Configuration configuration;
		configuration = new Configuration();
		configuration.setStackName(STACK_NAME);
		SipFactory.getInstance().setPathName("gov.nist");
		sipStack = SipFactory.getInstance().createSipStack(configuration);
		RequestMessage.initFactory(SipFactory.getInstance(), configuration);
		ListeningPoint reaperTcp = sipStack.createListeningPoint("127.0.0.1", configuration.getReadPort(), "tcp");
		reaperProvider = sipStack.createSipProvider(reaperTcp);
		reaperProvider.addSipListener(new ReaperListener());
		reaperProvider.setAutomaticDialogSupportEnabled(false);
		logger.info("Reaper SIP stack initialized successfully");
	}
	catch (Exception e)
	{
		logger.error("Error initializing stack: ", e);
		return false;
	}
	return true;
}
 
开发者ID:lmangani,项目名称:Reaper,代码行数:28,代码来源:ReaperStack.java

示例8: SipCommRouter

import javax.sip.SipStack; //导入依赖的package包/类
public SipCommRouter(SipStack sipStack, String outboundProxy) {
    outboundProxy = SIPConfig.getOutboundProxy();
    this.myStack = sipStack;
    if (outboundProxy != null && outboundProxy.length() > 0) {
        this.outboundProxy = new SipCommHop(outboundProxy);
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:8,代码来源:SipCommRouter.java

示例9: getSipStack

import javax.sip.SipStack; //导入依赖的package包/类
public SipStack getSipStack() {
    return (SipStack) this.sipStack;
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:4,代码来源:SipProviderImpl.java

示例10: init

import javax.sip.SipStack; //导入依赖的package包/类
public void init(SipStack stack) {
	SipStackImpl s = (SipStackImpl) stack;
	s.getConfigurationProperties();
	System.out.println("SIP Message Valve initialized");
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:6,代码来源:SipMessageValve.java

示例11: init

import javax.sip.SipStack; //导入依赖的package包/类
public void init(SipStack stack) {
	SipStackImpl impl = (SipStackImpl) stack;
	impl.getConfigurationProperties().getProperty("keee");
	impl.getActiveClientTransactionCount();
	inited = true;
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:7,代码来源:SIPMessageValveImpl.java

示例12: getSipStack

import javax.sip.SipStack; //导入依赖的package包/类
public SipStack getSipStack() {
    return sipStack;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SipConfiguration.java

示例13: setSipStack

import javax.sip.SipStack; //导入依赖的package包/类
/**
 * To use a custom SipStack
 */
public void setSipStack(SipStack sipStack) {
    this.sipStack = sipStack;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:SipConfiguration.java

示例14: setSipStack

import javax.sip.SipStack; //导入依赖的package包/类
public void setSipStack(SipStack sipStack) {
    this.sipStack = sipStack;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SipPresenceAgent.java

示例15: SipHandler

import javax.sip.SipStack; //导入依赖的package包/类
public SipHandler(SipStack sipStack, String defaultRoute) {
}
 
开发者ID:davidrudder23,项目名称:OpenNotification,代码行数:3,代码来源:SipHandler.java


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