<h3>Description</h3>
<p>Running kamailio in kubernetes (steps <a href="https://github.com/CyCoreSystems/astricon-2016/issues/1">here</a>) but getting an "invalid host or interface name" error when parsing the alias in kamailio.cfg</p>
<p>As per<br>
<a href="https://github.com/kamailio/kamailio/blob/9df27ff7afbf1cf8ee7b3afd1741355e9f6f866e/src/core/cfg.y#L2263">https://github.com/kamailio/kamailio/blob/9df27ff7afbf1cf8ee7b3afd1741355e9f6f866e/src/core/cfg.y#L2263</a> DOTS and MINUS are not allowed?</p>
<p>GCE FQDN of server nodes currently have a format like this: <code>gke-foo-cluster-default-pool-4b9e42c9-50mh.c.foo-project-0.internal</code></p>
<h3>Troubleshooting</h3>
<p>Doesn't exist. node names in the cloud are not customizable.</p>
<h4>Reproduction</h4>
<p>set the alias in kamailio.cfg to <code>my-server.my-domain.internal</code></p>
<h4>Debugging Data</h4>
<p>N/A</p>
<h4>Log Messages</h4>
<pre><code>2017-08-31T03:34:27Z gke-foo-cluster-default-pool-4b9e42c9-50mh confd[15]: INFO Backend set to env
2017-08-31T03:34:27Z gke-foo-cluster-default-pool-4b9e42c9-50mh confd[15]: INFO Starting confd
2017-08-31T03:34:27Z gke-foo-cluster-default-pool-4b9e42c9-50mh confd[15]: INFO Backend nodes set to 
2017-08-31T03:34:27Z gke-foo-cluster-default-pool-4b9e42c9-50mh confd[15]: INFO /etc/kamailio/kamailio.cfg has md5sum 17481ad2235ef9698da57c6e90d5ac2b should be fb5d75c2654ab2264b11fab5802bd4b7
2017-08-31T03:34:27Z gke-foo-cluster-default-pool-4b9e42c9-50mh confd[15]: INFO Target config /etc/kamailio/kamailio.cfg out of sync
2017-08-31T03:34:27Z gke-foo-cluster-default-pool-4b9e42c9-50mh confd[15]: INFO Target config /etc/kamailio/kamailio.cfg has been updated
 0(1) CRITICAL: <core> [cfg.y:3372]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 35, column 30-36: syntax error
 0(1) CRITICAL: <core> [cfg.y:3372]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 35, column 30-36: invalid host or interface name
 0(1) CRITICAL: <core> [cfg.y:3375]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 35, column 37: 
ERROR: bad config file (3 errors)

</code></pre>
<h4>SIP Traffic</h4>
<p>N/A</p>
<h3>Possible Solutions</h3>
<p>Let the parser accept server and domain names with "-"</p>
<h3>Additional Information</h3>
<p>Kamailio version: upstream? as per the Dockerfile the image is coming from:</p>
<pre><code>FROM debian:jessie

# Debian Linux
RUN apt-get update && apt-get install -y curl && apt-get clean

# Install kamailio
RUN curl -qO http://deb.kamailio.org/kamailiodebkey.gpg && \
    apt-key add kamailiodebkey.gpg && \
    echo "deb http://deb.kamailio.org/kamailio jessie main\ndeb-src http://deb.kamailio.org/kamailio jessie main" > /etc/apt/sources.list.d/kamailio.list
RUN apt-get update && apt-get install -y kamailio kamailio-json-modules kamailio-postgres-modules kamailio-redis-modules kamailio-utils-modules && apt-get clean

# Install confd (we need at least 0.7.0 for the "exists" function
RUN curl -o /usr/sbin/confd -O -J -L "https://github.com/kelseyhightower/confd/releases/download/v0.11.0/confd-0.11.0-linux-amd64"
RUN chmod +x /usr/sbin/confd
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<p>Debian Jessie</p>
<pre><code>Linux gke-foo-cluster-default-pool-4b9e42c9-50mh 4.4.52+ #1 SMP Thu Jun 15 15:23:01 PDT 2017 x86_64 GNU/Linux

</code></pre>
<p>Please confirm if this docker image is built from the Kamailio's upstream version in order to fix it if not.</p>
<p>tks.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1223">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZQR24iDZdHT-3GzIOAuYC9JY2xIWks5sdi3VgaJpZM4PIROj">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZVP6_TA3x6glXjkNQNmMpC4IH4SRks5sdi3VgaJpZM4PIROj.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1223"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"cfg grammar incompatible with Google Compute Engine's node FQDN format (#1223)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1223"}}}</script>