08-01-2013 04:31 PM - edited 03-14-2019 12:10 PM
Hello.
I need dial the internal extensions in any time within the script.
Currently the call enters to the script and after welcome message there is a step "GET DIGIT STRING" so that the person that calls enter the four digits of the extension known. This step have four seconds of timeout.
Subsequent to step "GET DIGIT STRING" is located the step "MENU" with 4 choices but we is happening that when the caller dials, for example, the number 2, the system takes it as if outside within the menu and calls are crossing to other option and the call is redirected to internal extensions which starting for 2XXX.
I attach the scritp (.aef file) for analysis.
Best regards.
Ernesto González
08-01-2013 08:06 PM
I don't have the means necessary to view you script at the moment, but I feel that I have enough information about your request to show you how I handle menus which also have a "dial at anytime" feature.
Variables
String caller_input = ""
String transfer_to = ""
String extension_operator = "2000"
String extension_sales = "2001"
String extension_support = "2002"
String extension_complaints = "2003"
String extension_compliments = "2004"
Prompt main_menu = P[main_menu.wav]
Prompt extension_dial = P[extension_dial.wav]
Prompt invalid_input = P[invalid_input.wav]
Prompt try_again = P[try_again.wav]
int menu_retry_count = 0
int menu_retry_limit = 3
int extension_length = 4
int menu_option_length = 1
Script
Start
Accept (--Triggering Contact--)
Set menu_retry_count = 0
/* I set the retry here to 0, so that single digit inputs fall to the Timeout branch the first time */
Main Menu: caller_input = Get Digit String (--Triggering Contact--, extension_dial + main_menu)
Successful
Main Menu Validate Input:
/* Did the caller enter enough digits to make an extension for us to transfer to? */
If (caller_input.length() == extension_length)
True
/* You might want to do some basic validation here, but I am going to blindly transfer to the number for this example */
Set transfer_to = caller_input
Goto Transfer Caller
False
/* The user didn't enter enough digits for a transfer, but maybe the pressed a single digit for a menu option */
If (caller_input.length() == menu_option_length)
True
Switch (caller_input)
Option 0 - Operator
Main Menu Default Option:
Set transfer_to = extension_operator
Goto Transfer Caller
Option 1 - Sales
Set transfer_to = extension_sales
Goto Transfer Caller
Option 2 - Support
Set transfer_to = extension_support
Goto Transfer Caller
Option 3 - Complaints
Set transfer_to = extension_complaints
Goto Transfer Caller
Option 4 - Compliments
Set transfer_to = extension_compliments
Goto Transfer Caller
Default
Goto Main Menu Default Option
False
/* No valid extension, nor single menu input was given */
Goto Main Menu Failure
Timeout
Goto Main Menu Validate Input
Unsuccessful
Main Menu Failure:
Play Prompt (--Triggering Contact--, invalid_input)
If (++menu_retry_count < menu_retry_limit)
True
Play Prompt (--Triggering Contact--, try_again)
Goto Main Menu
False
Goto Main Menu Default Option
Transfer Caller:
Call Redirect (--Triggering Contact-- to transfer_to)
Successful
Set Contact Info (--Triggering Contact--, handled)
End
...
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
04-04-2019 12:11 AM
Hi All
I want to use get digit string with menu or switch variable but i can not do that properly.
HEre is my scnerio.
iwe would like tou play welcome greating.... "if you know the extention dial it. for sales press 1 , for support press 2 , for accounts press 3.
How can I do this ? This is not working with menu variable
My extention lentgh 6 digit starting with 6
Regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide