<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
<style>BODY{font:10pt Tahoma, Verdana, sans-serif}</style></head><body>
<DIV>Just from my experence, it's a lot easier to write the whole logic, for a complex IVR in something (lua, perl, python, C#, F#) or anything else that FS supports, rather then trying to cram it in to the simple IVR application. Remember you can do foreign DB access or talk to anything else (web service, raw http service, etc...) from any of the languages directly.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I do almost all external interaction with C# modules, runnig inside of FS. Makes life real easy :)</DIV>
<DIV>&nbsp;</DIV>
<DIV>--Dave</DIV><BR>
<BLOCKQUOTE style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<HR>
<B>From:</B> Brian Foster [mailto:bdfoster@davri.com]<BR><B>To:</B> FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org]<BR><B>Sent:</B> Sat, 18 May 2013 09:49:59 -0700<BR><B>Subject:</B> Re: [Freeswitch-users] Complex IVRs using data from MySQL<BR><BR>
<P>Whether or not you hand it back to mod_ivr or not, to set a channel variable in Lua:</P>
<P>session:setVariable("varname", "varvalue");</P>
<P>This has the same effect as using the set application in the dialplan:</P>
<P>&lt;action application="set" data="varname=varvalue"/&gt;</P>
<P>You can read the variable in Lua like this:</P>
<P>varname = session:getVariable("varname");</P>
<P>-BDF</P>
<DIV class=gmail_quote>On May 18, 2013 12:35 PM, "Telecube - John" &lt;<A href="mailto:john@telecube.com.au">john@telecube.com.au</A>&gt; wrote:<BR type="attribution">
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>Ok, if someone could point me in the right direction I would be very<BR>grateful.<BR><BR>I need to integrate database lookups into multi level IVRs to gather<BR>call routing info.<BR><BR>The lookups are for variable multi digit keypress data as well as<BR>multiple sets of routing information.<BR><BR>So far I can see my options are xml_curl or hand the call off to a lua<BR>script to handle the processing.<BR><BR>I can catch the multi digit keypresses with regex and give that detail<BR>to a lua script, no problem.<BR><BR>I'm hoping to be able to use the mod_ivr process as much as possible but<BR>I'm struggling to see how I can get data back into the call flow after<BR>dishing the duty off to lua.<BR><BR>Can anyone point me down the right path please?<BR><BR>Should I be happy to pass it off to lua and finish the lookups and<BR>routing in there?<BR><BR>Should I try to keep as much as possible in the core ivr?<BR><BR>Thanks..<BR><BR>- John<BR><BR>_________________________________________________________________________<BR>Professional FreeSWITCH Consulting Services:<BR><A href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</A><BR><A href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</A><BR><BR>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR><A href="http://www.cudatel.com/">http://www.cudatel.com</A><BR><BR>Official FreeSWITCH Sites<BR><A href="http://www.freeswitch.org/">http://www.freeswitch.org</A><BR><A href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org</A><BR><A href="http://www.cluecon.com/">http://www.cluecon.com</A><BR><BR>FreeSWITCH-users mailing list<BR><A href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/">http://www.freeswitch.org</A><BR></BLOCKQUOTE></DIV></BLOCKQUOTE>
<STYLE>
</STYLE>

<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></body></html>