ivr IVR Tutorial Table of Content << Previous  >> Next

2.4 Log Caller ID

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

Add an Prompt Element

Right click on the Get Password element, select Add Next Element, then select Prompt. Enter the element name as Log ID, and 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 3, 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 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 added by user is called a 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 on the toolbar, select the Action tab, and then click the New button. Choose the Log Message action type, 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 operator in the expression. Here we enter the following expression:

'Caller: ' + __VG__CALLER_ID_NAME__ + '; Number: ' + __VG_CALLER_ID_NUMBER__

For example, if the caller ID is 'John Doo' and phone number is '123-4567', the log message is:

Caller: John Doo; Number: 123-4567


ivr IVR Studio Table of Content << Previous >> Next