Voice Logging - Active

Voice Logging - Active

Call recording is a process through which the phone interactions get stored into the IVR system for future references. The IVR script given below shows the process of recording the auto-attended bank balance enquiries. This approach can be followed to maintain records of any automated phone transactions, thus helping firms to use the recordings as reference data at the time of transactional requirements.

Download the evaluation version of Xtend IVR and install the telephony application in your system. Run the sample script from the Script Editor. Click here to refer the code.

The automated attendant will work as given below:

  • Initially, IVR stops any existing voice logging
  • IVR waits for the call
  • Caller dials the number, IVR accepts the call and activates the Voice logger
  • The caller is prompted to enter the account number and PIN number
  • If the account number is valid, IVR informs the account status to the caller
  • If the account number is invalid, IVR plays the invalid message
Download the source file zip download for the Voice Logging Application - Active


$db = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=bankacc.mdb;User Id=admin;Password=;"


$retrycount = 2
MAIN:
	
	voicelog
	display "Waiting for call . . ."
	
	
	answer 1
	
	
	$fname = format("voicelog-%s-%d.wav",$cli,GetTickCount())
	voicelog $fname
		
	
	play "Welcome.wav"
	play "silence.wav"
	
ACCEPT_ACCNO:
	
	display "Accept account number"
	play "silence.wav"
	$retry = $retrycount
	while $retry > 0
		
		play "PunchAccount.wav"
		$Acno = Input(4,5)
		if $Acno = ""
			
			if $retry = $retrycount
				play "advice.wav"
			endif
		else
			break
		endif
		$retry -= 1
	endwhile
	if $Acno = "" then goto GOODBYE
	
ACCEPT_PIN:
	display "Accept PIN number"
	play "silence.wav"
	$retry = $retrycount
	while $retry > 0
		
		play "GetPin.wav"
		$Pin = Input(4,5)
		if $Pin <> ""
			break
		endif
		$retry -= 1
	endwhile
	if $Pin == "" then goto GOODBYE	

	display "Validating User"
	
	
	$sql = format("SELECT * FROM BANK WHERE AccNo = '%s'",$Acno)
	$dbalias = db.RunSQL($db, $sql)
	if $dbalias.eof
		play "InvalidAcno.wav"
		goto GOODBYE
	endif
	
	
	if compare($dbalias.PIN,$Pin) <> 0
		play "InvalidPin.wav"
		goto GOODBYE
	endif
	
	play "silence.wav"
	play "AccBal.wav"
	
	
	$wave = Money2Wav($dbalias.Balance)
	play $wave
	

GOODBYE:
	
	display "Terminating Call"
	play "silence.wav"
	play "goodbye.wav"
	hangup
	goto MAIN
	
	

ONHANGUP:
	hangup
	goto MAIN


ONSYSTEMERROR:
	log $error
	display $error
	hangup
	goto MAIN