[Home]

Summary:ASTERISK-16250: [patch] udptl parameters differ with and without udptl.conf
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2010-06-16 11:09:15Date Closed:2011-11-07 14:00:15.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) astsvn-udptl-config-no-config-difference.patch
( 1) astsvn-udptl-config-no-config-difference2.patch
Description:Hi,

if you don't have an udptl.conf, you get the range 4500-4599. If you do have one (but without anything in it), you get 4500-4999.

This is inconsistent and confusing.

The supplied patch fixes:
(1) That you get 4500-4999 even if you do not have an udptl.conf.
(2) Re-orders the use_even_ports check so you can't supply the range 1235-1236 and get 1236-1235, which will probably lead to funny results.

I've patched SVN-trunk, but 1.6.2.8 is also "affected".

Regards,
Walter Doekes
OSSO B.V.
Comments:By: Walter Doekes (wdoekes) 2010-06-17 03:19:05

Bah. 'Twas late. 1235-1236 becomes 1236-1236 which is perfectly valid according to other parts of the source. Except that the "udptlstart >= udptlend" check thinks it isn't.

So, the second part of the patch is still valid. But instead, you may probably want to change "udptlstart >= udptlend" to "udptlstart > udptlend" while leaving it where it is.

By: Leif Madsen (lmadsen) 2010-06-17 13:21:39

I wonder if this is technically a change in behaviour (in regards to the 4500-4599 being changed to 4500-4999).

I wonder if it would make more sense to make it so having a blank udptl.conf file actually gives you 4500-4599 as well. If someone has made this work without a udptl.conf file, then we may break something for them, but the chances of someone having a udptl.conf which is blank is much less likely. If the udptl.conf file exists, it will more likely define a range than not.

Thoughts?

By: Walter Doekes (wdoekes) 2010-06-17 13:50:35

I suppose you're right in that it's a minor change in behaviour.

But, speaking for myself, I would've preferred the larger range as default. I try to keep the configuration files to a minimum and only add them when needed. The default range of 100 is disappointingly low in comparison to the default RTP range. And, the smallness caused me to run out of udptl socket and run into the crash fixed by http://svnview.digium.com/svn/asterisk?revision=266293&view=revision .

By: Paul Belanger (pabelanger) 2010-06-18 10:29:49

Since the .config files default udptlend=4999, but we warning about the port ranges and default back to udptlend=4999.  I would say, the default value in source (static int udptlend = 4599) is actually a typo.

However, since we already have systems in the field we need to figure out how to handle it.

By: Leif Madsen (lmadsen) 2010-06-23 14:21:03

Then I'd suggest we update the range in trunk to 4999 and make the range match int he configuration file, and in 1.6.2 to make the configuration file match the 4599 (along with it acting the same for both branches respective of the above description)