Discussion:
[SR-Users] Understanding DNS resolution done by Kamailio
Igor Potjevlesch
2014-07-29 12:31:28 UTC
Permalink
Hello,



I'm using Kamailio 4.1 and I'm wondering how to avoid external DNS
resolution.

I have the following config:

dns_cache_init=no

use_dns_cache=no

dns=no

rev_dns=no



Even with this config, I have many and many DNS query on SRV _sip for the
hostnames set in carrierroute module.

These requests are not useful because the A resolution is done by
/etc/hosts.



Major problem with this, is that when I have a DNS issue or IP transit
issue, Kamailio waits for resolution timeout and becomes overloaded. As a
consequence, Kamailio can't treat others SIP requests like REGISTER because
he stuck in DNS resolution.



Regards,



Igor.
Daniel-Constantin Mierla
2014-08-01 06:45:58 UTC
Permalink
Hello,

I don't think there is a way to disable dns for outgoing uri resolving,
if you want disabling all dns.

The dns timeout is can be configured at the operating system level.

To avoid the sip worker blocking, you can try:

a) look at $nh(d) and if it is not an IP, then you can use async_route()
(async_task_route() would be better, but now only in devel) or
mqueue+rtimer to pass the relaying of the request to another worker process

b) and an intermediary proxy, so you send the requests with FQDN to it
and it will return back to the proxy. You can send the dst-uri via some
custom headers. This would be like:

[ua1] <===> [kamailio main] <===> [kamailio dns] <===> [kamailio main]
<===> [ua2]

kamailio dns should not do record routing, because requests within
dialog should have IP addresses.

Cheers,
Daniel
Post by Igor Potjevlesch
Hello,
I’m using Kamailio 4.1 and I’m wondering how to avoid external DNS
resolution.
dns_cache_init=no
use_dns_cache=no
dns=no
rev_dns=no
Even with this config, I have many and many DNS query on SRV _sip for
the hostnames set in carrierroute module.
These requests are not useful because the A resolution is done by
/etc/hosts.
Major problem with this, is that when I have a DNS issue or IP transit
issue, Kamailio waits for resolution timeout and becomes overloaded.
As a consequence, Kamailio can’t treat others SIP requests like
REGISTER because he stuck in DNS resolution.
Regards,
Igor.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Igor Potjevlesch
2014-08-04 12:20:57 UTC
Permalink
Hello Daniel,

Thank you. If I use the resolver included in Kamailio and if the response
from the resolver is negative, is there a new DNS request sent for outgoing
uri resolution?
If not, that would mitigate the volume of DNS requests sent.

Regards,

Igor.

De : sr-users-bounces-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org
[mailto:sr-users-bounces-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org] De la part de
Daniel-Constantin Mierla
Envoyé : vendredi 1 août 2014 08:46
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] Understanding DNS resolution done by Kamailio

Hello,

I don't think there is a way to disable dns for outgoing uri resolving, if
you want disabling all dns.

The dns timeout is can be configured at the operating system level.

To avoid the sip worker blocking, you can try:

a) look at $nh(d) and if it is not an IP, then you can use async_route()
(async_task_route() would be better, but now only in devel) or mqueue+rtimer
to pass the relaying of the request to another worker process

b) and an intermediary proxy, so you send the requests with FQDN to it and
it will return back to the proxy. You can send the dst-uri via some custom
headers. This would be like:

[ua1] <===> [kamailio main] <===> [kamailio dns] <===> [kamailio main] <===>
[ua2]

kamailio dns should not do record routing, because requests within dialog
should have IP addresses.

Cheers,
Daniel
On 29/07/14 14:31, Igor Potjevlesch wrote:
Hello,

I’m using Kamailio 4.1 and I’m wondering how to avoid external DNS
resolution.
I have the following config:
dns_cache_init=no
use_dns_cache=no
dns=no
rev_dns=no

Even with this config, I have many and many DNS query on SRV _sip for the
hostnames set in carrierroute module.
These requests are not useful because the A resolution is done by
/etc/hosts.

Major problem with this, is that when I have a DNS issue or IP transit
issue, Kamailio waits for resolution timeout and becomes overloaded. As a
consequence, Kamailio can’t treat others SIP requests like REGISTER because
he stuck in DNS resolution.

Regards,

Igor.




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<mailto:sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org> sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org
<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - <http://www.asipto.com> http://www.asipto.com
<http://twitter.com/#!/miconda> http://twitter.com/#!/miconda -
<http://www.linkedin.com/in/miconda> http://www.linkedin.com/in/miconda
Daniel-Constantin Mierla
2014-08-04 14:17:31 UTC
Permalink
Hello,
Post by Igor Potjevlesch
Hello Daniel,
Thank you. If I use the resolver included in Kamailio and if the
response from the resolver is negative, is there a new DNS request
sent for outgoing uri resolution?
it should not be any other dns request -- it will fail sending.

