1.1. Path Insertion For Registrations 1.2. Outbound routing to NAT'ed UACs This module is designed to be used at intermediate sip proxies like loadbalancers in front of registrars and proxies. It provides functions for inserting a Path header including a parameter for passing forward the received-URI of a registration to the next hop. It also provides a mechanism for evaluating this parameter in subsequent requests and to set the destination URI according to it. 1.1. Path Insertion For Registrations For registrations in a scenario like “[UAC] -> [P1] -> [REG]”, the "path" module can be used at the intermediate proxy P1 to insert a Path header into the message before forwarding it to the registrar REG. Two functions can be used to achieve this: * add_path(...) adds a Path header in the form of “Path: <sip:1.2.3.4;lr>” to the message using the address of the outgoing interface. A port is only added if it's not the default port 5060. If a username is passed to the function, it is also included in the Path URI, like “Path: <sip:username@1.2.3.4;lr>”. * add_path_received(...) also add a Path header in the same form as above, but also adds a parameter indicating the received-URI of the message, like “Path: <sip:1.2.3.4;received=sip:2.3.4.5:1234;lr>”. This is especially useful if the proxy does NAT detection and wants to pass the NAT'ed address to the registrar. If the function is called with a username, it's included in the Path URI too. Note that some SIP registrars may check if h
| Parámetro | Tipo | Descripción |
|---|---|---|
| use_received | int | 3.2. received_format (int) 3.3. received_name (str) 3.4. enable_r2 (int) 3.5. sockname_mode (int) |
| received_format | int | 3.3. received_name (str) 3.4. enable_r2 (int) 3.5. sockname_mode (int) |
| received_name | str | 3.4. enable_r2 (int) 3.5. sockname_mode (int) |
| enable_r2 | int | 3.5. sockname_mode (int) |
| sockname_mode | int | 3.1. use_received (int) |
| use_received | int | If set to 1, the “received” parameter of the first Route URI is evaluated and used as destination-URI if present. |
| received_format | int | If set to 0, the “received” parameter value will be in the escaped SIP URI format. |
| received_name | str | Set the name of the header parameter to add the “received” value. |
| enable_r2 | int | If set to 1, the module will add two Path headers, similar to the double Record-Route done by rr module. One Path headers corresponds to incoming network socket and the other to outgoing network socke |
| sockname_mode | int | If set to 1, the Path URI is built to contain socket name in 'sn' parameter. |
4.2. add_path(user) 4.3. add_path(user, parameters) 4.4. add_path_received() 4.5. add_path_received(user) 4.6. add_path_received(user, parameters)
4.3. add_path(user, parameters) 4.4. add_path_received() 4.5. add_path_received(user) 4.6. add_path_received(user, parameters)
4.4. add_path_received() 4.5. add_path_received(user) 4.6. add_path_received(user, parameters)
4.5. add_path_received(user) 4.6. add_path_received(user, parameters)
4.6. add_path_received(user, parameters)
4.1. add_path()
This function is used to insert a Path header in the form “Path: <sip:1.2.3.4;lr>”, where “1.2.3.4” is the address of the outgoing interface.
This function adds a Path header in the form “Path: <sip:user@1.2.3.4;lr>”.
usage ... if (!add_path("loadbalancer")) { sl_send_reply("503", "Internal Path Error"); ... }; ...
This function adds a Path header in the form “Path: <sip:user@1.2.3.4;lr>” and appends the given parameters as additional URI parameters.
usage ... if (!add_path("loadbalancer", "ob")) { sl_send_reply("503", "Internal Path Error"); ... }; ...
This function adds a Path header in the form “Path: <sip:1.2.3.4;received=sip:2.3.4.5:1234;lr>”, setting its own outgoing address as domain-part, and the address the request has been received from as received-parameter.
usage ... if (!add_path_received()) { sl_send_reply("503", "Internal Path Error"); ... }; ...
This function adds a Path header in the form “Path: <sip:user@1.2.3.4;received=sip:2.3.4.5:1234;lr>”, setting 'user' as username part of address, its own outgoing address as domain-part, and the address the request has been received from as received-
usage ... if (!add_path_received("inbound")) { sl_send_reply("503", "Internal Path Error"); ... }; ...
This function adds a Path header in the form “Path: <sip:user@1.2.3.4;received=sip:2.3.4.5:1234;lr>”, setting 'user' as username part of address, its own outgoing address as domain-part, and the address the request has been received from as received-
usage ... if (!add_path_received("inbound", "ob")) { sl_send_reply("503", "Internal Path Error"); ... }; ...
Copyright © 2006 Inode GmbH