Added variables to agi-set_variables script
Added third RING_ALL entry on example dialplans git-svn-id: svn://192.168.202.10@1634 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -13,11 +13,12 @@
|
||||
# exten => _91NXXNXXXXXX,n,Dial(${TESTSIPTRUNK}/${EXTEN:2},,tTor)
|
||||
# exten => _91NXXNXXXXXX,n,Hangup
|
||||
#
|
||||
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 101118-1409 - First build
|
||||
# 101125-2115 - Added parsing for 3-way calls
|
||||
# 110404-1604 - Added dial_timeout and cpd_amd_action variables
|
||||
#
|
||||
|
||||
$script = 'agi-set_variables.agi';
|
||||
@@ -175,6 +176,8 @@ if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$typ
|
||||
$VDADcampaign='';
|
||||
$VDADphone='';
|
||||
$VDADphone_code='';
|
||||
$auto_dial_timeout='60';
|
||||
$cpd_amd_action='DISABLED';
|
||||
|
||||
$callerid =~ s/\"//gi;
|
||||
$callerid =~ s/ .*//gi;
|
||||
@@ -209,6 +212,23 @@ if ($sthArows > 0)
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$stmtA = "SELECT dial_timeout,cpd_amd_action FROM vicidial_campaigns where campaign_id='$campaign_id' limit 1;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($AGILOG) {$agi_string = "$sthArows|$stmtA|"; &agi_output;}
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$auto_dial_timeout = $aryA[0];
|
||||
# only set if auto-dial call
|
||||
if ($callerid =~ /^V/)
|
||||
{
|
||||
$cpd_amd_action = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$stmtA = "SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner FROM vicidial_list where lead_id='$VD_lead_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -317,7 +337,8 @@ $AGI->exec("EXEC Set(_rank=$rank)");
|
||||
$AGI->exec("EXEC Set(_owner=$owner)");
|
||||
$AGI->exec("EXEC Set(_campaign_id=$campaign_id)");
|
||||
$AGI->exec("EXEC Set(_dialed_number=$dialed_number)");
|
||||
|
||||
$AGI->exec("EXEC Set(_auto_dial_timeout=$auto_dial_timeout)");
|
||||
$AGI->exec("EXEC Set(_cpd_amd_action=$cpd_amd_action)");
|
||||
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
Reference in New Issue
Block a user