Brandon Report post Posted 11/03/2004 03:43 AM Team, When someone calls and enters a reference number to hear information about a topic I want to be able to charge cents per minute of use and charge it towards the owner of that particular reference number. How can I do that? Thanks, -Brandon Share this post Link to post
SupportTeam Report post Posted 11/03/2004 04:30 AM You can check the length of call using the $RV_CALLLENGTH Result Variable. See: http://www.voiceguide.com/vghelp/html/Resu...ltVariables.htm Share this post Link to post
richardli Report post Posted 11/04/2004 09:48 AM But how can I check the call length during playing my content? I need to check if the user has enougth credit (minutes) to listen. If not I'll need to cut the line. The user can of course press say '0' to end the line at the same time. It seems we need a MaxPlayTime or Max Call Time property for the scripts. PLease help help Thanks Richard Share this post Link to post
SupportTeam Report post Posted 11/04/2004 09:39 PM To calculate how much time a caller has left on the call just determine at start of call what is the max time the call can go on for, and then at any time you can just see how many seconds are left by subtracting $RV_CALLLENGTH from that original calculate 'max call time'. Right now there is no easy way to stop playing a sound file after a particular number of seconds. Do you want to be able to stop the playing of sound files midway through them or would a check for the 'time left' after the sound file has completed playing would be sufficient? Share this post Link to post
Guest Guest Report post Posted 11/05/2004 06:36 AM The Problem still remain. The sound file is our content and could be long (e.g. 5 -10 min or even longer). We need to check how many credit the user remain and allow him only to listen upto all his credit limit. Currently the only way is to cut the sound files into pieces and check them at the end of playing, but this is nonsenses as we have so many files to play and the connection of sound is poor. Is there any way I can check during palying: 1. The length of the play , or total call time ( so that I can compare with the credit) 2. Detect if the user press, say '0' to stop playing and back to menu. Even I use VBS to play and check, I can only do part 1. Is there anyway to check also part 2 in VBS? In one of your response before in other topic, I found that you said MaxCallTime may be done in V5.1. Is there any plan on this? Thanks Best Regards Richard Share this post Link to post
SupportTeam Report post Posted 11/05/2004 07:06 AM Checking how much time has elapsed during playing is not very easy, but it can be done with playing the file from within a VBScript (as I think you've already worked out). Monitoring if a user has left the Play module by pressing '0' or other DTMF tone is a bit more involved - you should use the undocumented VG COM function Line_State_CurrentModule Here is an example of how to use it: set vg = CreateObject("VoiceGuide.CommandLink") sModuleTitle = vg.Line_State_CurrentModule $RV_LINEID set vg = Nothing To use Line_State_CurrentModule update your v5.2.3 installation of VG with attached .EXE Use Line_State_CurrentModule from within the VBScript that starts the play to poll every second or so to see if caller is still listening to the message... Let us know if this is OK for you. MaxCallTime is not implemented – just abrupty cutting of caller without any other message is not really good practice… VgMulti_5.2.3043.zip Share this post Link to post
richardli Report post Posted 11/11/2004 12:39 PM Thanks for your reply. I've tried the normal way: 1. I use a RunVB Module 2. In the RunVB Module, here is the code: set vg = CreateObject("VoiceGuide.CommandLink") sReturnValue=0 Do while sReturnValue<50 Wscript.sleep 100 sReturnValue = vg.RvGet($RV_LINEID, "RV_CALLLENGTH") ' MsgBox sReturnValue loop set vg = Nothing 3. In the RunVB Play Tab, I assigned a wav file. 4. In the RunVB Path Tab, I put: on {0} goto [CheckCredit] 5. RunVB option I use wait until VBScript Complete Now, letus try. 1. The RunVB script is working and will terminate once the sReturnValue over 50 sec. 2. However, if during the sound play, if the user press '0', the VGMulti.exe has a application error and the system crashed. I think this is just a bug in the VGMulti.exe Would you try to fix this? as otherwise everything is just fine to fit my case. Thanks Richard Share this post Link to post
SupportTeam Report post Posted 11/11/2004 09:10 PM What was the error? Can you please post a screenshot of it? Which version of VoiceGuide are you using? Could you please post a copy of VoiceGuide's Debug Printout which captures the problem, this will allow us to see what is going wrong. (When running the script click on VoiceGuide's View menu and select 'Event Trace Log' option - any log information will then appear in this window. You must open the trace window before making the call.) Share this post Link to post
richardli Report post Posted 11/18/2004 01:38 PM The error is a Wav Driver error. I solved this by converting all wav file to dialogic format again. (however, this is a bug: Before runing the VBrun, all wav file play fine. After the VBrun, some wav file play cause application crash). Anyway, the problem above solved. But, the origional problem still not sovled. As in my previous mail, I use a VBrun to loop while playing wav file until say 500 sec (see attached log and vgs), however, the loop exit after about 120-130 seconds. That means the VBrun module break the loop all the way, even I set the waiting time to 500 sec. PLease help to check if there is any timer false trigger? Thanks Richard TryVBPlay.vgs Share this post Link to post
richardli Report post Posted 11/18/2004 01:41 PM The log attached for above mail. Since this forum cannot accept rar file. I've renamed it to zip file. Please rename it back to rar if cannot open. Thanks Richard log.zip Share this post Link to post
SupportTeam Report post Posted 11/18/2004 11:27 PM solved this by converting all wav file to dialogic format again. Are you using .VOX files? Does this mean that you are running "VoiceGuide for ISDN" or "VoiceGuide for Dialogic"? I thought you were running the version of VG that is downloadable from our WWW. Share this post Link to post
Guest Guest_Richardli Report post Posted 11/22/2004 10:15 AM I'm running trial version from the web to make sure that this application can be used in my application. My version is 5.2.3018 Does the vox wav file is matter the 120 sec auto stop problem? My problem is in the VBscript, the play file autostop after 110-130 sec. Is it the problem of vox format? I don't understand why this matter. Thanks Richard Share this post Link to post
richardli Report post Posted 11/26/2004 11:28 AM Please help solving the timeout problem based on my previous attached log. The problem is that using VBscript to play a wav file, then in the script wait for calllength to reach limit then stop the playing. HOwever, the vbscript always stop playing after 110s to 130s. It seems there is a extra timer somewhere stopped the script. Please help is there is any hidden timer in the VG code? Thanks Best Regards Richard Share this post Link to post
SupportTeam Report post Posted 11/27/2004 02:43 AM I understand that the Timeout path's value would be used here to limit length of time the script is ran. Please update your VoiceGuide directory with attached .exe and run your script again - if the timeout kicks in please post a copy of VoiceGuide's Debug Printout which captures the problem. (When running the script click on VoiceGuide's View menu and select 'Event Trace Log' option - any log information will then appear in this window. You must open the trace window before making the call.) VgMulti_5.2.3048.zip Share this post Link to post
richardli Report post Posted 12/08/2004 11:08 AM It seems running OK. The hidden timer didn't fire again. I'll try more to see . How can I detect in the script that the wav file has finished playing? Thanks Richard Share this post Link to post
SupportTeam Report post Posted 12/08/2004 11:36 AM How can I detect in the script that the wav file has finished playing? Use the "Wait until VB Script and Sound File completes" option in the "Run VBScript" module. Share this post Link to post
Guest Guest_richardli Report post Posted 12/09/2004 06:52 AM Use the "Wait until VB Script and Sound File completes" option in the "Run VBScript" module. The above option say wait script end AND sound file end. What I need is actually Wait Script End OR Sound file play end. Is this possible? Thanks Richard Share this post Link to post
SupportTeam Report post Posted 12/09/2004 07:02 AM What I need is actually: "Wait Script End OR Sound file play end". Is this possible? Just set the Timeout path to be a tiny bit more then the length of the sound file that plays in that module usually... Why do you want the VBScript to run for such a long time anyway? Sounds like what it's doing is not very important anyway if you are willing to have it terminated when the sound file finishes... What is stopping you from designing the VBScript so that it's pretty much guaranteed to finish before the sound file finishes playing? Share this post Link to post