示例#1
0
  public SipServletRequest createInitialRequest(String method, Address local, Address remote) {
    if (_session != null) throw new IllegalStateException("Session already created");

    SipApplicationSession appSession = getFactory().createApplicationSession();
    SipServletRequest request = getFactory().createRequest(appSession, method, local, remote);
    if (_outboundProxy != null) request.pushRoute(_outboundProxy);
    return request;
  }
示例#2
0
  public SipServletRequest createRequest(String method) {
    if (_session == null) throw new IllegalStateException("Session not created");

    SipServletRequest request = _session.createRequest(method);
    if (_session.getState() == State.INITIAL && _outboundProxy != null)
      request.pushRoute(_outboundProxy);

    return request;
  }