Examples of sendRequest()


Examples of org.cafesip.sipunit.PublishSession.sendRequest()

        assertTrue(s.replyToNotify(reqevent, response));
       
        assertTrue(s.isSubscriptionTerminated())
       
    publish = publishSession.newUnpublish(); // 13
    publishSession.sendRequest(publish, Response.OK); // 14
    }

    public void testMinExpires() throws Exception
    {      
        SubscribeSession session = new SubscribeSession(getAlicePhone(), "presence");
View Full Code Here

Examples of org.cafesip.sipunit.PublishSession.sendRequest()

   
    public void testEtags() throws Exception
    {      
       PublishSession publishSession = new PublishSession(getBobPhone());
         Request publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 20);
         Response response = publishSession.sendRequest(publish, SipResponse.OK);
        
         SIPETagHeader etagHeader = (SIPETagHeader) response.getHeader(SIPETagHeader.NAME);
         assertNotNull(etagHeader);
         String etag = etagHeader.getETag();
        
View Full Code Here

Examples of org.cafesip.sipunit.PublishSession.sendRequest()

         String etag = etagHeader.getETag();
        
         publish = publishSession.newPublish(getClass().getResourceAsStream("publish2.xml"), 20);
         HeaderFactory hf = publishSession.getHeaderFactory();
         publish.setHeader(hf.createSIPIfMatchHeader(etag));
         response = publishSession.sendRequest(publish, SipResponse.OK);
         etagHeader = (SIPETagHeader) response.getHeader(SIPETagHeader.NAME);
         assertNotNull(etagHeader);
        
         publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 20);
         publish.setHeader(hf.createSIPIfMatchHeader(etag)); //Use old etag
View Full Code Here

Examples of org.cafesip.sipunit.PublishSession.sendRequest()

         etagHeader = (SIPETagHeader) response.getHeader(SIPETagHeader.NAME);
         assertNotNull(etagHeader);
        
         publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 20);
         publish.setHeader(hf.createSIPIfMatchHeader(etag)); //Use old etag
         response = publishSession.sendRequest(publish, SipServletResponse.SC_CONDITIONAL_REQUEST_FAILED);
        
         publish = publishSession.newUnpublish(); // 25
      publishSession.sendRequest(publish, Response.OK); // 26
    }
View Full Code Here

Examples of org.cafesip.sipunit.PublishSession.sendRequest()

         publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 20);
         publish.setHeader(hf.createSIPIfMatchHeader(etag)); //Use old etag
         response = publishSession.sendRequest(publish, SipServletResponse.SC_CONDITIONAL_REQUEST_FAILED);
        
         publish = publishSession.newUnpublish(); // 25
      publishSession.sendRequest(publish, Response.OK); // 26
    }

}
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    RegisterSession registerSession = new RegisterSession(getAlicePhone());
    registerSession.register(null, 0);
   
    SubscribeSession session = new SubscribeSession(getAlicePhone(), "reg");
    Request subscribe = session.newInitialSubscribe(100, getAliceUri()); // 1
    session.sendRequest(subscribe, Response.OK); // 2
   
    ServerTransaction tx = session.waitForNotify();
    Request notify = tx.getRequest(); // 3
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx); // 4
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    contact = registration.getContactArray(0);
    assertEquals(0, contact.getExpires().intValue());
    assertEquals(Event.UNREGISTERED, contact.getEvent());
   
    subscribe = session.newSubsequentSubscribe(0); // 13
    session.sendRequest(subscribe, Response.OK); // 14
   
    tx = session.waitForNotify();
    notify = tx.getRequest(); // 15
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx); // 16
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    getAlicePhone().register(null, 1500);
    assertLastOperationSuccess(getAlicePhone());
   
    SubscribeSession session = new SubscribeSession(getAlicePhone(), "reg");
    Request subscribe = session.newInitialSubscribe(100, getAliceUri());
    session.sendRequest(subscribe, Response.OK);
   
    ServerTransaction tx = session.waitForNotify();
    Request notify = tx.getRequest();
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx);
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

    Contact contact = registration.getContactArray(0);
    assertEquals(0, contact.getExpires().intValue());
    assertEquals(Event.UNREGISTERED, contact.getEvent());
       
    subscribe = session.newSubsequentSubscribe(0);
    session.sendRequest(subscribe, Response.OK);
   
    tx = session.waitForNotify();
    notify = tx.getRequest();
    //System.out.println(notify);
    session.sendResponse(Response.OK, tx);
View Full Code Here

Examples of org.cafesip.sipunit.SubscribeSession.sendRequest()

 
    public void testMinExpires() throws Exception
    {      
        SubscribeSession session = new SubscribeSession(getAlicePhone(), "reg");
        Request request = session.newInitialSubscribe(1, getAliceUri());
        Response response = session.sendRequest(request,SipResponse.INTERVAL_TOO_BRIEF);
        MinExpiresHeader minExpiresHeader = (MinExpiresHeader) response.getHeader(MinExpiresHeader.NAME);
        assertNotNull(minExpiresHeader);
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.