Package javax.servlet.sip

Examples of javax.servlet.sip.B2buaHelper


      {
        doInitialInviteResponse(response);
        return;
      }
     
      B2buaHelper b2bHelper = response.getRequest().getB2buaHelper();
      SipServletRequest peerRequest = b2bHelper.getLinkedSipServletRequest(response.getRequest());
   
      // Peer request could be null is case of 4xx/INVITE response by leg B.
      if (peerRequest != null)
      {
        peerRequest.createResponse(response.getStatus(), response.getReasonPhrase()).send();
View Full Code Here


 
 
  protected void doInitialInviteResponse(SipServletResponse response) throws ServletException, IOException
  {

    B2buaHelper b2bHelper = response.getRequest().getB2buaHelper();
    SipSession leg1 = response.getSession();
    SipSession leg2 = b2bHelper.getLinkedSession(leg1);
    int status = response.getStatus();
    if (leg2 == null)
    {
      if (status >= SipServletResponse.SC_OK
          && status < SipServletResponse.SC_MULTIPLE_CHOICES)
      {
        // Create second leg               
        SipServletRequest request = _sipFactory.createRequest(response.getApplicationSession(),
            response.getMethod(),
            response.getTo(),
            response.getFrom());
        copy(response, request);

        b2bHelper.linkSipSessions(leg1, request.getSession());

        request.setAttribute(RESP_INV, response);
        request.getSession().setHandler(getServletName());

        // if leg2 took more than 10s to pick up call, cancel it.
View Full Code Here

TOP

Related Classes of javax.servlet.sip.B2buaHelper

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.