This is the default router. When the implementation wants to forward a request and had run out of othe options, then it calls this method to figure out where to send the request. The default router implements a simple "default routing algorithm" which just forwards to the configured proxy address.
When javax.sip.USE_ROUTER_FOR_ALL_URIS
is set to false
, the next hop is determined according to the following algorithm:
- If the request contains one or more Route headers, use the URI of the topmost Route header as next hop, possibly modifying the request in the process if the topmost Route header contains no lr parameter(*)
- Else, if the property
javax.sip.OUTBOUND_PROXY
is set, use its value as the next hop - Otherwise, use the request URI as next hop. If the request URI is not a SIP URI, call {@link javax.sip.address.Router#getNextHop(Request)} providedby the application.
(*)Note that in case the topmost Route header contains no 'lr' parameter (which means the next hop is a strict router), the implementation will perform 'Route Information Postprocessing' as described in RFC3261 section 16.6 step 6 (also known as "Route header popping"). That is, the following modifications will be made to the request:
- The implementation places the Request-URI into the Route header field as the last value.
- The implementation then places the first Route header field value into the Request-URI and removes that value from the Route header field.
Subsequently, the request URI will be used as next hop target
@version 1.2 $Revision: 1.18.2.1 $ $Date: 2010/11/23 19:23:11 $
@author M. Ranganathan