Page 1 of 1

DTMF record

PostPosted: Wed Apr 08, 2015 1:10 pm
by isravelraja
Dear Gurus,

I am developing IVR for getting credit card information, For that i need to pull up the reports. Please guide me where to find IVR DTMF pressed record in vicibox 6.0

Thanks

Isravel Raja

-----------------------------------------------------------------------------------------------------
Vicibox 6.0 | ISO Installation | VERSION: 2.12-480a | BUILD: 150404-0932 | © 2015 ViciDial Group | No Sangoma / Telephony Hardware

Goautodial 3.3 | VERSION: 2.9-441a | BUILD: 140612-1628 |© 2014 ViciDial Group

Re: DTMF record

PostPosted: Thu Apr 09, 2015 4:56 am
by isravelraja
Anyone Reply Please... Very Urgent

Re: DTMF record

PostPosted: Thu Apr 09, 2015 6:25 am
by mflorell
Nobody replied because you didn't give enough information on exactly what you are trying to do.

Re: DTMF record

PostPosted: Fri Apr 10, 2015 1:09 pm
by isravelraja
Sorry Matt..

I want to know where is the dtmf input saved in asterisk database.

I did finally..

Dialplan:

[demo-ivr]
exten => s,1,Background(welcome)
same => n(credit),Read(creditcard,enter_creditcard,0)
same => n,Background(you_have_entered)
same => n,SayDigits(${creditcard})
same => n,Read(creditconf,creditcard_conf,1)
same => n,GotoIf($[${creditconf}=1]?cvv:credit)
same => n(cvv),Read(cvv,enter_cvv,3)
same => n,Background(you_have_entered)
same => n,SayDigits(${cvv})
same => n,Read(cvvconf,cvv_conf,1)
same => n,GotoIf($[${cvvconf}=1]?expiry:cvv)
same => n(expiry),Read(expirydate,enter_expirydate,4)
same => n,Background(you_have_entered)
same => n,SayDigits(${expirydate})
same => n,Read(expiryconf,expirydate_conf,1)
same => n,GotoIf($[${expiryconf}=1]?thankyou:expiry)
same => n(thankyou),Background(thank_you)
same => n,Hangup()

Agi..

#!/usr/bin/php -q
<?php
set_time_limit(30);
require_once "phpagi.php";
declare(ticks = 1);
ob_implicit_flush(true);

$AGI = new AGI();
$DSTDIR = "/usr/share/asterisk/agi-bin/recordings/"; //Folder where you want to store the file.
$CALLERID = $AGI->request['agi_callerid'];
$TIMESTAMP = $_SERVER["argv"][1];
$CREDIT = $_SERVER["argv"][2];
$CVV = $_SERVER["argv"][3];
$EXPIRY = $_SERVER["argv"][4];

$conns=mysql_connect("localhost","cron","1234");
if(!$conns)
{
die('unable to connect:' .mysql_error());
}
mysql_select_db("asterisk", $conns);
mysql_query("INSERT into ivr (date,caller_id,credit_card,cvv,expiry_date) values ('$TIMESTAMP','$CALLERID','$CREDIT','$CVV','$EXPIRY')");
mysql_close($conns);

$contents = "
Date: $TIMESTAMP
Caller ID: $CALLERID
Credit Card Number: $CREDIT
CVV Number: $CVV
Expiry Date: $EXPIRY
";
$fp = fopen($DSTDIR.$CALLERID.$TIMESTAMP.'.txt', 'a');
fwrite($fp, $contents);
fclose($fp);
?>

Thanks
Isravel

Re: DTMF record

PostPosted: Mon Apr 13, 2015 4:26 am
by isravelraja
Dear Matt..

How do i get the customer phone number, First name, last name and address on the same agi?

Thanks
Israel

Re: DTMF record

PostPosted: Mon Apr 13, 2015 5:19 am
by mflorell
You will need to get the lead_id from the callerIDname variable. Take a look at the "cm.agi" script to see how we get the lead_id it in there.