Package org.cipango.client

Examples of org.cipango.client.SipClient


  private SipClient _sipClient;
 
  public void start(BundleContext context) throws Exception
  {
    _sipClient = new SipClient(5061);
    _sipClient.start();
    SipServiceImpl serviceImpl = new SipServiceImpl();
    serviceImpl.setUserAgent(_sipClient.createUserAgent("alice", InetAddress.getLocalHost().getHostName()));
    context.registerService(SipService.class.getName(), serviceImpl, null);
  }
View Full Code Here


 
  private static Map<Integer, SipClient> _clients = new HashMap<Integer, SipClient>();
 
  public static SipTester create(String user) throws Exception
  {
    SipClient client = getOrCreate(DEFAULT_PORT);
    SipTester tester = new SipTester(client.createSipURI(user, client.getContact().getHost()));
   
    client.addAgent(tester);
   
    return tester;
  }
View Full Code Here

   
  protected static SipClient getOrCreate(int port) throws Exception
  {
    synchronized (_clients)
    {
      SipClient client = _clients.get(port);
      if (client == null)
      {
        client = new SipClient(port);
        _clients.put(port, client);
        client.start();
      }
      return client;
    }
  }
View Full Code Here

TOP

Related Classes of org.cipango.client.SipClient

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.