[Kamailio-Users] Kamalio 1.4.2 rev_dns=no

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 30 11:41:56 CET 2008


Hello,

On 10/30/08 03:50, Michael Young wrote:
> Reopening an old issue from May -- I installed 1.4.2 from SVN and have the
> reverse DNS lookups going again, even though dns=no and rev_dns=no.
>
> Was there a syntax change in the config file?
>
> Daniel, you were correct that "somewhere in the script you do an IP
> comparison (by src_ip or so) and you have the IP address in between quotes"
> -- I have one carrier who insists on sending ";npdi=yes" in the user portion
> of the URI:
>
> INVITE sip:+1303XXXXXXXX;npdi=yes at 4.X.X.X:5060
>
> And that blows up ENUM lookups (or at least it did in version 1.3). So I
> have in my config a block like this:
>
> if (src_ip=~".*1\.2\.3\.") {
>        strip_tail(9);
>        xlog("L_INFO", "NOTICE: Stripped npdi because carrier X is stupid:
> new URI $ru\n");
> }
>   

you can check if the npdi is in the username part of the R-URI and 
remove it from there, it will work all the time, not only if the request 
comes from some IP range.

if(uri=~";npdi =yes@")


You can then use strip or transformations to do that:

http://www.kamailio.org/dokuwiki/doku.php/transformations:1.4.x

Cheers,
Daniel

> Maybe there is a better way to do this so I am not searching by src_ip?
>
> Michael Young
> (IP addresses have been changed\munged to protect the guilty)
>
>
> -----Original Message-----
> From: Daniel-Constantin Mierla [mailto:miconda at gmail.com] 
> Sent: Sunday, May 18, 2008 4:08 PM
> To: Michael Young
> Cc: users at lists.openser.org
> Subject: Re: [OpenSER-Users] Openser 1.3.2 rev_dns=no
>
> Hello,
>
> please try the attached patch (is for devel but should apply on 1.3.2, if
> no, let me know and I send you another). Similar issue was reported to me
> some time ago, started to investigate but at some point I forgot about. I
> think you face the same case: somewhere in the script you do an IP
> comparison (by src_ip or so) and you have the IP address in between quotes.
> The patch fixed the reverse dns in this case if rev_dns=no. I will look more
> into it to find a better solution -- detecting if the value is an IP address
> and avoid DNS lookup, a.s.o, for IP comparisons.
>
> Let me know the results.
>
> Cheers,
> Daniel
>
>
> On 05/18/08 22:12, Michael Young wrote:
>   
>> Here is why I ask:
>>
>> [root at proxy2 openser]# netstat -su
>> Udp:
>>     159293 packets received
>>     2016 packets to unknown port received.
>>     153899 packet receive errors
>>     185342 packets sent
>>
>> On my proxies, as traffic levels increase, I start getting udp errors, 
>> which I think is pretty much a udp buffer overflow. Once it overflows, 
>> that proxy is toast until traffic levels die down. I have a pretty 
>> basic config, but I can't seem to handle more than 4 or 5 new calls 
>> per second. I would expect to be able to do a lot more than that. So I 
>> was trying to make sure that no unnecessary udp traffic was going in or
>>     
> out.
>   
>> The server has two Dual Core Opteron processors, 4 Gb of RAM, running 
>> CentOS
>> 5 x86_64.
>>
>> Any suggestions are appreciated... and I'll happily pay for consulting 
>> if someone wants to look into it.
>>
>> Michael
>>
>>
>> -----Original Message-----
>> From: users-bounces at lists.openser.org
>> [mailto:users-bounces at lists.openser.org] On Behalf Of Michael Young
>> Sent: Friday, May 16, 2008 9:20 PM
>> To: users at lists.openser.org
>> Subject: [OpenSER-Users] Openser 1.3.2 rev_dns=no
>>
>> In my openser.cfg (running 1.3.2), I have:
>>
>> dns=no
>> rev_dns=no
>>
>> but a packet capture shows OpenSER doing a reverse DNS lookup on my 
>> provider's proxy IP address with every invite. Are those lines no 
>> longer supported? I tried starting OpenSER with -R, but same behavior.
>>
>> Michael Young
>>
>>
>> No virus found in this outgoing message.
>> Checked by AVG. 
>> Version: 7.5.524 / Virus Database: 269.23.16/1446 - Release Date: 
>> 5/16/2008
>> 7:42 AM
>>  
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.openser.org
>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>
>> No virus found in this incoming message.
>> Checked by AVG. 
>> Version: 7.5.524 / Virus Database: 269.23.16/1446 - Release Date: 
>> 5/16/2008
>> 7:42 AM
>>  
>>
>> No virus found in this outgoing message.
>> Checked by AVG. 
>> Version: 7.5.524 / Virus Database: 269.23.20/1453 - Release Date: 
>> 5/18/2008
>> 9:31 AM
>>  
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.openser.org
>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>   
>>     
>
> --
> http://www.asipto.com
>
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 7.5.524 / Virus Database: 269.23.20/1453 - Release Date: 5/18/2008
> 9:31 AM
>  
>   
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list