Here’s a snippet of AEL:
switch (${STEP-${IDX}-TYPE})
{
case ACCOUNT-NUMBER:
case LOOKUP-TTS-SNIPPETS:
case PROMPT:
case SAY-DIGITS:
agi(${TOLOWER(${STEP-${IDX}-TYPE})},${DEBUG-MODE},${TEST-MODE},${VERBOSE-MODE});
break;
case COMPLETE:
if (("760xxxxxxx" = "${CID}")
|| ("619xxxxxxx" = "${CID}")
|| ("sedwards" = "${CID}")
)
{
playback(vtpv/ka-ching);
};
STATE=COMPLETE;
break;
case DIAL:
agi(dial.pl,${DEBUG-MODE},${TEST-MODE},${VERBOSE-MODE});
break;
default:
verbose(1,****** Error, unknown step type - ${STEP-${IDX}-TYPE});
break;
};
Where:
-
account-number
asks for an account number, validates it, and sets a channel variable. -
lookup-tts-snippets
reads rows from the database and sets channel variables. -
prompt
plays a [list of] prompt[s]. - COMPLETE marks the end of the billable portion of a call.
-
dial.pl
places an outbound call to a live operator.
1, 2, and 3 are written in C. 5 is written in Perl.