Hello list, I'm trying to implement a flexible, but easy to administer IVR system for our multi-tenant PBX. My goal is to be able to build a flexible auto-attendent scheme for incoming calls, based on data in a mysql database. The functionality I need is: -Different options based on time of day -Playback of 1-2 audio files while listening for digits (Thank you for calling abc company) -Single digit options set some variables, then transfer to a defined extension (press 1 for sales) -Multi-digit options are checked against a pattern, then a transfer is executed (enter the extension now ...) Not very complicated, I know, but making it scale is tricky. I have tried LUA, but LuaSQL has issues. Even using ODBC, I still get memory leaks and random errors with file handles etc. For the most part, I haven't had any issues with xml_curl getting config from another server that generates it with PHP. I'm exploring this, but it looks like I'll have to implement the following logic: -Call comes in, and a dialplan is returned that plays the greetings, sets some variables, and does a play_and_get_digits, followed by a transfer back to the dialplan, so we can figure out what to do based on the digits. -The callback to the dialplan evaluates the dtmf presented, and decides what action to take, returning that in another dialplan piece. I think this could work. but it means that a dialplan lookup has to be done each time someone makes a selection. Is there a better way, or does that make the most sense? Thanks! -Tim