[SR-Users] Double Record-Route to subscriber with multiple locations on different SIP transports

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Jul 17 17:13:52 CEST 2015


2015-07-16 12:26 GMT+03:00 Daniel-Constantin Mierla <miconda at gmail.com>:
> 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



More information about the sr-users mailing list