Hi Richard,

seems that you forgot the equal signs in the listen directive. Did kamailio -c -f /etc/kamailio/kamailio.cfg return something?
http://www.kamailio.org/wiki/cookbooks/devel/core#listen

I did the same with puppet. And I only manipulate my /etc/kamailio/kamailio-local.cfg with the configuration management tool. 
Small example from my templating.

grep MY_PUB_IP /etc/kamailio/kamailio-local.cfg
#!substdef "!MY_PUB_IP!1.2.3.4!g"
....
egrep 'MY_HTTPS_ADDR|MY_PUB_IP|_PORT' /etc/kamailio/kamailio.cfg
import_file "kamailio-local.cfg"
....
#!substdef "!MY_HTTPS_ADDR!tls:MY_PUB_IP:MY_WSS_HTTPS!g"
....
listen=udp:MY_PUB_IP:5060
listen=tcp:MY_PUB_IP:5060
listen=tls:MY_PUB_IP:5061
listen=MY_HTTPS_ADDR

Kind regards
Karsten

Am Di., 30. Nov. 2021 um 16:57 Uhr schrieb Richard Robson <richard@rikrobson.co.uk>:

I have a problem when trying to add an advertised address in Kamailio 5.4.2


we have a checf config that is populating various variable. some of these are for the Listeners



we have this working and Im getting all protocols for the listeners based on the non _TLS Vars but the TLS config is trying to resolve ADVERTISE_NAT_ADDRESS_TLS. If I try and quote the variable "ADVERTISE_NAT_ADDRESS_TLS" id get an error saying 1.2.3.4:5061 is not resolvable


therefroe I have udp,tcp and tls listeners all on the default ports where i need the tls on port 5061 ans not 5060


listen LISTEN_EXTERNAL_SOCKET advertise ADVERTISE_NAT_ADDRESS name = "ext"

listen LISTEN_INTERNAL_SOCKET  name = "int"

listen LISTEN_EXTERNAL_SOCKET_TLS advertise  name = "ext-tls"

listen LISTEN_INTERNAL_SOCKET_TLS  name = "int-tls"

the Vars are defined as

#!define TOPO_NAT

#!substdef "!LISTEN_EXTERNAL_SOCKET!10.10.10.10:5060!g"

#!substdef "!LISTEN_INTERNAL_SOCKET!10.10.10.10:5080!g"

#!substdef "!ADVERTISE_NAT_ADDRESS!1.2.3.4:5060!g"

 

#!define ENABLE_TLS

#!define TLS_CONFIG_FILE "chef-managed/tls.cfg"

#!substdef "!LISTEN_EXTERNAL_SOCKET_TLS!tls:10.225.73.16:5061!g"

#!substdef "!LISTEN_INTERNAL_SOCKET_TLS!tls:10.225.73.16:5061!g"

#!substdef "!ADVERTISE_NAT_ADDRESS_TLS!1.2.3.4:5061!g"

REgards,


Richard


__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Mit freundlichen Grüßen
*Karsten Horsmann*