VoiceGuide IVR Software Main Page
Jump to content

Handling 'digit *' In Get Number Module

Recommended Posts

We have been running scripts in V5 where we rely on the handling of the 'Digit *' in a GetNumbers module to leave the numbers entered before the * as the module's RV. This has worked fine for a few years.

 

We are upgrading to V7 and testing is showing that the behaviour has changed. The module's RV is now set to * - exactly as described in the Help. This obviously is a problem for our script logic.

 

We can redesign the script logic, but that would mean we have to change user's behaviour, which is unfortunate.

 

Am I prehaps misunderstanding the behaviour, or is there an config option that overrides V7 behaviour that will revert to V5 behaviour?

 

Attached is a V5 log which at time 100837.64 shows number 7 being stored to the RV [bGDOGCTResultBefore], rather than *.

 

Thanks.

0426vgm.zip

Share this post


Link to post

Can you please describe in more what are you trying to achieve.

 

Do you just need to let caller use "*" to indicate that they have completed entering the number?

(instead of having callers use # to end number entering)

 

Or is there some other functionality required?

 

There are over 600 modules in the attached script - looks like it does random selections for various medical/clinical trails?

 

Looks like most of the "Get Numbers" type modules have the 'min' and 'max' lengths set to the same value, so they would not need to use * or # to terminate input.

Guess that the question relates to the few modules that have a variable number length allowed?

 

Like BGDOGCTResultBefore:

 

113206.53   6 state [bGDOGCTResultBefore] Number Input
113206.53   6 state [bGDOGCTResultBefore] Playing (studio voice files\BGDOGCT.wav)
113206.53   6 play set playid=661484
113206.53   6       PlaySoundStart ok [C:\VoiceGuide\Scripts\Randomisation\studio voice files\BGDOGCT.wav]
113206.53   6 timer clear
113206.53   6 callinfo MONITORMODES
113214.79   6 dtmf  9   (66216,57,2)
113214.79   6       ScriptEventCode 57 iLineState=1300
113214.79   6       LsGetNbrsPlayWelcMsg 9
113214.84   6       PlaySoundStop err=0
113214.84   6 state [bGDOGCTResultBefore] Number Input 9
113214.84   6 path  {9} not found
113214.84   6 timer set 9  EV_TIMEOUT_GOTOMODULE
113215.34   6 dtmf  *   (66216,42,2)
113215.34   6       ScriptEventCode 42 iLineState=1301
113215.34   6       LsGetNbrsRxDigits *
113215.34   6 rv    lg add [bGDOGCTResultBefore]{9}
113215.34   6 rv    ns add [bGDOGCTResultBefore_PathTaken]{*}

 

and this path is taken:

 

on {*} goto [bGDOGCTResultAfter]

Share this post


Link to post

We use the * to allow people to enter a decimal number. We ask them to use the * as the decimal point, and to finish the number with the # although it is not always needed. We only need a decimal number in a few places, vast majority of entries don't need this.

 

I am pretty sure I found the technique in a suggestion on this forum a few years ago.

 

Because 'On *' is available to use as a Path the method works very well.

 

So to enter 7.8, people press 7*8

 

The Path 'On *' causes the script to go to the After module as soon as it hears the *, the Before Module RV is set to 7, and the After Module will have the RV set to 8, then I simple do a Function module to store 7 & '.' & 8 as a number. Voila, a decimal number from a phone.

 

So in V5 it works because of the described behaviour - the Module RV is set to the numbers pressed before it hears the *, but in V7 the RV is set to '*'

 

I can change the script to instead ask for the number before the decimal point, then do another Get Number and ask for the number after the decimal point, and then put them together. Easy but clumsy. And it means people have to change from what they are use to.

 

Yes the script is huge. We did not have the licence which allowed subscripts, so had to keep it all in a single script. With the move to V7 and a full Enterprise licence I am taking the opportunity to split the script into multiple scripts which will be fantastic for readability and editing.

 

I should mention that the V5 system uses a Dialogic card, but our V7 is using the VOIP drivers. Don't know if that might have caused the change of behaviour, although as mentioned the Help file says that the V7 behaviour is by design. It's just that I would like the behaviour of V5 to remain so that the script doesn't have to change.

Share this post


Link to post
I can change the script to instead ask for the number before the decimal point, then do another Get Number and ask for the number after the decimal point, and then put them together. Easy but clumsy. And it means people have to change from what they are use to.

If you remove the "on {*} goto ..." path then the * character will be saved as part of the captured number in v7, so you should be able to capture the whole number with the 'decimal point' in one 'Get Numbers' type module in v7.

Would this meet your requirements, or is there anything else we need to consider?

 

The '*' can be replaced with a '.' in an Evaluate Expression type module - by calling a function Replace().

Share this post


Link to post

Excellent suggestion. Thank you very much.

 

Simple, effective, and I'm sorry I didn't think of that myself earlier. Sometimes the trees get in the way of the forest.

 

Thanks for the support...............

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×