### Description

Running kamailio in kubernetes (steps 
[here](https://github.com/CyCoreSystems/astricon-2016/issues/1)) but getting an 
"invalid host or interface name" error when parsing the alias in kamailio.cfg

As per 
https://github.com/kamailio/kamailio/blob/9df27ff7afbf1cf8ee7b3afd1741355e9f6f866e/src/core/cfg.y#L2263
 DOTS and MINUS are not allowed?

GCE FQDN of server nodes currently have a format like this: 
```gke-foo-cluster-default-pool-4b9e42c9-50mh.c.foo-project-0.internal```

### Troubleshooting

Doesn't exist. node names in the cloud are not customizable.

#### Reproduction

set the alias in kamailio.cfg to ```my-server.my-domain.internal```

#### Debugging Data

N/A

#### Log Messages

```
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)

```

#### SIP Traffic

N/A

### Possible Solutions

Let the parser accept server and domain names with "-"

### Additional Information

Kamailio version: upstream? as per the Dockerfile the image is coming from:

```
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
```

* **Operating System**:

Debian Jessie
```
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

```
Please confirm if this docker image is built from the Kamailio's upstream 
version in order to fix it if not.

tks.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1223
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to