<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi</p>
<p><br>
</p>
<p>the missing = was my typo in the email and not the config.</p>
<p>the probelm is only with the TLS advertise and not the non tls
advertise</p>
<p>these work as expected<br>
</p>
<p>listen = LISTEN_EXTERNAL_SOCKET advertise ADVERTISE_NAT_ADDRESS
name = "ext"</p>
<p>#!substdef "!ADVERTISE_NAT_ADDRESS!1.2.3.4:5060!g" <br>
</p>
<p><br>
</p>
<p>these do not works<br>
</p>
<p>#!substdef "!ADVERTISE_NAT_ADDRESS_TLS!1.2.3.4:5061!g" does not
work</p>
<p>listen = LISTEN_EXTERNAL_SOCKET_TLS advertise
ADVERTISE_NAT_ADDRESS_TL name = "ext-tls"</p>
<p>or <br>
</p>
<p>listen = LISTEN_EXTERNAL_SOCKET_TLS advertise
ADVERTISE_NAT_ADDRESS_TLS name = "ext-tls"</p>
<p><br>
</p>
<p><br>
</p>
<p>if its not quoted then error = cannot resolve 1.2.3.4:5061 of not
quoted error = cannot resolve ADVERTISE_NAT_ADDRESS_TLS</p>
<p><br>
</p>
<p>if i replace the def with the 1.2.3.4:5061 it works</p>
<p><br>
</p>
<p>what is hte difference if also changed the name to
ADVERTISE_NAT_ADDRESS_SEC with the same results<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 30/11/2021 16:21, Karsten Horsmann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFArqsaKZP68p-zuutW3LV5N9W6P_kyG8P4bwi95T18V6=xyzA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Richard,
<div><br>
</div>
<div>seems that you forgot the equal signs in the listen
directive. Did kamailio -c -f /etc/kamailio/kamailio.cfg
return something?</div>
<div><a
href="http://www.kamailio.org/wiki/cookbooks/devel/core#listen"
moz-do-not-send="true" class="moz-txt-link-freetext">http://www.kamailio.org/wiki/cookbooks/devel/core#listen</a><br>
</div>
<div><br>
</div>
<div>I did the same with puppet. And I only manipulate my
/etc/kamailio/kamailio-local.cfg with the configuration
management tool. </div>
<div>Small example from my templating.</div>
<div><br>
</div>
<div>grep MY_PUB_IP /etc/kamailio/kamailio-local.cfg<br>
#!substdef "!MY_PUB_IP!1.2.3.4!g"<br>
....<br>
egrep 'MY_HTTPS_ADDR|MY_PUB_IP|_PORT'
/etc/kamailio/kamailio.cfg<br>
import_file "kamailio-local.cfg"<br>
....<br>
#!substdef "!MY_HTTPS_ADDR!tls:MY_PUB_IP:MY_WSS_HTTPS!g"<br>
....<br>
listen=udp:MY_PUB_IP:5060<br>
listen=tcp:MY_PUB_IP:5060<br>
listen=tls:MY_PUB_IP:5061<br>
listen=MY_HTTPS_ADDR<br>
</div>
<div><br>
</div>
<div>Kind regards</div>
<div>Karsten</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Di., 30. Nov. 2021 um
16:57 Uhr schrieb Richard Robson <<a
href="mailto:richard@rikrobson.co.uk" moz-do-not-send="true"
class="moz-txt-link-freetext">richard@rikrobson.co.uk</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>I have a problem when trying to add an advertised address
in Kamailio 5.4.2</p>
<p><br>
</p>
<p>we have a checf config that is populating various
variable. some of these are for the Listeners</p>
<p><br>
</p>
<p><br>
</p>
<p>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 <a href="http://1.2.3.4:5061"
target="_blank" moz-do-not-send="true">1.2.3.4:5061</a>
is not resolvable</p>
<p><br>
</p>
<p>therefroe I have udp,tcp and tls listeners all on the
default ports where i need the tls on port 5061 ans not
5060<br>
</p>
<p><br>
</p>
<p>listen = LISTEN_EXTERNAL_SOCKET advertise
ADVERTISE_NAT_ADDRESS name = "ext"</p>
<p>listen = LISTEN_INTERNAL_SOCKET name = "int"</p>
<p>listen = LISTEN_EXTERNAL_SOCKET_TLS advertise name =
"ext-tls"</p>
<p>listen = LISTEN_INTERNAL_SOCKET_TLS name = "int-tls"</p>
<p>the Vars are defined as <br>
</p>
<p class="MsoNormal">#!define TOPO_NAT</p>
<p class="MsoNormal">#!substdef
"!LISTEN_EXTERNAL_SOCKET!10.10.10.10:5060!g"</p>
<p class="MsoNormal">#!substdef
"!LISTEN_INTERNAL_SOCKET!10.10.10.10:5080!g"</p>
<p class="MsoNormal">#!substdef
"!ADVERTISE_NAT_ADDRESS!1.2.3.4:5060!g"</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">#!define ENABLE_TLS</p>
<p class="MsoNormal">#!define TLS_CONFIG_FILE
"chef-managed/tls.cfg"</p>
<p class="MsoNormal">#!substdef
"!LISTEN_EXTERNAL_SOCKET_TLS!tls:10.225.73.16:5061!g"</p>
<p class="MsoNormal">#!substdef
"!LISTEN_INTERNAL_SOCKET_TLS!tls:10.225.73.16:5061!g"</p>
<p>#!substdef "!ADVERTISE_NAT_ADDRESS_TLS!1.2.3.4:5061!g"</p>
<p>REgards,</p>
<p><br>
</p>
<p>Richard<br>
</p>
<br>
</div>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
* <a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not
reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
* <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">Mit freundlichen Grüßen<br>
*Karsten Horsmann*<br>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
</body>
</html>