Rhino SIP Servlet uses its network routes to determine the appropriate outbound network interface for outgoing requests.

Tip Network routes are only required when the SIP Servlet RA entity has two or more network interfaces enabled.
Warning Changes to the network route configuration of an active SIP Servlet RA entity will not be applied until the RA entity is restarted.

Determining the outbound interface

The SIP Servlet RA uses a routing table, which is an ordered sequence of network routes. Users modify the RA’s routing table by adding, removing, or moving network routes.

When the RA needs to send a SIP request on the network, it looks at the request’s next-hop address. This is the hostname or IP address in the first Route header, if present, or the address of the Request-URI. Note that this occurs before RFC3263 name resolution procedures are applied.

Each configured network route has a rule, and a network interface to use if the rule matches the next-hop address. The RA iterates over the table, and the first route to match the next-hop address is selected. If no rules match, the default route will be used.

Note A servlet can explicitly select an outbound network interface using SipSession.setOutboundInterface() or SipSession.setOutboundInterface(). This setting overrides the RA’s routing table.

Routing rules

Network routes are created by specifying a rule, and a network interface to use if the rule is matched. The available rules are:

  • ip — matches if the next-hop address (or its resolved address) is in the given IP address range. For example, ip 10.0.0.0/8 matches addresses 10.0.0.0-10.0.0.255.

  • subdomain — matches if the hostname is inside a given domain. For example, subdomain opencloud.com matches proxy.opencloud.com.

  • regex — performs a regularexpression match on the next-hop address. For example, regex media.*\.abc\.com matches mediaserver.abc.com.

Default route

The default route is a special rule that is always evaluated last. It specifies a network interface that requests will be sent on if no other routes matched.

Tip When two or more network interfaces are enabled, it is good practice to configure the default route — to prevent requests falling through and being rejected because no other routes matched.

Relationship to host routing table

Rhino SIP Servlet will not modify the host’s routing table. It assumes that the operator will update the host routing table as necessary. For example, if the SIP Servlet RA has a rule that says all requests to 192.168.0.0/24 should use the interface "private", then the operator must ensure that the corresponding physical network interface can actually send to those addresses — that the interface is directly attached to the 192.168.0.0/24 network, or has a route to that network.

 

Previous page Next page