Guest jkukuda Report post Posted 12/12/2007 07:16 AM I want to design an application that does the following. Awnsers the phone and instructs the caller to enter the area code and the phone number. This will be the file name. ie 8137810600.dbf Then I want to instruct the caller to enter his PIN # this is his id in the database. His name may be reflected on more than 1 line of data meaning he has more than one meeting scheduled but I want to text to speech all of his meetings to him. After his meetings are played I want to instruct him to press 1 and I want to write this back to the database to be able to provide a report showing who picked up their schedule. Is my best bet running an external program and passing the parameters to and from that program or would I be better off connecting to the database with vg and odbc and using sql I am also confused about variables in vg how are they created and passed What example would show me this? Share this post Link to post
SupportTeam Report post Posted 12/12/2007 08:11 AM Is my best bet running an external program and passing the parameters to and from that program or would I be better off connecting to the database with vg and odbc and using sqlJust query the database directly form VoiceGuide. The DB Query module will return all of the retrieved rows and create an individual Result Variable for each data item retrieved. Then you can loop through the retrieved data items, speaking them all back. Have a look at the Help file entries on the Database Query module. Also in the Help file, the page on Evaluate Expression module shows how to setup a simple loop which would let you cycle though the retrieved rows. http://www.voiceguide.com/vghelp/source/html/moddbquery.htm http://www.voiceguide.com/vghelp/source/html/modevalexpr.htm If you still have problems please post the script which you created and indicate with which part of the script you are having problems and we can then assist with getting the script working. Share this post Link to post
Guest meiotic Report post Posted 12/13/2007 12:38 AM HI, Use the database functions no external program is needed - I am not sure why you want many little databases around and would use 1 database with multiple tables, just include the phone number in every table - its not super clean but it works. The huge bonus to you will be at a glance you can tell who is using the system - and can make a web report - showing this data - once the user logs in with their phone number and pin. You can use the built in database function or write your own - using vb script. Our Database is SQL Server so the syntax is a little different but you should get the idea. 'Start NS_2 set vg = CreateObject("VoiceGuide.CommandLink") set cn = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") set cmd = CreateObject("ADODB.Command") cn.Open "Provider=SQLOLEDB;Server=MY-IVR3\xxx;UID=xxx;PWD=xxx;Database=Connect" if cn.State <> 1 then WScript.Quit end if cmd.ActiveConnection = cn cmd.CommandText = "IVR_CALLED_LOG" cmd.CommandType = 4 cmd.Parameters.Refresh cmd.Parameters("@pDNIS").Value = "$RV_DNIS" if "$RV_CIDNUMBER" <>"" then cmd.Parameters("@pPhone").Value = "$RV_CIDNUMBER" else 'phone number not given cmd.Parameters("@pPhone").Value = "1111111111" End if set rs = cmd.Execute 'Default PID = 0 'US PID = "0" if not rs.eof then SID = rs("CallId") CID = rs("Campaign") PID = rs("PostalCode") **************** you could LOOP HERE and build a string for the TTS ETC THEN DO THIS TO CREATE THE VARIABLES. strResultVariables= "[CALLID]{"& sID & "}" & "[CAMP]{"& CID & "}" & "[postAL]{"& PID & "}" 'make sure the returned data does not contain any commas strResultVariables = replace(strResultVariables, ",", "") vg.Run_ResultReturn $RV_LINEID, strResultVariables Good luck. Share this post Link to post
Guest jkukuda Report post Posted 12/13/2007 10:13 AM HI, Use the database functions no external program is needed - I am not sure why you want many little databases around and would use 1 database with multiple tables, just include the phone number in every table - its not super clean but it works. The huge bonus to you will be at a glance you can tell who is using the system - and can make a web report - showing this data - once the user logs in with their phone number and pin. You can use the built in database function or write your own - using vb script. Our Database is SQL Server so the syntax is a little different but you should get the idea. 'Start NS_2 set vg = CreateObject("VoiceGuide.CommandLink") set cn = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") set cmd = CreateObject("ADODB.Command") cn.Open "Provider=SQLOLEDB;Server=MY-IVR3\xxx;UID=xxx;PWD=xxx;Database=Connect" if cn.State <> 1 then WScript.Quit end if cmd.ActiveConnection = cn cmd.CommandText = "IVR_CALLED_LOG" cmd.CommandType = 4 cmd.Parameters.Refresh cmd.Parameters("@pDNIS").Value = "$RV_DNIS" if "$RV_CIDNUMBER" <>"" then cmd.Parameters("@pPhone").Value = "$RV_CIDNUMBER" else 'phone number not given cmd.Parameters("@pPhone").Value = "1111111111" End if set rs = cmd.Execute 'Default PID = 0 'US PID = "0" if not rs.eof then SID = rs("CallId") CID = rs("Campaign") PID = rs("PostalCode") **************** you could LOOP HERE and build a string for the TTS ETC THEN DO THIS TO CREATE THE VARIABLES. strResultVariables= "[CALLID]{"& sID & "}" & "[CAMP]{"& CID & "}" & "[postAL]{"& PID & "}" 'make sure the returned data does not contain any commas strResultVariables = replace(strResultVariables, ",", "") vg.Run_ResultReturn $RV_LINEID, strResultVariables Good luck. Share this post Link to post