Saving DTMF Input

Discuss any topic about Brekeke PBX.

Moderator: Brekeke Support Team

Post Reply
mansour
Posts: 6
Joined: Tue Jun 07, 2022 12:36 am
Location: LB

Saving DTMF Input

Post by mansour »

1. Brekeke Product Name and Version:
Brekeke PBX Version: 3.12.4.1/549

2. Java version:
Eclipse Adoptium / OpenJDK 64-Bit Server VM / Version: 11.0.15

3. OS type and the version:
Windows Server 2008 R2 / Version: 6.1

4. UA (phone), gateway or other hardware/software involved:
None

5. Your problem:
We have created a competition in flow designer consisting of ten questions with four choices for each question and caller must choose right answer.

Does the system support saving dtmf inputs done by caller to database and global variable when answering each question to:
• Perform statistics.
• Inform caller by end of call how many questions answered correctly.

Thank you.

mansour
llucy
Posts: 52
Joined: Fri Jan 31, 2014 1:08 am

Post by llucy »

mansour,

You can access database using javascript in Script module.

The script would be like below,
--------------------------------------
var a1 = $runner.getModuleResult( "module1" ); // change to real module names
var a2 = $runner.getModuleResult( "module2" );
var a3 = $runner.getModuleResult( "module3" );
var a4 = $runner.getModuleResult( "module4" );
var a5 = $runner.getModuleResult( "module5" );
var a6 = $runner.getModuleResult( "module6" );
var a7 = $runner.getModuleResult( "module7" );
var a8 = $runner.getModuleResult( "module8" );
var a9 = $runner.getModuleResult( "module9" );
var a10 = $runner.getModuleResult( "module10" );

var db = $runner.getDb( "db1" ); // refer to the IVR develper's guide.
var con = db.getConnection(); // get JDBC connection
try{
// store the data to the database.

}finally{
con.close();
}

$ivr.play( "{prompt}" );

--------------------------------------

What you are trying to do is more complicated. But I think this would help you understand how you handle the requirements.


Lucy
micksolerm
Posts: 1
Joined: Wed Oct 27, 2021 7:21 am
Location: zagreb

Post by micksolerm »

Thanks for this information! Very useful for me.
Post Reply