Hi 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
*[Kamailio]host=kamailioport=5060insecure=invitetype=friendcontext=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 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?
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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello, Did you add SRV record for each server in your DNS server?
On Sat, Jul 13, 2019 at 6:07 PM Fred Posner fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
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#idm102002014...
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 <mespio@gmail.commailto:mespio@gmail.com> 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 <fred@palner.commailto:fred@palner.com> 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 <gheshlaghy@gmail.commailto:gheshlaghy@gmail.com> 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 sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them: - because of the missing DNS entry your Kamailio would not (re)start properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16 - because of the missing DNS entry the dispatcher module would not detect the asterisk server as "down" - because of the missing DNS entry my Asterisks would not (re)start properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services
Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote:
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not detect
the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start
properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://skalatan.de/services
as option you can reload dispatcher table instead of kamailio restart. kamctl dispatcher reload
On Sun, Jul 14, 2019 at 1:27 PM Amir gheshlaghy@gmail.com wrote:
Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote:
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not detect
the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start
properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank you, Maybe I should develop a health check mechanism and save the result in kamailio db and after that: kamctl dispatcher reload
On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov s.safarov@gmail.com wrote:
as option you can reload dispatcher table instead of kamailio restart. kamctl dispatcher reload
On Sun, Jul 14, 2019 at 1:27 PM Amir gheshlaghy@gmail.com wrote:
Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote:
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not
detect the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start
properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If the dns resolution fails, don’t you get the event route dispatcher:dst-down fired? You could use that route to remove the entry from the dispatcher list.
David
On Sun, 14 Jul 2019 at 12:29, Amir gheshlaghy@gmail.com wrote:
Thank you, Maybe I should develop a health check mechanism and save the result in kamailio db and after that: kamctl dispatcher reload
On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov s.safarov@gmail.com wrote:
as option you can reload dispatcher table instead of kamailio restart. kamctl dispatcher reload
On Sun, Jul 14, 2019 at 1:27 PM Amir gheshlaghy@gmail.com wrote:
Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote:
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not
detect the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start
properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
All of these seem like hacks to resolve the problem of you not being able to resolve the hostname.
Perhaps there’s a docker setting or dns you can use to provide stability or investigate why the host isn’t being resolved.
If the host doesn’t exist when you start kamailio then clearly it will be down and a better way would be to add the dispatcher entries when the host exists and reload.
If you search for kamailio and docker, Sean McCord has discussed this at both astricon and kamailio world.
-- Fred
On Jul 14, 2019, at 09:20, David Villasmil david.villasmil.work@gmail.com wrote:
If the dns resolution fails, don’t you get the event route dispatcher:dst-down fired? You could use that route to remove the entry from the dispatcher list.
David
On Sun, 14 Jul 2019 at 12:29, Amir gheshlaghy@gmail.com wrote: Thank you, Maybe I should develop a health check mechanism and save the result in kamailio db and after that: kamctl dispatcher reload
On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov s.safarov@gmail.com wrote: as option you can reload dispatcher table instead of kamailio restart. kamctl dispatcher reload
On Sun, Jul 14, 2019 at 1:27 PM Amir gheshlaghy@gmail.com wrote: Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart KAMAILIO
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote: Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start properly: I tried flag 16 as you mentioned but still dose not work
1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not detect the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start properly
maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote: 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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 >> > sr-users@lists.kamailio.org >> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > >> > _______________________________________________ >> > Kamailio (SER) - Users Mailing List >> > sr-users@lists.kamailio.org >> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> >> >> >> -- >> --Mojtaba Esfandiari.S >> >> _______________________________________________ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org
> 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337 _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank you David, I would try that later.
On Sun, Jul 14, 2019 at 6:06 PM Fred Posner fred@palner.com wrote:
All of these seem like hacks to resolve the problem of you not being able to resolve the hostname.
Perhaps there’s a docker setting or dns you can use to provide stability or investigate why the host isn’t being resolved.
If the host doesn’t exist when you start kamailio then clearly it will be down and a better way would be to add the dispatcher entries when the host exists and reload.
If you search for kamailio and docker, Sean McCord has discussed this at both astricon and kamailio world.
-- Fred
On Jul 14, 2019, at 09:20, David Villasmil david.villasmil.work@gmail.com wrote:
If the dns resolution fails, don’t you get the event route dispatcher:dst-down fired? You could use that route to remove the entry from the dispatcher list.
David
On Sun, 14 Jul 2019 at 12:29, Amir gheshlaghy@gmail.com wrote:
Thank you, Maybe I should develop a health check mechanism and save the result in kamailio db and after that: kamctl dispatcher reload
On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov s.safarov@gmail.com wrote:
as option you can reload dispatcher table instead of kamailio restart. kamctl dispatcher reload
On Sun, Jul 14, 2019 at 1:27 PM Amir gheshlaghy@gmail.com wrote:
Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote:
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not
detect the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start
properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 > > sr-users@lists.kamailio.org > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > _______________________________________________ > > Kamailio (SER) - Users Mailing List > > sr-users@lists.kamailio.org > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > -- > --Mojtaba Esfandiari.S > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank you Fred, Yes I think I would go for that.
On Sun, Jul 14, 2019 at 6:06 PM Fred Posner fred@palner.com wrote:
All of these seem like hacks to resolve the problem of you not being able to resolve the hostname.
Perhaps there’s a docker setting or dns you can use to provide stability or investigate why the host isn’t being resolved.
If the host doesn’t exist when you start kamailio then clearly it will be down and a better way would be to add the dispatcher entries when the host exists and reload.
If you search for kamailio and docker, Sean McCord has discussed this at both astricon and kamailio world.
-- Fred
On Jul 14, 2019, at 09:20, David Villasmil david.villasmil.work@gmail.com wrote:
If the dns resolution fails, don’t you get the event route dispatcher:dst-down fired? You could use that route to remove the entry from the dispatcher list.
David
On Sun, 14 Jul 2019 at 12:29, Amir gheshlaghy@gmail.com wrote:
Thank you, Maybe I should develop a health check mechanism and save the result in kamailio db and after that: kamctl dispatcher reload
On Sun, Jul 14, 2019 at 3:23 PM Sergey Safarov s.safarov@gmail.com wrote:
as option you can reload dispatcher table instead of kamailio restart. kamctl dispatcher reload
On Sun, Jul 14, 2019 at 1:27 PM Amir gheshlaghy@gmail.com wrote:
Sorry for mistyping : I can make it work like this: Start Kamailio first Then start asterisk containers Then restart *KAMAILIO*
On Sun, Jul 14, 2019 at 2:50 PM Amir gheshlaghy@gmail.com wrote:
Hi Henning Thank you for clearing that up, I have 3 problem which you have mentioned 2 of them:
- because of the missing DNS entry your Kamailio would not (re)start
properly: I tried flag 16 as you mentioned but still dose not work 1 sip:asterisk:7060 16 1 sip:asterisk2:7060 16 1 sip:asterisk3:7060 16
- because of the missing DNS entry the dispatcher module would not
detect the asterisk server as "down"
- because of the missing DNS entry my Asterisks would not (re)start
properly maybe I should try asterisk realtime for the last problem
I can make it work like this: Start Kamailio first Then start asterisk containers Then restart astersik
Cheers Amir
On Sun, Jul 14, 2019 at 1:31 PM Henning Westerholt hw@skalatan.de wrote:
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#idm102002014...
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 > > sr-users@lists.kamailio.org > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > _______________________________________________ > > Kamailio (SER) - Users Mailing List > > sr-users@lists.kamailio.org > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > -- > --Mojtaba Esfandiari.S > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
The easiest solution is to add in the kamailio machine /etc/hosts file the ip addresses associated to asterisk and asterisk2 hosts.
Hope to have helped.
Kind regards
Federico Santulli
NHM s.r.l. Via Raffaello Sanzio, 88 81031 Aversa (CE) Italy E-Mail federico.santulli@nhm.it Mobile +39.335.466645 Office +39.081.18396200 Fax +39.081.18396299
Il giorno 14 lug 2019, alle ore 10:33, Amir gheshlaghy@gmail.com ha scritto:
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 mespio@gmail.com 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 fred@palner.com 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 gheshlaghy@gmail.com 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- --Mojtaba Esfandiari.S
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
i think the bestway is static ip for ip nodes in dispatcher
сб, 13 июл. 2019 г. в 14:10, Amir gheshlaghy@gmail.com:
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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users