public Object extract(Object input) { return ((SipServletRequest) input).getMethod(); } }
public Object extract(Object input) { return ((SipServletRequest) input).getMethod(); } }
public Object extract(Object input) { return ((SipServletRequest) input).getMethod(); } }
public Object extract(Object input) { return ((SipServletRequest) input).getMethod(); } }
/** * Check if a client is authenticated. If so, return true. Otherwise request authentication and return false; * @param request * @param storage * @param organizationSid * @return * @throws IOException */ public static boolean checkAuthentication(SipServletRequest request, DaoManager storage, Sid organizationSid) throws IOException { // Make sure we force clients to authenticate. final String authorization = request.getHeader("Proxy-Authorization"); final String method = request.getMethod(); if (authorization == null || !CallControlHelper.permitted(authorization, method, storage, organizationSid)) { if (logger.isDebugEnabled()) { String msg = String.format("Either authorization header is null [if(authorization==null) evaluates %s], or CallControlHelper.permitted() method failed, will send \"407 Proxy Authentication required\"", authorization==null); logger.debug(msg); } authenticate(request, storage.getOrganizationsDao().getOrganization(organizationSid).getDomainName()); return false; } else { return true; } }
String m = req.getMethod(); if ("INVITE".equals(m)) doInvite(req);
final MobicentsSipSession sessionImpl = (MobicentsSipSession) session; final SipServletRequestImpl newSubsequentServletRequest = (SipServletRequestImpl) session.createRequest(origRequest.getMethod());
logger.info("CDR found! Updating"); if (!linkedRequest.getMethod().equalsIgnoreCase("BYE")) { if (response.getStatus() == 100 || response.getStatus() == 180 || response.getStatus() == 183) { callRecord = callRecord.setStatus(CallStateChanged.State.RINGING.name());
Address fromAddress = sipFactory.createAddress(from, fromClient.getFriendlyName()); Address toAddress = sipFactory.createAddress(to, to.getUser()); outRequest = sipFactory.createRequest(request.getApplicationSession(), request.getMethod(), fromAddress, toAddress); } else { outRequest = sipFactory.createRequest(request.getApplicationSession(), request.getMethod(), from, to); logger.info("Request: " + request.getMethod() + " content exists: " + request.getContent() != null+ " content type: " + request.getContentType());
logger.info("B2BUA (p2p proxy): Got request:\n" + request.getMethod()); logger.info(String.format("B2BUA: Proxying a session between %s and %s", client.getLogin(), toClient.getLogin())); SipServletRequest outRequest = sipFactory.createRequest(request.getApplicationSession(), request.getMethod(), from, to); if(patchForNat) {