[SR-Users] Understanding DNS resolution done by Kamailio

Daniel-Constantin Mierla miconda at gmail.com
Fri Aug 1 08:45:58 CEST 2014


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 at lists.sip-router.org
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140801/0ca4dcc7/attachment.html>


More information about the sr-users mailing list