<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">The error indicates kamailio can not resolve the location of asterisk2. Try checking the dns (can you resolve it on the kamailio box?) or using the IP. <br><br><div dir="ltr">-- Fred<div><br></div></div><div dir="ltr"><br>On Jul 13, 2019, at 07:09, Amir <<a href="mailto:gheshlaghy@gmail.com">gheshlaghy@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Hi</div><div>I have created a kamailio container with docker and two asterisk container</div><div>And this is my dispatcher list:</div><div><b>1 sip:asterisk:5060<br>1 sip:asterisk2:5060</b></div><div>and this is my both asterisk SIP.conf</div><div><b>[Kamailio]<br>host=kamailio<br>port=5060<br>insecure=invite<br>type=friend<br>context=from-internal</b></div><div><br></div><div>The problem is that I use User-defined networks which has its own DNS</div><div>when a container starts a dns record would be set<br></div><div>If I start a kamailio first then start two asterisks the asterisk works fine</div><div>because the name "kamailio" has been set in docker dns<br></div><div>but I should restart the kamailio because at startup It could not resolve astersik dns records</div><div>after the everything works fine but if the any of the asterisk instances crash/stop kamailio</div><div>can not detect that because a dns record would not be available:</div><div><br></div><div><b>17(22) ERROR: <core> [core/resolve.c:1684]: sip_hostport2su(): could not resolve hostname: "asterisk2"<br>17(22) ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "asterisk2"<br>17(22) ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found<br>17(22) ERROR: dispatcher [dispatch.c:3110]: ds_ping_set(): unable to ping [sip:asterisk2:5060]</b></div><div><br></div><div><br></div><div>It is kind of loop , I think maybe I can fix asterisk problem with asterisk realtime and</div><div>set the sip.conf in database. <br></div><div>anyone has any suggestion for this problem?<br></div><div><br></div></div>
</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></span><br><span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br></div></blockquote></body></html>