Package net.sourceforge.peers.sip.syntaxencoding

Examples of net.sourceforge.peers.sip.syntaxencoding.SipURI


        if (password != null && password.length > 0) {
            config.setPassword(new String(password));
        }
        String outboundProxy = jTextField4.getText();
        if (outboundProxy != null) {
            SipURI sipURI;
            try {
                if ("".equals(outboundProxy.trim())) {
                    config.setOutboundProxy(null);
                } else {
                    if (!outboundProxy.startsWith(RFC3261.SIP_SCHEME)) {
                        outboundProxy = RFC3261.SIP_SCHEME
                            + RFC3261.SCHEME_SEPARATOR + outboundProxy;
                    }
                    sipURI = new SipURI(outboundProxy);
                    config.setOutboundProxy(sipURI);
                }
            } catch (SipUriSyntaxException e) {
                JOptionPane.showMessageDialog(this, e.getMessage());
                logger.error("sip uri syntax issue", e);
View Full Code Here


        Config config = new XmlConfig(TEST_CONFIG_FILE, logger);
        InetAddress localHost = InetAddress.getLocalHost();
        String userPart = "alice";
        String domain = "sourceforge.net";
        String password = "123";
        SipURI sipURI = new SipURI("sip:sourceforge.net;lr");
        int sipPort = 6060;
        MediaMode mediaMode = MediaMode.echo;
        boolean mediaDebug = true;
        int rtpPort = 8002;
        config.setLocalInetAddress(localHost);
        config.setUserPart(userPart);
        config.setDomain(domain);
        config.setPassword(password);
        config.setOutboundProxy(sipURI);
        config.setSipPort(sipPort);
        config.setMediaMode(mediaMode);
        config.setMediaDebug(mediaDebug);
        config.setRtpPort(rtpPort);
        config.save();
        config = new XmlConfig(TEST_CONFIG_FILE, logger);
        assert localHost.equals(config.getLocalInetAddress());
        assert userPart.equals(config.getUserPart());
        assert domain.equals(config.getDomain());
        assert password.equals(config.getPassword());
        assert sipURI.toString().equals(config.getOutboundProxy().toString());
        assert sipPort == config.getSipPort();
        assert mediaMode == config.getMediaMode();
        assert mediaDebug == config.isMediaDebug();
        assert rtpPort == config.getRtpPort();
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.peers.sip.syntaxencoding.SipURI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.