What kinds of dependencies are there on hostname?

Hi. I have asterisk-18.6.0 running fine in an LXC container. The container name happens to be “asterisk”, which seems to be what becomes the hostname inside the container, and its IP address also resolves to an “asterisk” hostname.

If I build the exact same container image using a different container name like “asterisk-18-6-0”, endpoints seem to no longer successfully connect (e.g., ATAs fail to show up as endpoint contacts in “pjsip show endpoints” output).

I have username/password authentication set up with “realm=asterisk”, so I thought it might be related to internal hostname not matching the realm, but running “hostnamectl” inside the container to change its hostname to “asterisk” (and restarting the container, and confirming that the internal hostname is updated) does not seem to help.

Are there any dependencies on the underlying host for things to “work”? Does reverse-lookup on IP address also need to resolve to the same hostname, or anything like that? (I am trying to set things up in a “staging” environment, so the IP address for this container in DNS actually ends up resolving to a different “asterisk-staging” hostname.)

Thank you!

The only thing the hostname is used for is resolving the local IP address for signaling. It wouldn’t stop incoming traffic, if that is indeed what happened (pjsip set logger on would confirm it).

Thank you for your response. It seems like my ATA just took awhile to finally reconnect to the new asterisk instance, after which everything is working. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.