[Freeswitch-users] Mod LCR SQL sub-query for better routing

Victor Chukalovskiy victor.chukalovskiy at gmail.com
Thu Dec 12 22:42:10 MSK 2013


Hello,

For those interested, I added a piece to mod lcr wiki. It makes sorting 
/ routing logic better than default logic:

http://wiki.freeswitch.org/wiki/Mod_lcr#Custom_SQL_with_sub-query_-_for_real-life_ratesheet_complexities

Why it helps:

Rates rates can often be given both on per-NPA or per-NPANXX level 
depending on the carrier and on the NPA. Moreover, some carriers may 
have NPANXX rate lower than the corresponding NPA rate, while others 
will have it inverse. Neither simple ORDER BY rate, prefix; nor ORDER BY 
prefix, rate; give the truly cheapest route. The LCR logic should be 
two-step process to accommodate this.

Cheers,
-Victor






Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list