/** * Get the default route string. * * @param sipRequest * is the request for which we want to compute the next hop. * @throws SipException */ public Hop getNextHop(SIPRequest sipRequest) throws SipException { if (this.useRouterForAll) { // Use custom router to route all messages. if (router != null) return router.getNextHop(sipRequest); else return null; } else { // Also non-SIP request containing Route headers goes to the default // router if (sipRequest.getRequestURI().isSipURI() || sipRequest.getRouteHeaders() != null) { return defaultRouter.getNextHop(sipRequest); } else if (router != null) { return router.getNextHop(sipRequest); } else return null; } }
"Null message channel using outbound proxy !"); Hop outboundProxy = sipStack.getRouter(dialogRequest) .getOutboundProxy(); if (outboundProxy == null) throw new SipException("No route found! hop=" + hop);
Hop hop = sipStack.getRouter((SIPRequest) request).getNextHop(request); if (hop == null) throw new SipException("could not determine next hop!");