/** * Invoked to handle incoming SIP messages: requests or responses. Exactly one of the arguments is null: if the event is a request the response argument is null, and vice versa, if the event is a response the request argument is null. * This method dispatched to doRequest() or doResponse() as appropriate. Servlets will not usually need to override this method. */ public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp) throws javax.servlet.ServletException, java.io.IOException{ if (req != null) { doRequest((SipServletRequest) req); } else { SipServletResponse response = (SipServletResponse)resp; if(response.isBranchResponse()) { doBranchResponse(response); } else { doResponse(response); } } }