Hello,
I have Kamailio 3.1.0 behind a NAT. We need the Firewall for sip-security reasons. Currently I'm using record_route_preset("advertised_Address") for keeping the advertised address in the record-route header. This works for fine when I have all clients running on UDP protocol.
I currently have some TLS clients added to our network, Kamailio does not insert the second record-route header with the advertised-IP whenever there is a call between a UDP and a TLS Client. Instead it inserts the internal/Local IP of the server.
I had also noticed the record_route_preset() function does not include the transport parameter ("transport=UDP" or "transport=TLS").
I was looking through the source code of Kamailio and found record_route_advertised_address() in record.c . I would like to know how to use this function with the Kamailio config.
Regards Gnani
The fact that there is a function in the source code does not mean you can use it in the route script; functions have to be properly defined and exposed/exported to make that happen. Indeed, there are far more functions in the C source than in the modules' exported parameters list.
Check the 'rr' module reference for more info.
-- This message was painstakingly thumbed out on my mobile, so apologies for brevity, errors, and general sloppiness.
Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
On Dec 2, 2011, at 2:04 PM, Gnaneshwar Gatla GGatla@InTouchHealth.com wrote:
Hello,
I have Kamailio 3.1.0 behind a NAT. We need the Firewall for sip-security reasons.
Currently I’m using record_route_preset(“advertised_Address”) for keeping the advertised address in the record-route header. This works for fine when I have all clients running on UDP protocol.
I currently have some TLS clients added to our network, Kamailio does not insert the second record-route header with the advertised-IP whenever there is a call between a UDP and a TLS Client.
Instead it inserts the internal/Local IP of the server.
I had also noticed the record_route_preset() function does not include the transport parameter (“transport=UDP” or “transport=TLS”).
I was looking through the source code of Kamailio and found record_route_advertised_address() in record.c . I would like to know how to use this function with the Kamailio config.
Regards
Gnani
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Take a look at set_advertised_address: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised... Set it and then record_route() will properly fill the Record-Route header.
Regards, Ovidiu Sas
Hi, I do not think that record_route() uses the advertised_address variables. We have been using the advertised_address / advertised_port variables in the config file and although they are used in the Via headers, they are not substituted into the Record Route lines.
record_route_advertised_address() was added about 2 weeks ago for exactly this reason - using an advertised address in record routes when the transport changes. It automatically inserts double (rr2=on) routes in these cases and extra custom parameters can be added later.
However, we only needed the C API, so it isn't exported as a config file function yet. This won't be difficult.
Regards, Hugh
On 03/12/11 15:57, Ovidiu Sas wrote:
Take a look at set_advertised_address: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised... Set it and then record_route() will properly fill the Record-Route header.
Regards, Ovidiu Sas
Hello,
maybe the option for now is to set the parameters for record_route_preset() to advertised_address/port:
http://kamailio.org/docs/modules/stable/modules_k/rr.html#id2542169
I have some deployments (like on EC2) where I use advertise_address for have the proper Via and record_route_preset() for record route headers.
For simplicity, it would be good to have the function in config to take advertised address value for building the rr header.
Cheers, Daniel
On 12/3/11 9:41 PM, Hugh Waite wrote:
Hi, I do not think that record_route() uses the advertised_address variables. We have been using the advertised_address / advertised_port variables in the config file and although they are used in the Via headers, they are not substituted into the Record Route lines.
record_route_advertised_address() was added about 2 weeks ago for exactly this reason - using an advertised address in record routes when the transport changes. It automatically inserts double (rr2=on) routes in these cases and extra custom parameters can be added later.
However, we only needed the C API, so it isn't exported as a config file function yet. This won't be difficult.
Regards, Hugh
On 03/12/11 15:57, Ovidiu Sas wrote:
Take a look at set_advertised_address: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised...
Set it and then record_route() will properly fill the Record-Route header.
Regards, Ovidiu Sas
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi, I've implemented the config file function for record_route_advertised_address and it should appear in git head later today. Just doing the documentation and some testing...
Hugh
On 05/12/2011 21:52, Daniel-Constantin Mierla wrote:
Hello,
maybe the option for now is to set the parameters for record_route_preset() to advertised_address/port:
http://kamailio.org/docs/modules/stable/modules_k/rr.html#id2542169
I have some deployments (like on EC2) where I use advertise_address for have the proper Via and record_route_preset() for record route headers.
For simplicity, it would be good to have the function in config to take advertised address value for building the rr header.
Cheers, Daniel
On 12/3/11 9:41 PM, Hugh Waite wrote:
Hi, I do not think that record_route() uses the advertised_address variables. We have been using the advertised_address / advertised_port variables in the config file and although they are used in the Via headers, they are not substituted into the Record Route lines.
record_route_advertised_address() was added about 2 weeks ago for exactly this reason - using an advertised address in record routes when the transport changes. It automatically inserts double (rr2=on) routes in these cases and extra custom parameters can be added later.
However, we only needed the C API, so it isn't exported as a config file function yet. This won't be difficult.
Regards, Hugh
On 03/12/11 15:57, Ovidiu Sas wrote:
Take a look at set_advertised_address: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised...
Set it and then record_route() will properly fill the Record-Route header.
Regards, Ovidiu Sas
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi,
The record_route_advertised_address() config file function is now in git master.
Peter
On Wed, 2011-12-07 at 10:27 +0000, Hugh Waite wrote:
Hi, I've implemented the config file function for record_route_advertised_address and it should appear in git head later today. Just doing the documentation and some testing...
Hugh
On 05/12/2011 21:52, Daniel-Constantin Mierla wrote:
Hello,
maybe the option for now is to set the parameters for record_route_preset() to advertised_address/port:
http://kamailio.org/docs/modules/stable/modules_k/rr.html#id2542169
I have some deployments (like on EC2) where I use advertise_address for have the proper Via and record_route_preset() for record route headers.
For simplicity, it would be good to have the function in config to take advertised address value for building the rr header.
Cheers, Daniel
On 12/3/11 9:41 PM, Hugh Waite wrote:
Hi, I do not think that record_route() uses the advertised_address variables. We have been using the advertised_address / advertised_port variables in the config file and although they are used in the Via headers, they are not substituted into the Record Route lines.
record_route_advertised_address() was added about 2 weeks ago for exactly this reason - using an advertised address in record routes when the transport changes. It automatically inserts double (rr2=on) routes in these cases and extra custom parameters can be added later.
However, we only needed the C API, so it isn't exported as a config file function yet. This won't be difficult.
Regards, Hugh
On 03/12/11 15:57, Ovidiu Sas wrote:
Take a look at set_advertised_address: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised...
Set it and then record_route() will properly fill the Record-Route header.
Regards, Ovidiu Sas
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 12/8/11 11:13 PM, Peter Dunkley wrote:
Hi,
The record_route_advertised_address() config file function is now in git master.
from the readme I see that it takes the address from the function parameter, not from advertised_address global parameter, which is getting close to what record_route_preset() does, just that record_route_advertised_address() can do double rr with the address parameter based on auto-detection of transport change.
Probably would be useful to have the option of no parameter for this new function, in which case the global parameter advertised_adress/advertised_port will be used for building rr.
Cheers, Daniel
Peter
On Wed, 2011-12-07 at 10:27 +0000, Hugh Waite wrote:
Hi, I've implemented the config file function for record_route_advertised_address and it should appear in git head later today. Just doing the documentation and some testing...
Hugh
On 05/12/2011 21:52, Daniel-Constantin Mierla wrote:
Hello,
maybe the option for now is to set the parameters for record_route_preset() to advertised_address/port:
http://kamailio.org/docs/modules/stable/modules_k/rr.html#id2542169
I have some deployments (like on EC2) where I use advertise_address for have the proper Via and record_route_preset() for record route headers.
For simplicity, it would be good to have the function in config to take advertised address value for building the rr header.
Cheers, Daniel
On 12/3/11 9:41 PM, Hugh Waite wrote:
Hi, I do not think that record_route() uses the advertised_address variables. We have been using the advertised_address / advertised_port variables in the config file and although they are used in the Via headers, they are not substituted into the Record Route lines.
record_route_advertised_address() was added about 2 weeks ago for exactly this reason - using an advertised address in record routes when the transport changes. It automatically inserts double (rr2=on) routes in these cases and extra custom parameters can be added later.
However, we only needed the C API, so it isn't exported as a config file function yet. This won't be difficult.
Regards, Hugh
On 03/12/11 15:57, Ovidiu Sas wrote:
Take a look at set_advertised_address: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#set_advertised...
Set it and then record_route() will properly fill the Record-Route header.
Regards, Ovidiu Sas
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Peter Dunkley Technical Director Crocodile RCS Ltd
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users