2015-07-16 12:26 GMT+03:00 Daniel-Constantin Mierla <miconda(a)gmail.com>om>:
if you run Kamailio behind NAT and want to advertise a
different
(public) IP address in SIP headers, then it is recommended to use:
listen=privateip advertise publicip
See:
http://www.kamailio.org/wiki/cookbooks/4.3.x/core#listen
Then you simply keep using record_route() (no need for manual address
specification via record route preset or advertised address variants).
Thank you for this hint,
but it seems to be broken for me (i use recent git master HEAD).
I've tried such change (both with and without quotes around MY_DOMAIN),
include_file "modules.cfg"
-listen=MY_IP_ADDR:5060
-listen=MY_WS_ADDR
-listen=MY_WSS_ADDR
+listen=MY_IP_ADDR:5060 advertise "MY_DOMAIN"
+listen=MY_WS_ADDR advertise "MY_DOMAIN"
+listen=MY_WSS_ADDR advertise "MY_DOMAIN"
advertised_address = "MY_DOMAIN"
alias = "MY_DOMAIN"
but it gives parse errors:
Jul 17 15:06:12 webrtcloadtest kamailio: : <core> [cfg.y:3432]:
yyerror_at(): parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 29, column 1-6: syntax
error
Jul 17 15:06:12 webrtcloadtest kamailio: : <core> [cfg.y:3432]:
yyerror_at(): parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 29, column 1-6: ip address,
interface name or hostname expected
Please see that I already use advertised_address directive, but anyway
I have that issue that it uses internal IP. MY_DOMAIN is set to
symbolic FQDN, not numeric.
--
Andrey Utkin