IVR Tutorial Lesson 2: Log Caller ID

If the number of password attempts is greater than three, the system logs the caller ID and disconnects the call. To accomplish this, we'll add an element to handle this situation.

Add a Prompt Element

Right click on the Get Password element, select Add Next Element then select Prompt. Enter the element name as Log ID and enter the transition touch tone response as "...". The finished call flow diagram now looks like the following:

So now if the number of password attempts is greater than three, the Log ID element is activated.

Use System Variable

The caller ID of the current call is a system variable. A system variable is created by the IVR system and cannot be modified, it is read only. For example, the caller ID is established whenever the caller ID is available for an incoming call and it can be accessed as __VG__CALLER_ID_NAME__. A variable created by the user is called an user variable.

The Log Message Action

The Log Message Action prints out messages to a log file. To add a log message action, select the Log ID element, click the properties button Properties icon on the toolbar, select the Action tab and then click the New button. Choose the Log Message action type then click OK.

From the "Edit Action: Log Message" window, click the Add button. The log message is defined as an expression also. You can use variables, string literals, arithmetic operators, and relational operators in any expression. Here we enter the following expressions:

'Caller: ' + __VG__CALLER_ID_NAME__ + ';

'Number: ' + __VG_CALLER_ID_NUMBER__'

For example, if the caller ID is 'John Doe' and the phone number is '123-4567' then the log message will be:

Caller: John Doe; Number: 123-4567