[SR-Users] Kamailio Asterisk integration with docker DNS Problem

Amir gheshlaghy at gmail.com
Sat Jul 13 13:09:04 CEST 2019

I have created a kamailio container with docker and two asterisk container
And this is my dispatcher list:

*1 sip:asterisk:50601 sip:asterisk2:5060*
and this is my both asterisk SIP.conf


The problem is that I use User-defined networks which has its own DNS
when a container starts a dns record would be set
If I start a kamailio first then start two asterisks the asterisk works fine
because the name "kamailio" has been set in docker dns
but I should restart the kamailio because at startup It could not resolve
astersik dns records
after the everything works fine but if the any of the asterisk instances
crash/stop kamailio
can not detect that because a dns record would not be available:

*17(22) ERROR: <core> [core/resolve.c:1684]: sip_hostport2su(): could not
resolve hostname: "asterisk2"17(22) ERROR: tm [ut.h:309]: uri2dst2():
failed to resolve "asterisk2"17(22) ERROR: tm [uac.c:452]: t_uac_prepare():
no socket found17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set():
unable to ping [sip:asterisk2:5060]*

It is kind of loop , I think maybe I can fix asterisk problem with asterisk
realtime and
set the sip.conf in database.
anyone has any suggestion for this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190713/ef8b3c7a/attachment.html>

More information about the sr-users mailing list