[Freeswitch-dev] mod_enum and ordering / prefference

jay binks jaybinks at gmail.com
Thu Nov 13 10:40:56 MSK 2014


So im looking over mod_enum in relation to something Im trying to do ( will
discuss later in the email ), and after looking through the code, it seems
the mod_enum does not order the results at all, and it is assumed that ldns
or the DNS server will order the results correctly.

ldns_resolver_query is called, and parse_naptr is called for each result.
parse_naptr parses the result row then calls add_result, which adds it to
the array of enum_record.
( appears to always add it to the end )

Its not that this is failing for me, but this seems to be a little
dangerous and I would have expected FS to interpret the order and
preference values its self.

Can someone else take a look over this for me, and tell me if im wrong.  :)

In addition to this,   I was hoping to find a way to make FS randomly
select a row if the order & preference are identical.

Obviously this would need to be a config value because some people may NOT
want this, but can anyone see any issues here ??   if the order / pref are
identical your already going to run the risk of something jumbling the
order around so you cant rely on the order of your zone file... having FS
randomise this simple means that it will defiantly be random :)

just after some thoughts on this one...

( if you happen to decide to patch the above issue... then consider this
also... otherwise ill attempt a patch for both depending on feedback )
-- 
Sincerely

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20141113/015c0215/attachment.html 


Join us at ClueCon 2014 Aug 4-7, 2014
More information about the FreeSWITCH-dev mailing list