Guest Steve Walker Report post Posted 03/22/2004 06:02 PM In using VoiceGuide to allow clients to listen to and approve their radio commercials, I have run into one thing that I can't figure out. I want the caller to enter a 4-digit number to hear their commercial. The commercial plays using a play module. Then the caller can press "1" to approve it or leave a message asking for changes. If the caller leaves a message, it gets sent to the owner of the mailbox, namely the salesperson. BUT if the caller presses "1" to approve the commercial, I want the system to email the salesperson and sales managers a message saying "The commercial with 4-digit code number $RVwelcome (it should insert the mailbox number here) has been approved." In order to do this, the script needs a variable for the mailbox owner's email address since I have so many salespeople. How can I pull the email address for a box owner and insert it into the to: field in the email send module? Thanks, Steve Share this post Link to post
Guest Steve Walker Report post Posted 03/22/2004 06:58 PM I think I found my answer in a previous post which I had overlooked. Here it is.. But when I implemented it, I got this: 125929.23 0 cl Vm_VmbConfig_Get 0001, EmailForward 125929.23 0 cl Script_Return [RetrievedEmailAddress]{my_email_address} 125929.23 0 COM interface not supported in this version. It retreived my email address just fine. What is wrong with my version? Steve Share this post Link to post
SupportTeam Report post Posted 03/23/2004 01:13 AM Are you running a registered version of VoiceGuide? What is the license type? Only Evaluation and Enterprise versions of VG will allow use of COM interface, see: http://www.voiceguide.com/vgFeatures.htm Vm_VmbConfig_Get and Vm_VmbConfig_Set are exceptions - they can be used from Pro version as well... Share this post Link to post
Guest Steve Walker Report post Posted 03/24/2004 05:27 PM I get errors when I run the code referenced above and no email is sent: Script is attached. 111609.89 7 PlaySoundStart ok [C:\Program Files\VoiceGuide\data\Spots\0001.wav] 111609.89 7 TimeoutClear 111609.89 7 RunModule PLAY end 111609.89 7 wa(17285,32069400) 111627.34 7 Play End line[7] (id=320694) 111627.34 7 ScriptEventCode 8001 iLineState=1100 111627.34 7 LsPlayMsg EV_PLAY_FINISHED 111627.34 7 TimeoutSet 10 EV_TIMEOUT_HANGUP 111627.34 7 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 111627.34 7 ScriptEventCode 9002 iLineState=1101 111627.34 7 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 111627.34 7 TimeoutClear 111627.34 7 [Run VB Script] Running VB Script... 111627.34 7 RVreplace start: [set vg = CreateObject("VoiceGuide.CommandLink") sEmailAddr = vg.Vm_VmbConfig_Get("$RV[Welcome]", "EmailForward") vg.Script_Return iLineId, "[RetrievedEmailAddress]{" & sEmailAddr & "}" set vg = Nothing ] 111627.34 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/24/2004 11:16:00 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success} 111627.36 7 VBScript Run continuing... 111627.36 7 TimeoutClear 111627.36 7 [PlayApproveReq] Playing 111627.36 7 [PlayApproveReq] Playing (SPOTMAIL VO-options 4 beep.wav) 111627.91 7 PlaySoundStart ok [C:\Program Files\VoiceGuide\Scripts\SpotMail\SPOTMAIL VO-options 4 beep.wav] 111627.91 7 TimeoutClear 111627.91 7 RunModule PLAY end 111627.91 7 wa(11062,33872000) 111627.93 0 cl Vm_VmbConfig_Get 0001, EmailForward 111627.93 0 cl Script_Return [RetrievedEmailAddress]{swalker@radio-one.com} 111627.93 0 cl no active call on line. 111639.15 7 Play End line[7] (id=338720) 111639.15 7 ScriptEventCode 8001 iLineState=1100 111639.15 7 LsPlayMsg EV_PLAY_FINISHED 111639.15 7 TimeoutSet 5 EV_TIMEOUT_REPLAYMSG 111641.61 7 dtmf 1 (65539,49,2) 111641.61 7 ScriptEventCode 49 iLineState=1101 111641.61 7 LsPlayMsgFinished 1 111641.61 7 RVreplace start: [on {2} goto [Voicemail Box $rv[welcome]] on {3} goto [PlaySpot] on {timeout 0} goto [Welcome] on {1} goto [send Email] ] 111641.61 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/24/2004 11:16:00 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success} 111641.61 7 rv add [PlayApproveReq]{1} 111641.61 7 TimeoutClear 111641.61 7 [send Email] Send Email 111641.63 7 RVreplace start: [$RV[RetrievedEmailAddress]] 111641.63 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/24/2004 11:16:00 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success}[PlayApproveReq]{ } 111641.63 7 RVreplace end: [] 111641.63 7 RVreplace start: [spot $rv[welcome] has been approved] 111641.63 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/24/2004 11:16:00 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success}[PlayApproveReq]{ } 111641.63 7 RVreplace end: [spot 0001 has been approved] 111641.63 7 RVreplace start: [spot $rv[welcome] has been approved] 111641.63 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/24/2004 11:16:00 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success}[PlayApproveReq]{ } 111641.63 7 RVreplace end: [spot 0001 has been approved] 111641.63 7 rv add [send Email]{} 111641.63 7 rv add [send Email_Subject]{Spot 0001 has been approved} 111641.63 7 rv add [send Email_Message]{Spot 0001 has been approved} 111641.63 7 rv add [send Email_Attachment]{} 111641.63 7 rv add [send Email_Cc]{} 111641.63 7 rv add [send Email_Bcc]{} 111641.64 7 Que email to: 111641.64 7 rv add [send Email_SendResult]{OK} 111641.64 7 TimeoutClear 111641.64 7 [Ack Approval] Playing 111641.64 7 [Ack Approval] Playing (SPOTMAIL VO-approve -end.wav) 111642.18 7 PlaySoundStart ok [C:\Program Files\VoiceGuide\Scripts\SpotMail\SPOTMAIL VO-approve -end.wav] 111642.18 7 TimeoutClear 111642.18 7 RunModule PLAY end 111642.18 7 wa(3544,35299000) 111645.90 7 Play End line[7] (id=352990) 111645.90 7 ScriptEventCode 8001 iLineState=1100 111645.90 7 LsPlayMsg EV_PLAY_FINISHED 111645.90 7 TimeoutSet 10 EV_TIMEOUT_HANGUP 111645.90 7 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 111645.90 7 ScriptEventCode 9002 iLineState=1101 111645.90 7 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 111645.90 7 TimeoutClear 111645.90 7 rv add [Hangup Time]{3/24/2004 11:16:45 AM} 111645.90 7 Hanging up call... [Hangup Module] Share this post Link to post
Guest Steve Walker Report post Posted 03/24/2004 05:29 PM Script didn't attach....here it is. Spotmail.vgs Share this post Link to post
SupportTeam Report post Posted 03/24/2004 11:44 PM The problem is with the VB Script not returning the information to the same line.. In: set vg = CreateObject("VoiceGuide.CommandLink") sEmailAddr = vg.Vm_VmbConfig_Get("$RV[Welcome]", "EmailForward") vg.Script_Return iLineId, "[RetrievedEmailAddress]{" & sEmailAddr & "}" set vg = Nothing the: vg.Script_Return iLineId, "[RetrievedEmailAddress]{" & sEmailAddr & "}" should be: vg.Script_Return $RV_LINEID, "[RetrievedEmailAddress]{" & sEmailAddr & "}" (or you should set iLineId=$RV_LINEID ) otherwise you can see in the trace that the result is being returned to an unknown line: 111627.93 0 cl Script_Return [RetrievedEmailAddress]{swalker@radio-one.com} 111627.93 0 cl no active call on line. and not to the correct line, resulting in $RV[RetrievedEmailAddress] being undefined on that line : 111641.63 7 RVreplace start: [$RV[RetrievedEmailAddress]] 111641.63 7 RVreplace end: [] Share this post Link to post
Guest Steve Walker Report post Posted 03/25/2004 03:48 PM Well, I suppose it's returning it to the correct line now, but ths VB script is failing. I have a scaled-down version of the vgs script to facilitate troubleshooting and it is attached. Since it is returning the email address, I have set it to go to the Send Email module whether the VB Script succeeds, fails or times out. However, it hangs up instead. Return from VB Script fails due to empty stack. See below: 094034.57 0 sys cleanup Start 094034.57 0 sys cleanup End 094037.72 7 callstate OFFERING 65900 0 4 094037.72 7 Answer the call at 3/25/2004 9:40:37 AM 094037.72 7 lineAnswer(65900) => 66037 094037.75 7 ring 1 094037.75 7 callstate ACCEPTED 65900 0 0 094041.11 7 tapi Reply (LineEvReply) ok 66037 0 094041.11 7 callstate CONNECTED 65900,0,0 094041.11 7 WorkingModeTAPI@Connected= 094041.11 7 WorkingModeScript@Connected= 094041.11 7 Inband detection not enabled 094041.11 7 StartLoadedVgs at 3/25/2004 9:40:41 AM 094041.11 7 rv add [$RV_STARTTIME]{3/25/2004 9:40:41 AM} 094041.11 7 rv add [$RV_DEVICEID]{7} 094041.11 7 rv add [$RV_CIDNAME]{} 094041.11 7 AddRVns [PathApp]{C:\Program Files\VoiceGuide\} 094041.11 7 rv add [$RV_CIDNUMBER]{} 094041.11 7 TimeoutClear 094041.11 7 [Welcome] Number Input 094041.12 7 [Welcome] Playing (SPOTMAIL VO-begin-intro.wav) 094041.67 7 PlaySoundStart ok [C:\Program Files\VoiceGuide\Scripts\SpotMail\SPOTMAIL VO-begin-intro.wav] 094041.67 7 TimeoutClear 094041.67 7 wa(6953,99247400) 094048.79 7 Play End line[7] (id=992474) 094048.79 7 ScriptEventCode 8001 iLineState=1300 094048.79 7 LsGetNbrsPlayWelcMsg EV_PLAY_FINISHED 094048.79 7 TimeoutSet 5 EV_TIMEOUT_REPLAYMSG 094049.49 7 dtmf 0 (65900,48,2) 094049.49 7 ScriptEventCode 48 iLineState=1301 094049.49 7 LsGetNbrsRxDigits 0 094049.49 7 [Welcome] Number Input 0 094049.49 7 path {0} not found 094049.49 7 TimeoutSet 6 EV_TIMEOUT_ENTERDATA 094049.82 7 dtmf 0 (65900,48,2) 094049.83 7 ScriptEventCode 48 iLineState=1301 094049.83 7 LsGetNbrsRxDigits 0 094049.83 7 [Welcome] Number Input 00 094049.83 7 path {00} not found 094049.83 7 TimeoutSet 6 EV_TIMEOUT_ENTERDATA 094050.11 7 dtmf 0 (65900,48,2) 094050.11 7 ScriptEventCode 48 iLineState=1301 094050.11 7 LsGetNbrsRxDigits 0 094050.11 7 [Welcome] Number Input 000 094050.11 7 path {000} not found 094050.11 7 TimeoutSet 6 EV_TIMEOUT_ENTERDATA 094050.37 7 dtmf 1 (65900,49,2) 094050.37 7 ScriptEventCode 49 iLineState=1301 094050.37 7 LsGetNbrsRxDigits 1 094050.37 7 [Welcome] Number Input 0001 094050.37 7 path {0001} not found 094050.37 7 TimeoutSet 6 EV_TIMEOUT_ENTERDATA 094050.37 7 TimeoutClear 094050.37 7 rv add [Welcome]{0001} 094050.37 7 path {0001} not found 094050.37 7 AddRVns [Welcome_PathTaken]{success} 094050.37 7 TimeoutClear 094050.37 7 [PlaySpot] Playing 094050.37 7 RVreplace start: [C:\Program Files\VoiceGuide\data\Spots\$RV[Welcome].wav] 094050.37 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/25/2004 9:40:41 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success} 094050.37 7 RVreplace end: [C:\Program Files\VoiceGuide\data\Spots\0001.wav] 094050.38 7 [PlaySpot] Playing (C:\Program Files\VoiceGuide\data\Spots\0001.wav) 094050.92 7 PlaySoundStart ok [C:\Program Files\VoiceGuide\data\Spots\0001.wav] 094050.92 7 TimeoutClear 094050.93 7 RunModule PLAY end 094050.93 7 wa(17285,173700) 094108.39 7 Play End line[7] (id=1737) 094108.39 7 ScriptEventCode 8001 iLineState=1100 094108.39 7 LsPlayMsg EV_PLAY_FINISHED 094108.39 7 TimeoutSet 10 EV_TIMEOUT_HANGUP 094108.39 7 TimeoutSet 0 EV_TIMEOUT_GOTOMODULE 094108.39 7 ScriptEventCode 9002 iLineState=1101 094108.39 7 LsPlayMsgFinished EV_TIMEOUT_GOTOMODULE 094108.39 7 TimeoutClear 094108.39 7 [Run VB Script] Running VB Script... 094108.39 7 RVreplace start: [set vg = CreateObject("VoiceGuide.CommandLink") sEmailAddr = vg.Vm_VmbConfig_Get("$RV[Welcome]", "EmailForward") vg.Script_Return $RV_LINEID, "[RetrievedEmailAddress]{" & sEmailAddr & "}" set vg = Nothing ] 094108.39 7 RVns [PathSysVoice]{}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[$RV_STARTTIME]{3/25/2004 9:40:41 AM}[$RV_DEVICEID]{7}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[$RV_CIDNUMBER]{}[Welcome]{0001}[Welcome_PathTaken]{success} 094108.41 7 Run Script waiting... (shellid=368, process=616) 094108.41 7 TimeoutSet 1 EV_TIMEOUT_CHECKONSTATE 094108.42 0 cl Vm_VmbConfig_Get 0001, EmailForward 094108.43 7 cl Script_Return [RetrievedEmailAddress]{swalker@radio-one.com} 094108.43 7 rv add [Hangup Time]{3/25/2004 9:41:08 AM} 094108.43 7 Hanging up call... [scr return from [Run VB Script] failed - stack empty.] 094108.43 7 RecSoundStop ok 094108.43 7 PlaySoundStop err=0 094108.43 7 TimeoutSet 2 EV_TIMEOUT_WAITFORIDLEAFTERLINEDROP 094108.43 7 fnHangupCall end 094109.42 7 callstate DISCONNECTED 65900,1,0 094109.43 7 ScriptEventCode 9250 iLineState=900 094109.43 7 LsAwaitingCalls EV_REMOTEPARTY_DISCONNECT 094109.43 7 rv add [Hangup Time]{3/25/2004 9:41:09 AM} 094109.43 7 Hanging up call... 094109.43 7 RecSoundStop ok 094109.43 7 PlaySoundStop err=0 094109.43 7 TimeoutSet 2 EV_TIMEOUT_WAITFORIDLEAFTERLINEDROP 094109.43 7 fnHangupCall end 094109.43 7 callstate IDLE 65900 0 0 094109.43 7 WorkingMode@Idle= 094109.43 7 TimeoutClear 094109.48 7 TimeoutSet 1 EV_TIMEOUT_TIMETOREINITLINE 094109.48 7 tapi Reply (LineEvReply) ok 65730 0 094109.48 7 tapi Reply (LineEvReply) ok 65883 0 094110.39 7 Timer fired EV_TIMEOUT_TIMETOREINITLINE 094110.39 7 ScriptEventCode 9008 iLineState=900 094110.39 7 LsAwaitingCalls EV_TIMEOUT_TIMETOREINITLINE 094110.39 7 ReinitTelephony due to IDLE 094110.39 7 tapic lineDeallocateCall(MainCall:65900) 0 094110.46 7 lineOpen(7)=> 094110.46 7 Waiting for a call... 094110.46 7 LineHandle=66088 094110.46 7 TimeoutSet 3 EV_TIMEOUT_ATERIDLE_ALLOWOUT 094113.46 7 Timer fired EV_TIMEOUT_ATERIDLE_ALLOWOUT 094113.46 7 ScriptEventCode 9013 iLineState=900 Spotmail.vgs Share this post Link to post
SupportTeam Report post Posted 03/26/2004 12:48 AM To return information form a VB Script back to VoiceGuide you should be using: Run_ResultReturn not Script_Return ... (we should have picked up that you are using an incorrect function as well earlier, sorry...) the Script_Goto, Script_Gosub and Script_Return functions are used to access the VoiceGuide "subscripting" features - they are not used for returning from a VB Script etc... (I will now correct the other post which incorrectly suggested to use Script_Return) Share this post Link to post
Guest Steve Walker Report post Posted 03/26/2004 03:16 AM Thanks! I'll make the change. Share this post Link to post