Guest Frank Report post Posted 05/12/2004 01:43 PM Please respond to those questions. Don't transfer me to help link. I have a couple of questions regarding CIDNUMBER and CIDNAME. How do I access caller? wkSheet.Cells(y-1, iColumn+1) = $RV_CIDNUMBER or wkSheet.Cells(y-1, iColumn+1) = $RV[CIDNUMBER] What if $RV_CIDNUMBER is empty. What kind of value do I get when I try to access $RV_CIDNUMBER but I don't have caller ID activated through my phone provider. Is it even possible? I tried to insert wkSheet.Cells(y-1, iColumn+1) = $RV_CIDNUMBER to my excell sheet but I got "VB Script compilation error". Can I access CIDNUMBER at the "Call Finish" module or I have to access it before that. Thank you Share this post Link to post
SupportTeam Report post Posted 05/12/2004 11:00 PM Please post the entire VoiceGuide script which you are using. $RV_CIDNUMBER is the correct one to use. If no CallerID is available it will be replaced with a blank (empty string). You can use $RV_CIDNUMBER in the "Call Finish" script. Share this post Link to post
Guest Guest Report post Posted 05/12/2004 11:24 PM Error points to dollar sign $ wkSheet.Cells(y-1, iColumn+26) = $RV_CIDNUMBER Version=5.0 DefaultModuleDisplayHeight= StartModule=Script RunAtHangup= StartWithoutAnswer=0 CtmAsiName= [script] Type=Run VB Script DispSize=69 Txt=Run a VB Script. VbsFileToRun= VbsWait=0 VbScript=Dim xlApp, xlBook, xlSht Dim filename on error resume next filename = "X:\Sport.xls" Set xlApp = CreateObject("Excel.Application") set xlBook = xlApp.WorkBooks.Open(filename) set xlSht = xlApp.activesheet xlApp.DisplayAlerts = False Call GetToFirstItem(xlSht, 1, "ID") 'Call GetToFirstItem(Sheets("Sheet1"), 1, "ID") xlBook.Save xlBook.Close SaveChanges=True xlApp.Close xlApp.Quit 'always deallocate after use... set xlSht = Nothing Set xlBook = Nothing Set xlApp = Nothing Sub GetToFirstItem(wkSheet, iColumn, ColumnStartCaption) wkSheet.Select 'Range(iColumn & "1").Select 'wkSheet.Range("A1").Select y = 0 Dim temp Do Until temp = ColumnStartCaption y = y + 1 temp = wkSheet.Cells(y, iColumn) Loop y = y + 1 temp = wkSheet.Cells(y, iColumn) Do Until temp = "" y = y + 1 temp = wkSheet.Cells(y, iColumn) Loop wkSheet.Cells(y-1, iColumn+2).NumberFormat = "h:mm:ss;@" wkSheet.Cells(y-1, iColumn+2) = Hour(Now) & ":" & Minute(Now) & ":" & Second(Now) wkSheet.Cells(y-1, iColumn+26) = $RV_CIDNUMBER wkSheet.Cells(y-1, iColumn+27) = $RV_CIDNAME End Sub VbsHoldPlay= on {success} gosub [X:\Email.vgs|Evaluate] on {fail} gosub [X:\Email.vgs|Evaluate] on {timeout 0} gosub [X:\Email.vgs|Evaluate] Position=100,49 [Phone Message] Type=Phone Message DispSize=69 Txt=Schedule a call to be made to a telephone number and run a VG script when the phone is answered. sDialPhone0=7565128 sDialWelc0= sDialScript0=X:\Echo.vgs sDialVariables0= sDialLineSelection0= sDialRetry0=0 sDialDelay 0=0 sDialPhone1= sDialWelc1= sDialScript1= sDialVariables1= sDialLineSelection1= sDialRetry1=2 sDialDelay 1=5 sDialPhone2= sDialWelc2= sDialScript2= sDialVariables2= sDialLineSelection2= sDialRetry2=2 sDialDelay 2=5 Position=113,185 Share this post Link to post
Guest Frank Report post Posted 05/12/2004 11:28 PM Log File 182650.02 5 linedevstate 2048 0 0 182650.02 5 callstate OFFERING 65965 0 4 182650.02 5 Answer the call at 5/12/2004 6:26:50 PM 182650.03 5 lineAnswer(65965) => 66136 182650.03 5 callinfo CALLEDID 182650.03 5 callinfo ORIGIN 182650.03 5 ring 0 182650.56 5 callstate CONNECTED 65965,1,0 182650.56 5 WorkingModeTAPI@Connected= 182650.56 5 WorkingModeScript@Connected= 182650.59 5 Inband detection not enabled 182650.59 5 StartLoadedVgs at 5/12/2004 6:26:50 PM 182650.59 5 AddRVns [scriptsPath]{X:\} 182650.59 5 rv add [$RV_STARTTIME]{5/12/2004 6:26:50 PM} 182650.59 5 rv add [$RV_DEVICEID]{5} 182650.59 5 rv add [$RV_CIDNAME]{} 182650.59 5 AddRVns [PathApp]{C:\Program Files\VoiceGuide\} 182650.59 5 rv add [$RV_CIDNUMBER]{} 182650.61 5 tapi Reply (LineEvReply) ok 66136 0 182650.61 5 callinfo MONITORMODES 182650.61 5 TimeoutClear 182650.61 5 [Play 1] Playing 182650.61 5 [Play 1] Playing (1\Welcome.wav) 182650.63 5 PlaySoundStart ok [X:\1\Welcome.wav] 182650.63 5 TimeoutClear 182650.63 5 RunModule PLAY end 182650.63 5 wa(2980,16129600) 182650.63 5 callinfo MONITORMODES 182653.63 5 wb(16129600) 182653.67 5 Play End line[5] (id=161296) 182653.67 5 ScriptEventCode 8001 iLineState=1100 182653.67 5 LsPlayMsg EV_PLAY_FINISHED 182653.67 5 TimeoutSet 10 EV_TIMEOUT_HANGUP 182653.67 5 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 182653.67 5 ScriptEventCode 9002 iLineState=1101 182653.67 5 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 182653.67 5 TimeoutClear 182653.69 5 [Job_Offers] Running vb script:[X:\CallFinishScript.vgs] 182727.11 0 Script Load X:\CallFinishScript.vgs 182727.11 5 Loaded VbsAtHangup into:2 182727.11 5 tapi Reply (LineEvReply) ok 66017 0 182727.11 5 TimeoutClear 182727.11 5 [script] Running VB Script... 182727.11 5 RVreplace start (strlen>500) 182727.11 5 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[scriptsPath]{X:\}[$RV_STARTTIME]{5/12/2004 6:26:50 PM}[$RV_DEVICEID]{5}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Job_Offers]{False}[Hangup Time]{5/12/2004 6:27:27 PM} 182727.13 5 VBScript Run continuing... 182727.13 5 stack idx=1 182727.13 5 rv add [scriptStart_Time]{5/12/2004 6:27:27 PM} 182727.13 5 rv add [scriptStart_CalledFrom_Script]{X:\CallFinishScript.vgs} 182727.13 5 rv add [scriptStart_CalledFrom_Module]{Script} 182727.13 0 Script Load X:\Email.vgs 182727.14 5 Loaded X:\Email.vgs into:3 182727.16 5 AddRVns [scriptsPath]{X:\} 182727.16 5 TimeoutClear 182727.16 5 [Evaluate] Evaluate [(($RV_HOUR >= 12) and ($RV_HOUR <= 13) and ($RV_MINUTE >= 00) and ($RV_MINUTE <= 30)) or(($RV_HOUR >= 20) and ($RV_HOUR <= 22))] 182727.16 5 RVreplace start: [(($RV_HOUR >= 12) and ($RV_HOUR <= 13) and ($RV_MINUTE >= 00) and ($RV_MINUTE <= 30)) or(($RV_HOUR >= 20) and ($RV_HOUR <= 22))] 182727.16 5 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[scriptsPath]{X:\}[$RV_STARTTIME]{5/12/2004 6:26:50 PM}[$RV_DEVICEID]{5}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Job_Offers]{False}[Hangup Time]{5/12/2004 6:27:27 PM}[scriptStart_Time]{5/12/2004 6:27:27 PM}[scriptStart_CalledFrom_Script]{X:\CallFinishScript.vgs}[scriptStart_CalledFrom_Module]{Script}[scriptsPath]{X \} 182727.16 5 RVreplace end: [((18 >= 12) and (18 <= 13) and (27 >= 00) and (27 <= 30)) or((18 >= 20) and (18 <= 22))] 182727.16 5 .Eval(((18 >= 12) and (18 <= 13) and (27 >= 00) and (27 <= 30)) or((18 >= 20) and (18 <= 22))) 182727.16 5 AddRVns [Evaluate_Input]{((18 >= 12) and (18 <= 13) and (27 >= 00) and (27 <= 30)) or((18 >= 20) and (18 <= 22))} 182727.16 5 AddRVns [Evaluate]{False} 182727.16 5 Eval Expr result:[False] 182727.16 5 path {False} not found 182727.16 5 rv add [Hangup Time]{5/12/2004 6:27:27 PM} 182727.16 5 Hanging up call... [No path (False) to next module defined.] 182727.16 5 HangupCall_Common Mode=AfterHangupRun 182727.16 5 ReinitTelephony due to IDLE 182727.17 5 tapic lineDeallocateCall(MainCall:65965) 0 182727.31 5 lineOpen(5)=> 182727.31 5 Waiting for a call... 182727.31 5 LineHandle=66051 182727.31 5 TimeoutSet 3 EV_TIMEOUT_ATERIDLE_ALLOWOUT 182730.48 5 Timer fired EV_TIMEOUT_ATERIDLE_ALLOWOUT 182730.48 5 ScriptEventCode 9013 iLineState=900 Share this post Link to post
SupportTeam Report post Posted 05/13/2004 01:32 AM Have you tried using quotes around the values you are trying to assign the Excel's cells ? ie: change: wkSheet.Cells(y-1, iColumn+26) = $RV_CIDNUMBER wkSheet.Cells(y-1, iColumn+27) = $RV_CIDNAME to: wkSheet.Cells(y-1, iColumn+26) = "$RV_CIDNUMBER" wkSheet.Cells(y-1, iColumn+27) = "$RV_CIDNAME" see the example from the VG help file: http://www.voiceguide.com/vghelp/html/modVbs.htm Also I notice from the trace (which btw is not from the posted script...) that you are using an Evaluate Expression module to do Time of day based switching - You may want to look at version 5.2 of VG - there is a "Time Switch" module available in that version. Share this post Link to post