Package org.zoolu.sip.provider

Examples of org.zoolu.sip.provider.SipProvider


      NameAddress from=dialog.getLocalName();
      NameAddress target=dialog.getRemoteContact();
      if (target==null) target=to;
      SipURL request_uri=target.getAddress();
      if (request_uri==null) request_uri=dialog.getRemoteName().getAddress();
      SipProvider sip_provider=dialog.getSipProvider();
      String via_addr=sip_provider.getViaAddress();
      int host_port=sip_provider.getPort();
      boolean rport=sip_provider.isRportSet();
      String proto;
      if (target.getAddress().hasTransport()) proto=target.getAddress().getTransport();
      else proto=sip_provider.getDefaultTransport();
      NameAddress contact=dialog.getLocalContact();
      if (contact==null) contact=from;
      // increment the CSeq, if method is not ACK nor CANCEL
      if (!SipMethods.isAck(method) && !SipMethods.isCancel(method)) dialog.incLocalCSeq();
      String call_id=dialog.getCallID();


        NameAddress from=dialog.getLocalName();
        NameAddress target=dialog.getRemoteContact();
        if (target==null) target=to;
        SipURL request_uri=target.getAddress();
        if (request_uri==null) request_uri=dialog.getRemoteName().getAddress();
        SipProvider sip_provider=dialog.getSipProvider();
        String via_addr=sip_provider.getViaAddress();
        int host_port=sip_provider.getPort();
        boolean rport=sip_provider.isRportSet();
        String proto;
        if (target.getAddress().hasTransport()) proto=target.getAddress().getTransport();
        else proto=sip_provider.getDefaultTransport();
        NameAddress contact=dialog.getLocalContact();
        if (contact==null) contact=from;
        // increment the CSeq, if method is not ACK nor CANCEL
        if (!SipMethods.isAck(method) && !SipMethods.isCancel(method)) dialog.incLocalCSeq();
        String call_id=dialog.getCallID();

            System.out.println("   --no-prompt        do not prompt");
            System.exit(0);
         }
                    
         SipStack.init(file);
         SipProvider sip_provider=new SipProvider(file);
         UserAgentProfile user_profile=new UserAgentProfile(file);
        
         if (opt_regist) user_profile.do_register=true;
         if (opt_unregist) user_profile.do_unregister=true;
         if (opt_unregist_all) user_profile.do_unregister_all=true;

         }
                    
         SipStack.init(file);
         if (opt_debug_level>=0) SipStack.debug_level=opt_debug_level;
         if (opt_log_path!=null) SipStack.log_path=opt_log_path;
         SipProvider sip_provider;
         if (file!=null) sip_provider=new SipProvider(file); else sip_provider=new SipProvider(opt_via_addr,opt_host_port);
         if (opt_outbound_proxy!=null) sip_provider.setOutboundProxy(new SocketAddress(opt_outbound_proxy));
         UserAgentProfile user_profile=new UserAgentProfile(file);
        
         if (opt_regist) user_profile.do_register=true;
         if (opt_unregist) user_profile.do_unregister=true;
         if (opt_unregist_all) user_profile.do_unregister_all=true;

            System.out.println("   --no-prompt        do not prompt");
            System.exit(0);
         }
                    
         SipStack.init(file);
         SipProvider sip_provider=new SipProvider(file);
         UserAgentProfile user_profile=new UserAgentProfile(file);
        
         if (opt_regist) user_profile.do_register=true;
         if (opt_expires>0) user_profile.expires=opt_expires;
         if (opt_hangup_time>0) user_profile.hangup_time=opt_hangup_time;

TOP

Related Classes of org.zoolu.sip.provider.SipProvider

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.