Cheers,
Daniel
Post by Igor Potjevlesch
If not, that would mitigate the volume of DNS requests sent.
Regards,
Igor.
Daniel-Constantin Mierla
*Envoyé :* vendredi 1 août 2014 08:46
*À :* Kamailio (SER) - Users Mailing List
*Objet :* Re: [SR-Users] Understanding DNS resolution done by Kamailio
Hello,
I don't think there is a way to disable dns for outgoing uri
resolving, if you want disabling all dns.
The dns timeout is can be configured at the operating system level.
a) look at $nh(d) and if it is not an IP, then you can use
async_route() (async_task_route() would be better, but now only in
devel) or mqueue+rtimer to pass the relaying of the request to another
worker process
b) and an intermediary proxy, so you send the requests with FQDN to it
and it will return back to the proxy. You can send the dst-uri via
[ua1] <===> [kamailio main] <===> [kamailio dns] <===> [kamailio main]
<===> [ua2]
kamailio dns should not do record routing, because requests within
dialog should have IP addresses.
Cheers,
Daniel
Hello,
I’m using Kamailio 4.1 and I’m wondering how to avoid external DNS
resolution.
dns_cache_init=no
use_dns_cache=no
dns=no
rev_dns=no
Even with this config, I have many and many DNS query on SRV _sip
for the hostnames set in carrierroute module.
These requests are not useful because the A resolution is done by
/etc/hosts.
Major problem with this, is that when I have a DNS issue or IP
transit issue, Kamailio waits for resolution timeout and becomes
overloaded. As a consequence, Kamailio can’t treat others SIP
requests like REGISTER because he stuck in DNS resolution.
Regards,
Igor.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -http://www.asipto.com
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Igor Potjevlesch
2014-08-05 17:25:33 UTC
Permalink
Hello Daniel,



Sorry, but I’m not sure to understand.

Use the resolver included in Kamailio would be better in that case because
the negative reply coming from outside resolver would be recorded for a
timeperiod? In this timeperiod, no other DNS requests for the same type and
the same host would be generated to the outside resolver? I’m right?



In parallel, you can confirm that the SRV requests cannot be avoided?



Regards,



Igor.



De : Daniel-Constantin Mierla [mailto:miconda-***@public.gmane.org]
Envoyé : lundi 4 août 2014 16:18
À : Igor Potjevlesch; 'Kamailio (SER) - Users Mailing List'
Objet : Re: [SR-Users] Understanding DNS resolution done by Kamailio



Hello,



On 04/08/14 14:20, Igor Potjevlesch wrote:

Hello Daniel,



Thank you. If I use the resolver included in Kamailio and if the response
from the resolver is negative, is there a new DNS request sent for outgoing
uri resolution?


it should not be any other dns request -- it will fail sending.

Cheers,
Daniel




If not, that would mitigate the volume of DNS requests sent.



Regards,



Igor.



De : sr-users-bounces-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org
<mailto:sr-users-bounces-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org>
[mailto:sr-users-bounces-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org] De la part de
Daniel-Constantin Mierla
Envoyé : vendredi 1 août 2014 08:46
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] Understanding DNS resolution done by Kamailio



Hello,

I don't think there is a way to disable dns for outgoing uri resolving, if
you want disabling all dns.

The dns timeout is can be configured at the operating system level.

To avoid the sip worker blocking, you can try:

a) look at $nh(d) and if it is not an IP, then you can use async_route()
(async_task_route() would be better, but now only in devel) or mqueue+rtimer
to pass the relaying of the request to another worker process

b) and an intermediary proxy, so you send the requests with FQDN to it and
it will return back to the proxy. You can send the dst-uri via some custom
headers. This would be like:

[ua1] <===> [kamailio main] <===> [kamailio dns] <===> [kamailio main] <===>
[ua2]

kamailio dns should not do record routing, because requests within dialog
should have IP addresses.

Cheers,
Daniel

On 29/07/14 14:31, Igor Potjevlesch wrote:

Hello,



I’m using Kamailio 4.1 and I’m wondering how to avoid external DNS
resolution.

I have the following config:

dns_cache_init=no

use_dns_cache=no

dns=no

rev_dns=no



Even with this config, I have many and many DNS query on SRV _sip for the
hostnames set in carrierroute module.

These requests are not useful because the A resolution is done by
/etc/hosts.



Major problem with this, is that when I have a DNS issue or IP transit
issue, Kamailio waits for resolution timeout and becomes overloaded. As a
consequence, Kamailio can’t treat others SIP requests like REGISTER because
he stuck in DNS resolution.



Regards,



Igor.






_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org <mailto:sr-users-cR8azDVoa3IcDhw6gZKtMWD2FQJk+8+***@public.gmane.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -
http://www.linkedin.com/in/miconda
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...