• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SipFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Server

import javax.sip.SipFactory; //导入依赖的package包/类
public Server() {
    try {
        final Properties defaultProperties = new Properties();
        host = "127.0.0.1";

        defaultProperties.setProperty("javax.sip.STACK_NAME", "server");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "server_debug_ViaRPortTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "server_log_ViaRPortTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.TCP_POST_PARSING_THREAD_POOL_SIZE", "64");
        defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp2 = this.sipStack.createListeningPoint(host, SERVER_PORT, testProtocol);
        this.provider2 = this.sipStack.createSipProvider(lp2);
        this.provider2.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("unexpected exception ");
    }

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


示例2: getRIFactories

import javax.sip.SipFactory; //导入依赖的package包/类
static void getRIFactories(boolean autoDialog) {
    try {
        riFactory = SipFactory.getInstance();
        if (riFactory == null) {
            throw new TckInternalError("could not get SipFactory");
        }
        riFactory.resetFactory();

        // Testing against the RI.
        riFactory.setPathName(PATH_GOV_NIST);

        riAddressFactory = riFactory.createAddressFactory();

        assertTrue( "RI must be gov.nist implementation", riAddressFactory instanceof AddressFactoryImpl );

        riHeaderFactory = riFactory.createHeaderFactory();
        riMessageFactory = riFactory.createMessageFactory();
    } catch (Exception ex) {
        throw new TckInternalError("Could not get factories");
    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:22,代码来源:TestHarness.java


示例3: initFactory

import javax.sip.SipFactory; //导入依赖的package包/类
public static boolean initFactory(SipFactory sipFactory, Configuration configuration)
{
	try {
		headerFactory = sipFactory.createHeaderFactory();
		addressFactory = sipFactory.createAddressFactory();
		messageFactory = sipFactory.createMessageFactory();
		sdpFactory = SdpFactory.getInstance();
		fromPort = configuration.getWritePort();
		fromHost = configuration.getWriteInterface();
		fromUsername = configuration.getWriteUsername();
		toHost = configuration.getCollectorHost();
		toPort = "" + configuration.getCollectorPort();
		toUsername = configuration.getCollectorUsername();
		softwareVersion = configuration.getSoftwareVersion();
		return true;
	}
	catch (Exception e)
	{
		logger.error("Error initializing stack: ", e);
	}
	return false;
}
 
开发者ID:lmangani,项目名称:Reaper,代码行数:23,代码来源:SipMessage.java


示例4: SipInboundCall

import javax.sip.SipFactory; //导入依赖的package包/类
public SipInboundCall() {
	localMediaPort = -1;

	sipHandler = SipHandler.getInstance("127.0.0.1", 5060);
	sipFactory = SipFactory.getInstance();

	try {
		DatagramSocket socket = new DatagramSocket();
		localMediaPort = socket.getLocalPort();
		socket.close();
		initRTP(localMediaPort);
	} catch (Exception e1) {
		BrokerFactory.getLoggingBroker().logError(e1);
	}


	sipHandler.addRequestListener(this);
	sipHandler.addResponseListener(this);

	BrokerFactory.getLoggingBroker().logDebug("Initialized SipInbound");
	
}
 
开发者ID:davidrudder23,项目名称:OpenNotification,代码行数:23,代码来源:SipInboundCall.java


示例5: initStack

import javax.sip.SipFactory; //导入依赖的package包/类
private void initStack() throws SipException, TooManyListenersException,
		NumberFormatException, InvalidArgumentException, ParseException {
	this.sipFactory = SipFactory.getInstance();
	this.sipFactory.setPathName("gov.nist");
	this.sipStack = this.sipFactory.createSipStack(Test.properties);
	this.sipStack.start();
	this.listeningPoint = this.sipStack.createListeningPoint(properties.getProperty(
			SIP_BIND_ADDRESS, "127.0.0.1"), Integer.valueOf(properties
			.getProperty(SIP_PORT_BIND, "5060")), properties.getProperty(
			TRANSPORTS_BIND, "udp"));
	this.provider = this.sipStack.createSipProvider(this.listeningPoint);
	this.provider.addSipListener(this);
	this.headerFactory = sipFactory.createHeaderFactory();
	this.messageFactory = sipFactory.createMessageFactory();
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:16,代码来源:Test.java


示例6: Client

import javax.sip.SipFactory; //导入依赖的package包/类
public Client() {
    try {
        final Properties defaultProperties = new Properties();
        String host = "127.0.0.1";
        defaultProperties.setProperty("javax.sip.STACK_NAME", "client");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "client_debug.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "client_log.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS","false");
        defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        defaultProperties.setProperty("gov.nist.javax.sip.TLS_CLIENT_AUTH_TYPE", "DisabledAll");
        defaultProperties.setProperty("gov.nist.javax.sip.TLS_CLIENT_PROTOCOLS", "SSLv2Hello, TLSv1");
        
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, CLIENT_PORT, testProtocol);
        this.provider = this.sipStack.createSipProvider(lp);
        headerFactory = this.sipFactory.createHeaderFactory();
        messageFactory = this.sipFactory.createMessageFactory();
        addressFactory = this.sipFactory.createAddressFactory();
        this.provider.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("unexpected exception ");
    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:30,代码来源:NIOParsingTest.java


示例7: Server

import javax.sip.SipFactory; //导入依赖的package包/类
public Server() {
    try {
        final Properties defaultProperties = new Properties();
        host = "127.0.0.1";

        defaultProperties.setProperty("javax.sip.STACK_NAME", "server");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "server_debug_NoAutoDialogTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "server_log_NoAutoDialogTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS",
                "false");
        if(System.getProperty("enableNIO") != null && System.getProperty("enableNIO").equalsIgnoreCase("true")) {
        	defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        }
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, SERVER_PORT, testProtocol);
        this.provider = this.sipStack.createSipProvider(lp);;
        this.provider.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("unexpected exception ");
    }

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


示例8: Client

import javax.sip.SipFactory; //导入依赖的package包/类
public Client() {
    try {
        final Properties defaultProperties = new Properties();
        String host = "127.0.0.1";
        defaultProperties.setProperty("javax.sip.STACK_NAME", "client");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "client_debug.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "client_log.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS","false");
        if(System.getProperty("enableNIO") != null && System.getProperty("enableNIO").equalsIgnoreCase("true")) {
        	defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        }
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, CLIENT_PORT, testProtocol);
        this.provider = this.sipStack.createSipProvider(lp);
        headerFactory = this.sipFactory.createHeaderFactory();
        messageFactory = this.sipFactory.createMessageFactory();
        addressFactory = this.sipFactory.createAddressFactory();
        this.provider.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("unexpected exception ");
    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:29,代码来源:MultipleContactsTest.java


示例9: BackToBackUserAgent

import javax.sip.SipFactory; //导入依赖的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


示例10: Server

import javax.sip.SipFactory; //导入依赖的package包/类
public Server() {
    try {
        final Properties defaultProperties = new Properties();
        host = "127.0.0.1";
        defaultProperties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off");
        defaultProperties.setProperty("javax.sip.STACK_NAME", "server");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "server_debug_NoAutoDialogTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "server_log_NoAutoDialogTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS",
                "false");
        if(System.getProperty("enableNIO") != null && System.getProperty("enableNIO").equalsIgnoreCase("true")) {
        	defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        }
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, SERVER_PORT, testProtocol);
        this.provider = this.sipStack.createSipProvider(lp);
        headerFactory = this.sipFactory.createHeaderFactory();
        messageFactory = this.sipFactory.createMessageFactory();
        addressFactory = this.sipFactory.createAddressFactory();
        this.provider.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        fail("unexpected exception ");
    }

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


示例11: Client

import javax.sip.SipFactory; //导入依赖的package包/类
public Client() {
    try {
        final Properties defaultProperties = new Properties();
        host = "127.0.0.1";
        defaultProperties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off");
        defaultProperties.setProperty("javax.sip.STACK_NAME", "client");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "client_debug_NoAutoDialogTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "client_log_NoAutoDialogTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS",
                "false");
        if(System.getProperty("enableNIO") != null && System.getProperty("enableNIO").equalsIgnoreCase("true")) {
        	defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        }
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, CLIENT_PORT, testProtocol);
        this.provider = this.sipStack.createSipProvider(lp);
        headerFactory = this.sipFactory.createHeaderFactory();
        messageFactory = this.sipFactory.createMessageFactory();
        addressFactory = this.sipFactory.createAddressFactory();
        this.provider.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        fail("unexpected exception ");
    }

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


示例12: Server

import javax.sip.SipFactory; //导入依赖的package包/类
public Server() {
    try {
        final Properties defaultProperties = new Properties();
        host = "127.0.0.1";

        defaultProperties.setProperty("javax.sip.STACK_NAME", "server");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "server_debug_ViaRPortTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "server_log_ViaRPortTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS",
                "false");
        defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        defaultProperties.setProperty("gov.nist.javax.sip.NIO_MAX_SOCKET_IDLE_TIME", "" + CLOSE_DELAY / 4);
        defaultProperties.setProperty("gov.nist.javax.sip.TLS_CLIENT_AUTH_TYPE", "DisabledAll");
        defaultProperties.setProperty("gov.nist.javax.sip.TLS_CLIENT_PROTOCOLS", "SSLv2Hello, TLSv1");
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, SERVER_PORT, testProtocol);
        ListeningPoint lp2 = this.sipStack.createListeningPoint(host, SERVER_PORT2, testProtocol2);
        this.provider = this.sipStack.createSipProvider(lp);
        this.provider2 = this.sipStack.createSipProvider(lp2);
        this.provider.addSipListener(this);
        this.provider2.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("unexpected exception ");
    }

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


示例13: Server

import javax.sip.SipFactory; //导入依赖的package包/类
public Server() {
    try {
        final Properties defaultProperties = new Properties();
        host = "127.0.0.1";

        defaultProperties.setProperty("javax.sip.STACK_NAME", "server");
        defaultProperties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
        defaultProperties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "server_debug_ViaRPortTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.SERVER_LOG", "server_log_ViaRPortTest.txt");
        defaultProperties.setProperty("gov.nist.javax.sip.READ_TIMEOUT", "1000");
        defaultProperties.setProperty("gov.nist.javax.sip.CACHE_SERVER_CONNECTIONS",
                "false");
        if(System.getProperty("enableNIO") != null && System.getProperty("enableNIO").equalsIgnoreCase("true")) {
        	defaultProperties.setProperty("gov.nist.javax.sip.MESSAGE_PROCESSOR_FACTORY", NioMessageProcessorFactory.class.getName());
        }
        this.sipFactory = SipFactory.getInstance();
        this.sipFactory.setPathName("gov.nist");
        this.sipStack = this.sipFactory.createSipStack(defaultProperties);
        this.sipStack.start();
        ListeningPoint lp = this.sipStack.createListeningPoint(host, SERVER_PORT, testProtocol);
        this.provider = this.sipStack.createSipProvider(lp);;
        this.provider.addSipListener(this);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail("unexpected exception ");
    }

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


示例14: getTIFactories

import javax.sip.SipFactory; //导入依赖的package包/类
static void getTIFactories() {
    try {
        tiFactory = SipFactory.getInstance();

        // JvB: need this! but before setting path
        tiFactory.resetFactory();

        // if no TI path is specified on the command line, then assume
        // RI self-test mode

        //String tiPathName = System.getProperty( IMPLEMENTATION_PATH, PATH_RI_HELPER );
        String tiPathName = System.getProperty( IMPLEMENTATION_PATH, "gov.nist" );

        // Yes this does access implementation classes but we have to do
        // things
        // this way for self test. v1.2 only assumes one instance of
        // factories per vendor
        // per jvm.
        tiFactory.setPathName(tiPathName);

        tiAddressFactory = tiFactory.createAddressFactory();
        tiHeaderFactory = tiFactory.createHeaderFactory();
        tiMessageFactory = tiFactory.createMessageFactory();
    } catch (Exception ex) {
        ex.printStackTrace();
        System.out
                .println("Cannot get TI factories -- cannot proceed! Bailing");
        System.exit(0);
    }
    // Cannot sensibly proceed so bail out.
    if (tiAddressFactory == null || tiMessageFactory == null
            || tiHeaderFactory == null) {
        System.out
                .println("Cannot get TI factories --  cannot proceed! Bailing!!");
        System.exit(0);
    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:38,代码来源:TestHarness.java


示例15: init

import javax.sip.SipFactory; //导入依赖的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


示例16: init

import javax.sip.SipFactory; //导入依赖的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


示例17: SimpleTransport

import javax.sip.SipFactory; //导入依赖的package包/类
public SimpleTransport() {
    super();
    
    // Initialize the SipFactory
    sipFactory = SipFactory.getInstance();
    sipFactory.setPathName("gov.nist");
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:8,代码来源:SimpleTransport.java


示例18: SimpleTransport

import javax.sip.SipFactory; //导入依赖的package包/类
public SimpleTransport() {
	super();
	
	// Initialize the SipFactory
	sipFactory = SipFactory.getInstance();
	sipFactory.setPathName("gov.nist");
}
 
开发者ID:coodeer,项目名称:g3server,代码行数:8,代码来源:SimpleTransport.java


示例19: SipOutboundCall

import javax.sip.SipFactory; //导入依赖的package包/类
public SipOutboundCall(String host, int port) {
	remoteHost = host;
	remotePort = port;
	
	tts = new FreeTTS(); 

	sipHandler = SipHandler.getInstance(host, port);

	sipHandler.setRemoteHost(host);
	sipHandler.setRemotePort(port);
	localMediaPort = -1;
	try {
		DatagramSocket socket = new DatagramSocket();
		localMediaPort = socket.getLocalPort();
		socket.disconnect();
		socket.close();
		initRTP(localMediaPort);
	} catch (Exception e1) {
		BrokerFactory.getLoggingBroker().logError(e1);
	}
	
	//sipHandler.addRequestListener(this);
	//sipHandler.addResponseListener(this);
	sipHandler.addDTMFListener(this);
	addSilenceListener(this);
	
	sipFactory = SipFactory.getInstance();
	initialized = false;
}
 
开发者ID:davidrudder23,项目名称:OpenNotification,代码行数:30,代码来源:SipOutboundCall.java


示例20: init

import javax.sip.SipFactory; //导入依赖的package包/类
public void init() {
    SipFactory sipFactory = null;
    sipStack = null;
    sipFactory = SipFactory.getInstance();
    sipFactory.setPathName("gov.nist");
    Properties properties = new Properties();
    properties.setProperty("javax.sip.STACK_NAME", "shootme");
    // You need 16 for logging traces. 32 for debug + traces.
    // Your code will limp at 32 but it is best for debugging.
    properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32");
    properties.setProperty("gov.nist.javax.sip.DEBUG_LOG",
            "shootmedebug.txt");
    properties.setProperty("gov.nist.javax.sip.SERVER_LOG",
            "shootmelog.txt");
    properties.setProperty("gov.nist.javax.sip.AUTOMATIC_DIALOG_ERROR_HANDLING", "false");
    properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off");
    properties.setProperty("gov.nist.javax.sip.SIP_MESSAGE_VALVE", SipMessageValve.class.getCanonicalName());

    try {
        // Create SipStack object
        sipStack = sipFactory.createSipStack(properties);
        System.out.println("sipStack = " + sipStack);
    } catch (PeerUnavailableException e) {
        // could not find
        // gov.nist.jain.protocol.ip.sip.SipStackImpl
        // in the classpath
        e.printStackTrace();
        System.err.println(e.getMessage());
        if (e.getCause() != null)
            e.getCause().printStackTrace();
        System.exit(0);
    }

    try {
        ListeningPoint lp = sipStack.createListeningPoint("127.0.0.1",
                myPort, "udp");

        Shootme listener = this;

        sipProvider = sipStack.createSipProvider(lp);
        System.out.println("udp provider " + sipProvider);
        sipProvider.addSipListener(listener);

    } catch (Exception ex) {
        ex.printStackTrace();
    }

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IMAPMessage类代码示例发布时间:2022-05-22
下一篇:
Java LWWindowPeer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap