Brekeke Forum Index » Brekeke PBX Forum

Post new topic   Reply to topic
Saving DTMF Input
Author Message
mansour
Brekeke Newbie


Joined: 07 Jun 2022
Posts: 1
Location: LB

PostPosted: Tue Jun 07, 2022 12:49 am    Post subject: Saving DTMF Input Reply with quote

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
Back to top
View user's profile
llucy
Brekeke Talented


Joined: 31 Jan 2014
Posts: 52

PostPosted: Tue Jun 07, 2022 1:44 pm    Post subject: Reply with quote

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
Back to top
View user's profile
micksolerm
Brekeke Newbie


Joined: 27 Oct 2021
Posts: 1
Location: zagreb

PostPosted: Thu Aug 11, 2022 5:45 am    Post subject: Reply with quote

Thanks for this information! Very useful for me.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke PBX Forum All times are GMT - 7 Hours
Page 1 of 1