On ons, feb 24, 2016 at 04:49:01 +0100, Stanislav Sinyagin wrote:
You can use mod_xml_curl for this. Every time FS receives a REGISTER message from the user, it would retrieve a piece of XML from your application HTTP service. As these requests need to be answered quite quickly, you would rather install the HTTP server in the same location as FreeSWITCH. Also keep in mind that every call to "user_data" function would trigger an extra HTTP request for the user's XML. The function is quite convenient if you want to get some user-specific parameters from the directory.
Then it's up to you how you synchronize the back-end databases. Probably something like https://ipfs.io/ would help.
Each successful registration generates an event (if I'm not mistaken), and an entry in FreeSWITCH's own database. So, you should be able to retrieve the IP address of the FreeSWITCH server where the user got registered.
Alternatively, you may have one Kamailio cluster in one location of the world, acting as a SIP registrar. A 250ms round-trip delay is not so critical for SIP traffic.
Alternatively, you can have one FreeSWITCH cluster acting as a SIP registrar and call routing engine in media pass-through mode. Then few other FreeSWITCH servers would work as media gateways in different regions.
This needs testing. I would expect that global VoIP carriers like Voxbone have better control on their bandwidth and transport networks.
Thanks Stanislav for your suggestions. I think the idea with a Kamailio cluster (or in my case a single box) might be a good fit for my scenario. I'll go read up on that. regards Oivvio