FS may be able to talk directly to LDAP for what you want to do.
There is a “mod_xml_ldap” although I have not been able to find much documentation for it.
You can find configuration example in bug comments - https://jira.freeswitch.org/browse/FS-4870 - but it is closed for now, so this implementation must works out of box. I use this patch from early versions and all works fine :)
I see in “src/mod/xml_int/mod_xml_ldap” there is an example LDAP schema "fsv2.schema” and the aptly named “reallyconfusingslapcat”. From these examples, it looks like the approach was to mirror the XML structure you need to return in the LDAP directory.
This implementation was the reason to rewrite LDAP support in patch above to support entries with objectClass=person and telephoneNumber/userPassword attributes. -- WBR, Eugene Prokopiev