Dundi multiple result

Hi All…
I use asterisk 1.6
I have multiple asterisk servers scattered over 3 locations. with 2 * boxes at each location. I have also implemented Dundi to do lookup of extensions. every thing is working fine.
Now i want to implement intelligent routing when i get multiple result from Dundilookup. I want to give more preference to the result or IP which is from the same subnet.
For example i get this result.
asterisk2*CLI> dundi lookup 1234567@priv

  1. 0 IAX2/priv:1EURDzB1rHGtsJV4hhJ4SQ==@172.30.100.11/1234567 (EXISTS)
    
    from 00:15:17:44:ea:24, expires in 5 s
  2. 0 IAX2/priv:mJ8iFaP1TEoECokC4W1xZQ==@172.40.100.11/1234567 (EXISTS)
    
    from 00:15:17:44:aa:34, expires in 5 s
    DUNDi lookup completed in 45 ms
So lets say the Query was from 172.40.100.10, and the above was the dundi result, 
Now i want to  give preference to 172.40.100.11, and so on..

Has any one worked on this before, any pointers Appreciated…

Regards
Nischal…