Standard-dep
Least cost routing (LCR) module implements two related capabilities:
LCR may sequentially forward requests to one or more gateways using the load_gws and next_gw functions.
LCR may sequentially forward contacts if they don't share the the same qvalues. Use the functions load_contacts and next_contacts to access and select a contact.
Juha Heinanen
i [1] (if available in caller's RPID AVP after
authentication) or From URI and user part of Request-URIi [2] (telephone number). Gateway patterns
matching RPID or From URI and telephone number are ordered for forwarding purposes as follows:
- According to longest user part match
- According to priority
- Randomly
- According to longest user part match
- According to priority
- Randomly
Each gateway belongs to a gateway group either alone or among other gateways. All gateways in a group share the same priority. Gateway and routing information is kept in two tables: gw and lcr.
When a gateway is selected, Request-URI is rewritten with information from gw table: URI scheme, prefix, IP address, port, and transport protocol. Valid URI scheme values are:
- NULL = sip
- 1 = sip
- 2 = sips.
If a prefix is specified it will be prepended to the Request-URI user part.
Currently valid transport protocol values are:
- NULL = none
- 1 = udp
- 2 = tcp
- 3 = tls
Table lcr contains any prefix to be applied to the user part of Request-URI, the From URI, the gateway group id, and the priority. The From URI can contain special characters % and _ matching any number of any characters and any one character, respectively.
In addition to gw and lcr tables there is third table gw_grp that is used for administrative purposes only. In this table you may map names to the gateway group ids.
i [3]:pwd@localhost/ser") ...
The name of the table containing the list of gateways
Default value is gw.
The name of the column that contains the actual name of the gateway
Default value is gw_name.
The name of the column that contains the IP address for a specific gateway
Default value is ip_addr.
The name of the column that contains the port number through which this gateway communicates
Default value is port.
The name of the column that contains the scheme to be used when rewriting the R-URI
Default value is uri_scheme.
The name of the column that contains the transport to be used when contacting a gateway
Default value is transport.
The name of the column that contains the gateway group ID number
Default value is grp_id.
The name of the column that contains the LCR table
Default value is lcr.
The name of the column that contains the prefix to be prepended to the R-URI user part.
Default value is prefix.
The name of the column that contains the From URI which must match in order to select this gateway. Note that the values in this column may contain wildcard characters as mentioned earlier in this document.
Default value is from_uri.
http://www.iptel.org/ser/doc/modules/lcr
Links:
[1] http://www.iptel.org/glossary#term81
[2] http://www.iptel.org/glossary#term80
[3] http://www.iptel.org/glossary/term/244