The main.aef Script
The main.aef script does the following:
- Answers the incoming call (the accept step in the script shown in the next section)
- Checks for business hours and business days (the day of week and time of day steps in the script)
- Provides the normal welcome greeting if it is during business hours (the menu step following the weekdays label)
- Branches to a subflow (a separate script file called dialbyextension.aef) if the caller selects 1 for dial-by-extension (the call subflow to dialbyextension.aef step)
- Branches to a subflow (a separate script file called dialbyname.aef) if the caller selects 2 for dial-by-name (the call subflow to dialbyname.aef step)
- Transfers the caller to the operator (which is a variable) if he or she selects 0 (the Call Redirect step)
- Handles various error conditions
Figure B-1 shows a graphical user interface (GUI) view of the first page of the script, which maps to approximately the top 30 lines of the text representation of the script. Figure B-2 shows the second page, which maps to approximately the last 30 lines of the text representation of the script. The full text and variable definitions of the main.aef script are given in the next section.
Figure B-1. First Page of the main.aef Script
Figure B-2. Second Page of the main.aef Script
Script Content
Example B-1 is a text representation of the main.aef script contents.
Example B-64. main.aef Script
Start /* New AA attendant */ Accept (contact: --Triggering Contact--) Get Contact Info (contact: --Triggering Contact--) Day of Week Weekdays Time of Day work hours Goto Weekdays The Rest Goto afterhours Weekends afterhours: Play Prompt (contact: --Triggering Contact--, prompt: weekend) Set state = "terminate" Goto Doswitch Weekdays: Menu (contact: --Triggering Contact--, prompt: menuprompt) Dialbyext Call Subflow -- dialbyextension.aef Dialbyname Call Subflow -- dialbyname.aef Operator Set state = "operator" Goto Doswitch Timeout Set state = "problems" Goto Doswitch Unsuccessful Set state = "operator" Goto Doswitch Goto Weekdays Doswitch: Switch String ( state ) problems Play Prompt (contact: --Triggering Contact--, prompt: problem) terminate operator Play Prompt (contact: --Triggering Contact--, prompt: transfer2oper Call Redirect (contact: --Triggering Contact--, extension: operator Successful End Busy Set condition = true Invalid Unsuccessful Set condition = false Set Contact Info (contact: --Triggering Contact--) Create Conditional Prompt (store in operbusy) Play Prompt (contact: --Triggering Contact--, prompt: operbusy) Default Delay 1 sec Play Prompt (contact: --Triggering Contact--, prompt: goodbye) On Exception(UndefinedPromptException) Goto noprompttest Play Prompt (contact: --Triggering Contact--, prompt: noprompt) noprompttest: Clear Exception(UndefinedPromptException) Terminate (contact: --Triggering Contact--) Set Contact Info (contact: --Triggering Contact--) End
Variables
The variables defined in the main.aef script are shown in Figure B-3.
Figure B-3. Variables of the main.aef Script
The dialbyname aef Script
|