[OpenSIPS-Users] Calculate the nearest destination based on GeoIP

Dmitry netaskd at gmail.com
Wed Mar 20 05:59:30 EDT 2019


Hi there,
Maybe you know the best way to calculate the nearest routing point based on geoip data?
an example:
I have 3 rtpengine relays on a different country, and I can set its geo-coordinate in DB and set id for each of them via rtpengine_use_set() function in the routing script.
Also, I have goip lookup via mmg_lookup() function that can give me a coordinate a caller by IP address.
A caller comes from the country that _doesn't have_ rtpengine relay and I need to calculate the nearest rtpengine id for set it as prefer based on its IP address
Any advice is appreciated.
Thanks








More information about the Users mailing list