From 177f959117335ef65ccbbe924d2daa861e9ab7ed Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 28 Aug 2012 20:52:22 +0000 Subject: [PATCH] Small bug fixes: Real-time report, user group restrictions agent interface, API hangup while dialing cm_lookup agi, remove non-digits from extension git-svn-id: svn://192.168.202.10@1853 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/agi/cm_lookup.agi | 7 +++++++ agc_2-X/trunk/www/agc/vicidial.php | 2 +- agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/agc_2-X/trunk/agi/cm_lookup.agi b/agc_2-X/trunk/agi/cm_lookup.agi index a2cfa95e..0a234d77 100644 --- a/agc_2-X/trunk/agi/cm_lookup.agi +++ b/agc_2-X/trunk/agi/cm_lookup.agi @@ -33,6 +33,9 @@ #; example with 8-digit vendor lead codes # exten => _XXXXXXXX,1,AGI(cm_lookup.agi,vendor_lead_code---CAMPLISTSALL---TESTCAMP---lastname_oneyestwono---N---N---Y---N) # +#; example with 8-digit vendor lead codes +# exten => _XXXXXXXX,1,AGI(cm_lookup.agi,vendor_lead_code---CAMPLISTSALL---TESTCAMP---lastname_oneyestwono---N---N---Y---N) +# # Copyright (C) 2012 Matt Florell LICENSE: AGPLv2 # # changes: @@ -40,6 +43,7 @@ # 111212-1507 - Added update of vicidial_list phone_number with caller callerid number option # 120511-1508 - Added option for 'address3' uniqueid update and 'user' agent_user_id field update if AGENT-dial-in AGI is used beforoe this AGI # 120604-1311 - Added title call variable option +# 120824-1221 - Added filtering for non-digits in extension, and example of variable-digit account number # $script = 'cm_lookup.agi'; @@ -201,6 +205,9 @@ $calleridname =~ s/unknown|\'//gi; if ( (!$callerid) or ($callerid =~ /unknown/) ) {$callerid = $calleridname;} +# remove non-digits from extension +$extension =~ s/\D//gi; + $agent_user_id = $AGI->get_variable('agent_user_id'); $call_var_title = $AGI->get_variable('title'); if ( ($AGILOG) && (length($agent_user_id)>0) ) {$agi_string = "user id AGI variables: |$agent_user_id|$call_var_title|"; &agi_output;} diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 41e5a4eb..dd49b4fb 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -4568,7 +4568,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) timer_action_destination = api_timer_action_destination; // alert("TIMER_API:" + timer_action + '|' + timer_action_message + '|' + timer_action_seconds + '|' + timer_action_destination + '|'); } - if ( (APIHanguP==1) && (VD_live_customer_call==1) ) + if ( (APIHanguP==1) && ( (VD_live_customer_call==1) || (MD_channel_look==1) ) ) { hideDiv('CustomerGoneBox'); WaitingForNextStep=0; diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index 1af6b80a..298eb50b 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -2349,8 +2349,10 @@ else if ($orderby=='userdown') {$orderSQL='vicidial_live_agents.user desc';} } -if ( (eregi('ALL-ACTIVE',$group_string)) and (strlen($group_SQL) < 3) ) {$UgroupSQL = '';} +if ( !preg_match("/ALL-/",$LOGallowed_campaigns) ) {$UgroupSQL = " and vicidial_live_agents.campaign_id IN($group_SQL)";} +else if ( (eregi('ALL-ACTIVE',$group_string)) and (strlen($group_SQL) < 3) ) {$UgroupSQL = '';} else {$UgroupSQL = " and vicidial_live_agents.campaign_id IN($group_SQL)";} + if (strlen($usergroup)<1) {$usergroupSQL = '';} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";}