Calllogupdate, userlogtest and rmconnect updates
Showing
3 changed files
with
27 additions
and
2 deletions
| ... | @@ -70,10 +70,24 @@ class Calllogupdate extends Command { | ... | @@ -70,10 +70,24 @@ class Calllogupdate extends Command { |
| 70 | $server_id="0".$server_id; | 70 | $server_id="0".$server_id; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | $alist=DB::connection("conn")->select(DB::raw("select crmcall_id,dispo,subdispo from $calllog_report where created_at>'".date("Y-m-d",$logdate)."' and server='$server_id'")); | ||
| 73 | 74 | ||
| 74 | 75 | ||
| 75 | 76 | $alistupdate=DB::select(DB::raw("SELECT id,userstatus,usersubstatus from crmcalls where created_at>'".date("Y-m-d",$logdate)."'")); | |
| 76 | $alistupdate=DB::select(DB::raw("SELECT * from crmcalls where call_flag='Z' and created_at <= '".date("Y-m-d H:i:s",$logdate-(05*60))."'")); | 77 | foreach ($alist as $aline) { |
| 78 | foreach($alistupdate as $cline) | ||
| 79 | { | ||
| 80 | if( $aline->crmcall_id == $cline->id ){ | ||
| 81 | if( $aline->dispo != $cline->userstatus){ | ||
| 82 | echo " ^ DISPo".$aline->dispo." ^ ".$cline->userstatus." ^ ".$aline->crmcall_id." ^ ".$cline->id; | ||
| 83 | }else{ | ||
| 84 | echo " ^ ElseDISPo".$aline->dispo." ^ ".$cline->userstatus." ^ ".$aline->crmcall_id." ^ ".$cline->id; | ||
| 85 | } | ||
| 86 | } | ||
| 87 | } | ||
| 88 | } | ||
| 89 | exit; | ||
| 90 | try{ | ||
| 77 | foreach ($alistupdate as $aline) { | 91 | foreach ($alistupdate as $aline) { |
| 78 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; | 92 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; |
| 79 | if($aline->crm_id>0) | 93 | if($aline->crm_id>0) |
| ... | @@ -139,10 +153,15 @@ class Calllogupdate extends Command { | ... | @@ -139,10 +153,15 @@ class Calllogupdate extends Command { |
| 139 | 153 | ||
| 140 | 154 | ||
| 141 | } | 155 | } |
| 156 | } | ||
| 157 | catch(Exception $e){ | ||
| 158 | echo $e->getMessage(),"\n"; | ||
| 159 | }finally { | ||
| 142 | 160 | ||
| 143 | echo "\n".date('Y-m-d H:i:s')."\n"; | 161 | echo "\n".date('Y-m-d H:i:s')."\n"; |
| 144 | DB::connection("conn")->disconnect(); | 162 | DB::connection("conn")->disconnect(); |
| 145 | } | 163 | } |
| 164 | } | ||
| 146 | 165 | ||
| 147 | } | 166 | } |
| 148 | 167 | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -1197,8 +1197,14 @@ class KPAMIListen implements IEventListener | ... | @@ -1197,8 +1197,14 @@ class KPAMIListen implements IEventListener |
| 1197 | foreach($allsipids as $tsip) | 1197 | foreach($allsipids as $tsip) |
| 1198 | { | 1198 | { |
| 1199 | $newqueue=new Kqueue(); | 1199 | $newqueue=new Kqueue(); |
| 1200 | include( app_path() . '/Hacks/DisabledDIDs.php'); | ||
| 1201 | if( in_array(substr($crmcall->number,-10),$DisableNumbersArray) ){ | ||
| 1202 | $newqueue->sipNotify($tsip,"popupalert"," Incoming Calls","RM-Connect |".$crmcall->client,""); | ||
| 1203 | }else{ | ||
| 1200 | $newqueue->sipNotify($tsip,"popupalert"," Incoming Calls",$crmcall->number."|".$crmcall->client,""); | 1204 | $newqueue->sipNotify($tsip,"popupalert"," Incoming Calls",$crmcall->number."|".$crmcall->client,""); |
| 1201 | } | 1205 | } |
| 1206 | //$newqueue->sipNotify($tsip,"popupalert"," Incoming Calls",$crmcall->number."|".$crmcall->client,""); | ||
| 1207 | } | ||
| 1202 | } | 1208 | } |
| 1203 | else | 1209 | else |
| 1204 | { | 1210 | { | ... | ... |
-
Please register or sign in to post a comment