Hello Amir,

what is your issue exactly:

- because of the missing DNS entry the dispatcher module would not detect the 
asterisk server as "down"

- because of the missing DNS entry your Kamailio would not (re)start properly

You could try with flag 16 to disable DNS resolution at startup in your 
dispatcher file:

https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#idm1020020140

Cheers,

Henning

Am 14.07.19 um 09:33 schrieb Amir:
I do not have a DNS server, Docker User-defined networks has it's own built in 
DNS server,
The problem is when I stop a container its DNS record would be deleted and 
therefore kamailio server could not check server health.
I think if I could tell kamailio server that IF you did not find a DNS record 
it means that a server is down my solution would work.

On Sat, Jul 13, 2019 at 10:56 PM Mojtaba 
<[email protected]<mailto:[email protected]>> wrote:
Hello,
Did you add SRV record for each server in your DNS server?

On Sat, Jul 13, 2019 at 6:07 PM Fred Posner 
<[email protected]<mailto:[email protected]>> wrote:
>
> 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.
>
> -- Fred
>
>
> On Jul 13, 2019, at 07:09, Amir 
> <[email protected]<mailto:[email protected]>> wrote:
>
> Hi
> I have created a kamailio container with docker and two asterisk container
> And this is my dispatcher list:
> 1 sip:asterisk:5060
> 1 sip:asterisk2:5060
> and this is my both asterisk SIP.conf
> [Kamailio]
> host=kamailio
> port=5060
> insecure=invite
> type=friend
> context=from-internal
>
> 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 found
> 17(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?
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [email protected]<mailto:[email protected]>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [email protected]<mailto:[email protected]>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



--
--Mojtaba Esfandiari.S

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]<mailto:[email protected]>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]<mailto:[email protected]>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to