Package org.cipango.client

Examples of org.cipango.client.SipRequest


    return _bob;
  }
 
  public SipRequest createRequest(String method, String to) throws Exception
  {
    SipRequest request = _alice.createRequest(method, to);
   
    Map<String,List<String>> methodList = createMethodList();   
    request.getSession().setHeaders(methodList)
    request.getSession().addHeaders(request);
   
    return request;
  }
View Full Code Here


    return l;
  }
 
  public void testMessage() throws Exception
  {
    SipRequest request = createRequest("MESSAGE", "sip:bob@cipango.org");
    request.send();
   
    SipResponse response = request.waitResponse();
    assertEquals(SipServletResponse.SC_OK, response.getStatus());
  }
View Full Code Here

    assertEquals(SipServletResponse.SC_OK, response.getStatus());
  }
 
  public void testCall() throws Exception
  {
    SipRequest request = createRequest("INVITE", "sip:uas@cipango.org");
    request.send();
   
    SipResponse response = request.waitResponse();
    assertEquals(SipServletResponse.SC_RINGING, response.getStatus());
    response = request.waitResponse();
    assertEquals(SipServletResponse.SC_OK, response.getStatus());
    response.createAck().send();
    Thread.sleep(100);
   
    request = request.getSession().waitRequest();
    request.createResponse(SipServletResponse.SC_OK).send();
  }
View Full Code Here

    request.createResponse(SipServletResponse.SC_OK).send();
  }
 
  public void testProxy() throws Throwable
  {
    SipRequest request = createRequest("INVITE", "sip:bob@cipango.org");
    SipSession sessionBob = getBob().createUasSession();
    sessionBob.setHeaders(createMethodList());
    request.setRequestURI(getBob().getContact().getURI());
   
    UaRunnable bob = new UasScript.RingingOkBye(sessionBob);
    new Thread(bob).start();
    UacScript.ringingOkBye(request);
    bob.assertDone();
View Full Code Here

TOP

Related Classes of org.cipango.client.SipRequest

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.