Package org.cipango.server

Examples of org.cipango.server.Server


public class OneSipApp
{
  public static void main(String[] args) throws Exception
    {
    Server server = new Server();
   
    UdpConnector udp = new UdpConnector();
    TcpConnector tcp = new TcpConnector();
   
    int port = Integer.getInteger("cipango.port", 5060);
    udp.setPort(port);
    tcp.setPort(port);
   
    server.getConnectorManager().setConnectors(new SipConnector[] { udp, tcp });
   
    SipAppContext sipapp = new SipAppContext();
    sipapp.setContextPath("/");
    sipapp.setWar(args[0]);
   
    SipContextHandlerCollection handler = new SipContextHandlerCollection();
    handler.addHandler(sipapp);
   
    server.setApplicationRouter(new DefaultApplicationRouter());
    server.setHandler(handler);
   
    server.start();
    server.join();
    }
View Full Code Here


 
  private List<UserAgent> _userAgents = new ArrayList<UserAgent>();
 
  public SipClient(int port)
  {
    _server = new Server();
   
    UdpConnector connector = new UdpConnector();
    connector.setPort(port);
   
    _server.getConnectorManager().addConnector(connector);
View Full Code Here

        try
        {
            InitialContext ic = new InitialContext();

            Server server = new Server();

            SipAppContext context = new SipAppContext();
            context.setServer(server);
            context.getSipMetaData().setAppName("myApp");
            context.setClassLoader(new WebAppClassLoader(Thread.currentThread().getContextClassLoader(), context));
View Full Code Here

            return request;
        }
       
        public SipApplicationSession createApplicationSession()
        {
          Server server = getServer();
         
          SessionScope scope = server.getSessionManager().openScope(ID.newCallId());
          try
          {
            AppSession session = scope.getCallSession().createAppSession(SipAppContext.this, ID.newAppSessionId());
            return new ScopedAppSession(session);
          }
View Full Code Here

 
  public ClientTransaction sendRequest(SipRequest request, ClientTransactionListener listener) throws IOException
  {
    accessed();
   
    Server server = getServer();
    server.customizeRequest(request);
   
    request.setCommitted(true);
   
    return server.getTransactionManager().sendRequest(request, listener);
  }
View Full Code Here

TOP

Related Classes of org.cipango.server.Server

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.