Updated Latest changes
Showing
144 changed files
with
1529 additions
and
1664 deletions
application/031118_Version.txt
0 → 100644
| 1 | Version No. 1.19v | ||
| 2 | Changes:made changes by Jadhav in getPersonshome function,KHRMSLib.php | ||
| 3 | Date: 12/09/2018 | ||
| 4 | |||
| 5 | Version No. 1.18v | ||
| 6 | Changes: Missed calls to changed will reflect after 11th sept.,Changes DialerController.php and dialer.blade.php | ||
| 7 | Date: 10/09/2018 | ||
| 8 | |||
| 9 | Version No. 1.17v | ||
| 10 | Changes: DAP implementation, Changes KFormLib has been Changed, | ||
| 11 | Date: 10/09/2018 | ||
| 12 | |||
| 13 | Version No. 1.16v | ||
| 14 | Changes: missed call bucket in order Changes KHRMSLib.php added one function for asc | ||
| 15 | Date: 10/09/2018 | ||
| 16 | |||
| 17 | Version No. 1.15v | ||
| 18 | Changes: progressive new logic like COP, Changes dialerController.php | ||
| 19 | Date: 08/09/2018 | ||
| 20 | |||
| 21 | Version No. 1.14v | ||
| 22 | Changes: agent time report updated, commented if condition. | ||
| 23 | Date: 03/09/2018 | ||
| 24 | |||
| 25 | Version No. 1.13v | ||
| 26 | Changes: hangup beep, footer.blade.php, dialer.js changed and hangup beep added to assets/sounds/ | ||
| 27 | Date: 11/08/2018 Only on Mumbai servers | ||
| 28 | |||
| 29 | Version No. 1.12v | ||
| 30 | Changes: followup for new disposition, DialerController.php and dialer.js is changed. | ||
| 31 | Date: 11/08/2018 | ||
| 32 | |||
| 33 | Version No. 1.11v | ||
| 34 | Changes: Master report download, Changes main.blade.php, Added two libraries lib, php, KHRMS.php, XLSX library. | ||
| 35 | Date: 08/08/2018 | ||
| 36 | |||
| 37 | Version No. 1.10v | ||
| 38 | Changes: Username for inbounddrop and Userbusy for SIP/GATEWAY , Changes KPAMIListen.php | ||
| 39 | Date: 02/08/2018 | ||
| 40 | |||
| 41 | Version No. 1.9v | ||
| 42 | Changes: Call log report supervisor, and Date range in call report. | ||
| 43 | Date: 30/07/2018 | ||
| 44 | |||
| 45 | Version No. 1.8v | ||
| 46 | Changes: HDFC Mogo, Changes 1.extension.conf, 2.DialerController.php, 3.mogo tune in moh location. | ||
| 47 | Date 20/07/2018 | ||
| 48 | |||
| 49 | Version No. 1.7V | ||
| 50 | Changes: Live report reload button issue, commented one line of code in Livereport.blade.php | ||
| 51 | Date: 19/07/2018 | ||
| 52 | |||
| 53 | Versio No. 1.6V | ||
| 54 | Changes: call forward, KPAMIListen, .env and extension.conf file updated | ||
| 55 | Date: 14/07/2018 | ||
| 56 | |||
| 57 | Version No. 1.5V | ||
| 58 | Changes: Birthday calls for progressive mode, DialerController.php is updated | ||
| 59 | Date: 13/07/2018 | ||
| 60 | |||
| 61 | Version No. 1.4V | ||
| 62 | Changes: To Blank diallines, DailyLogout.php is updated. | ||
| 63 | Date: 6/07/2018 | ||
| 64 | |||
| 65 | Version No. 1.3v | ||
| 66 | Changes: Bulkupload | ||
| 67 | Date: 5/07/2018 | ||
| 68 | |||
| 69 | Version NO. 1.2v | ||
| 70 | Changes: To remove multiple circles in dialer, dialer.js is updated. | ||
| 71 | Date: 4/07/2018 | ||
| 72 | |||
| 73 | Version No. 1.1v | ||
| 74 | Changes: To remove Inbound Portfolio issue, KPAMIListen updated. | ||
| 75 | Date: 18/06/2018 | ||
| 76 | |||
| 77 |
application/1009_Version.txt
0 → 100644
| 1 | Version No. 1.14v | ||
| 2 | Changes: agent time report updated, commented if condition. | ||
| 3 | Date: 03/09/2018 | ||
| 4 | |||
| 5 | Version No. 1.13v | ||
| 6 | Changes: hangup beep, footer.blade.php, dialer.js changed and hangup beep added to assets/sounds/ | ||
| 7 | Date: 11/08/2018 Only on Mumbai servers | ||
| 8 | |||
| 9 | Version No. 1.12v | ||
| 10 | Changes: followup for new disposition, DialerController.php and dialer.js is changed. | ||
| 11 | Date: 11/08/2018 | ||
| 12 | |||
| 13 | Version No. 1.11v | ||
| 14 | Changes: Master report download, Changes main.blade.php, Added two libraries lib, php, KHRMS.php, XLSX library. | ||
| 15 | Date: 08/08/2018 | ||
| 16 | |||
| 17 | Version No. 1.10v | ||
| 18 | Changes: Username for inbounddrop and Userbusy for SIP/GATEWAY , Changes KPAMIListen.php | ||
| 19 | Date: 02/08/2018 | ||
| 20 | |||
| 21 | Version No. 1.9v | ||
| 22 | Changes: Call log report supervisor, and Date range in call report. | ||
| 23 | Date: 30/07/2018 | ||
| 24 | |||
| 25 | Version No. 1.8v | ||
| 26 | Changes: HDFC Mogo, Changes 1.extension.conf, 2.DialerController.php, 3.mogo tune in moh location. | ||
| 27 | Date 20/07/2018 | ||
| 28 | |||
| 29 | Version No. 1.7V | ||
| 30 | Changes: Live report reload button issue, commented one line of code in Livereport.blade.php | ||
| 31 | Date: 19/07/2018 | ||
| 32 | |||
| 33 | Versio No. 1.6V | ||
| 34 | Changes: call forward, KPAMIListen, .env and extension.conf file updated | ||
| 35 | Date: 14/07/2018 | ||
| 36 | |||
| 37 | Version No. 1.5V | ||
| 38 | Changes: Birthday calls for progressive mode, DialerController.php is updated | ||
| 39 | Date: 13/07/2018 | ||
| 40 | |||
| 41 | Version No. 1.4V | ||
| 42 | Changes: To Blank diallines, DailyLogout.php is updated. | ||
| 43 | Date: 6/07/2018 | ||
| 44 | |||
| 45 | Version No. 1.3v | ||
| 46 | Changes: Bulkupload | ||
| 47 | Date: 5/07/2018 | ||
| 48 | |||
| 49 | Version NO. 1.2v | ||
| 50 | Changes: To remove multiple circles in dialer, dialer.js is updated. | ||
| 51 | Date: 4/07/2018 | ||
| 52 | |||
| 53 | Version No. 1.1v | ||
| 54 | Changes: To remove Inbound Portfolio issue, KPAMIListen updated. | ||
| 55 | Date: 18/06/2018 | ||
| 56 | |||
| 57 |
application/131118_Version.txt
0 → 100644
| 1 | Version No. 1.20v | ||
| 2 | Changes:Dialer Controller for Diallines blocked, KPAMIListen for Log comment, show.blade.php casesensitivity campaign error: No Access | ||
| 3 | Date: 02/11/2018 | ||
| 4 | |||
| 5 | Version No. 1.19v | ||
| 6 | Changes:made changes by Jadhav in getPersonshome function,KHRMSLib.php | ||
| 7 | Date: 12/09/2018 | ||
| 8 | |||
| 9 | Version No. 1.18v | ||
| 10 | Changes: Missed calls to changed will reflect after 11th sept.,Changes DialerController.php and dialer.blade.php | ||
| 11 | Date: 10/09/2018 | ||
| 12 | |||
| 13 | Version No. 1.17v | ||
| 14 | Changes: DAP implementation, Changes KFormLib has been Changed, | ||
| 15 | Date: 10/09/2018 | ||
| 16 | |||
| 17 | Version No. 1.16v | ||
| 18 | Changes: missed call bucket in order Changes KHRMSLib.php added one function for asc | ||
| 19 | Date: 10/09/2018 | ||
| 20 | |||
| 21 | Version No. 1.15v | ||
| 22 | Changes: progressive new logic like COP, Changes dialerController.php | ||
| 23 | Date: 08/09/2018 | ||
| 24 | |||
| 25 | Version No. 1.14v | ||
| 26 | Changes: agent time report updated, commented if condition. | ||
| 27 | Date: 03/09/2018 | ||
| 28 | |||
| 29 | Version No. 1.13v | ||
| 30 | Changes: hangup beep, footer.blade.php, dialer.js changed and hangup beep added to assets/sounds/ | ||
| 31 | Date: 11/08/2018 Only on Mumbai servers | ||
| 32 | |||
| 33 | Version No. 1.12v | ||
| 34 | Changes: followup for new disposition, DialerController.php and dialer.js is changed. | ||
| 35 | Date: 11/08/2018 | ||
| 36 | |||
| 37 | Version No. 1.11v | ||
| 38 | Changes: Master report download, Changes main.blade.php, Added two libraries lib, php, KHRMS.php, XLSX library. | ||
| 39 | Date: 08/08/2018 | ||
| 40 | |||
| 41 | Version No. 1.10v | ||
| 42 | Changes: Username for inbounddrop and Userbusy for SIP/GATEWAY , Changes KPAMIListen.php | ||
| 43 | Date: 02/08/2018 | ||
| 44 | |||
| 45 | Version No. 1.9v | ||
| 46 | Changes: Call log report supervisor, and Date range in call report. | ||
| 47 | Date: 30/07/2018 | ||
| 48 | |||
| 49 | Version No. 1.8v | ||
| 50 | Changes: HDFC Mogo, Changes 1.extension.conf, 2.DialerController.php, 3.mogo tune in moh location. | ||
| 51 | Date 20/07/2018 | ||
| 52 | |||
| 53 | Version No. 1.7V | ||
| 54 | Changes: Live report reload button issue, commented one line of code in Livereport.blade.php | ||
| 55 | Date: 19/07/2018 | ||
| 56 | |||
| 57 | Versio No. 1.6V | ||
| 58 | Changes: call forward, KPAMIListen, .env and extension.conf file updated | ||
| 59 | Date: 14/07/2018 | ||
| 60 | |||
| 61 | Version No. 1.5V | ||
| 62 | Changes: Birthday calls for progressive mode, DialerController.php is updated | ||
| 63 | Date: 13/07/2018 | ||
| 64 | |||
| 65 | Version No. 1.4V | ||
| 66 | Changes: To Blank diallines, DailyLogout.php is updated. | ||
| 67 | Date: 6/07/2018 | ||
| 68 | |||
| 69 | Version No. 1.3v | ||
| 70 | Changes: Bulkupload | ||
| 71 | Date: 5/07/2018 | ||
| 72 | |||
| 73 | Version NO. 1.2v | ||
| 74 | Changes: To remove multiple circles in dialer, dialer.js is updated. | ||
| 75 | Date: 4/07/2018 | ||
| 76 | |||
| 77 | Version No. 1.1v | ||
| 78 | Changes: To remove Inbound Portfolio issue, KPAMIListen updated. | ||
| 79 | Date: 18/06/2018 | ||
| 80 | |||
| 81 |
| 1 | The difference between this server and other servers is KPAMIListen.php Please make sure updating this file. | 1 | Version No.1.21v |
| 2 | Changes: DialerController for the after New calls based on Subdispo Not contacted call will come in the queue. | ||
| 3 | Date: 12/11/2018 | ||
| 4 | |||
| 5 | Version No. 1.20v | ||
| 6 | Changes:Dialer Controller for Diallines blocked, KPAMIListen for Log comment, show.blade.php casesensitivity campaign error: No Access | ||
| 7 | Date: 02/11/2018 | ||
| 8 | |||
| 9 | Version No. 1.19v | ||
| 10 | Changes:made changes by Jadhav in getPersonshome function,KHRMSLib.php | ||
| 11 | Date: 12/09/2018 | ||
| 12 | |||
| 13 | Version No. 1.18v | ||
| 14 | Changes: Missed calls to changed will reflect after 11th sept.,Changes DialerController.php and dialer.blade.php | ||
| 15 | Date: 10/09/2018 | ||
| 16 | |||
| 17 | Version No. 1.17v | ||
| 18 | Changes: DAP implementation, Changes KFormLib has been Changed, | ||
| 19 | Date: 10/09/2018 | ||
| 20 | |||
| 21 | Version No. 1.16v | ||
| 22 | Changes: missed call bucket in order Changes KHRMSLib.php added one function for asc | ||
| 23 | Date: 10/09/2018 | ||
| 24 | |||
| 25 | Version No. 1.15v | ||
| 26 | Changes: progressive new logic like COP, Changes dialerController.php | ||
| 27 | Date: 08/09/2018 | ||
| 2 | 28 | ||
| 3 | Version No. 1.14v | 29 | Version No. 1.14v |
| 4 | Changes: agent time report updated, commented if condition. | 30 | Changes: agent time report updated, commented if condition. | ... | ... |
No preview for this file type
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkserverupload_data extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkserverupload_data'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkserverupload_data'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "2"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat_150918 where SERVER_IP='$server_ip'")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat_150918'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["clientcode"]!="") | ||
| 113 | { | ||
| 114 | /*if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else*/ | ||
| 119 | $excelarray[$i]["clientcode"]=intval($excelarray[$i]["clientcode"]); | ||
| 120 | //$excelarray[$i]["client"]=$excelarray[$i]["rm_code"]; | ||
| 121 | if($wakka->getCount("records","clientcode='".$excelarray[$i]["clientcode"]."'")==1) | ||
| 122 | { | ||
| 123 | //$empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 124 | $empdata=$wakka->getPersonServer($excelarray[$i]["clientcode"]); | ||
| 125 | $ppldata=$empdata["peopledata"]; | ||
| 126 | $createdlog=$empdata['modifylog']; | ||
| 127 | $fdirty=$empdata['dirty']; | ||
| 128 | |||
| 129 | $createdlog[$updatetime]=$username."::"; | ||
| 130 | $createdlog["updated"]=$updatetime; | ||
| 131 | |||
| 132 | $newdata=$ppldata; | ||
| 133 | foreach($excelarray[$i] as $key => $value) | ||
| 134 | { | ||
| 135 | if($value!="") | ||
| 136 | { | ||
| 137 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 138 | { | ||
| 139 | $value=str_replace("'"," ",$value); | ||
| 140 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 141 | |||
| 142 | $fdirty[$key]=1; | ||
| 143 | |||
| 144 | $newdata[$key]=$value; | ||
| 145 | } | ||
| 146 | } | ||
| 147 | } | ||
| 148 | |||
| 149 | /*Start - Changes need to be done*/ | ||
| 150 | |||
| 151 | if($excelarray[$i]["status"]==null) | ||
| 152 | { | ||
| 153 | $empdata['status'] = "rom"; | ||
| 154 | } | ||
| 155 | |||
| 156 | if($excelarray[$i]["dialer_status"]==null) | ||
| 157 | { | ||
| 158 | $empdata['dialer_status'] = "rom"; | ||
| 159 | } | ||
| 160 | |||
| 161 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 162 | { | ||
| 163 | $empdata['dialer_substatus'] = "rom"; | ||
| 164 | } | ||
| 165 | |||
| 166 | /*End - Changes need to be done*/ | ||
| 167 | |||
| 168 | $empdata["peopledata"]=$newdata; | ||
| 169 | $empdata['modifylog']=$createdlog; | ||
| 170 | $empdata['dirty']=$fdirty; | ||
| 171 | |||
| 172 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 173 | $wakka->setPersonServer($excelarray[$i]["clientcode"],$empdata); | ||
| 174 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 175 | $successArr[] = $excelarray[$i]; | ||
| 176 | |||
| 177 | } | ||
| 178 | else | ||
| 179 | { | ||
| 180 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 181 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 182 | $ppldata=$empdata["peopledata"]; | ||
| 183 | $createdlog=$empdata['modifylog']; | ||
| 184 | $fdirty=$empdata['dirty']; | ||
| 185 | |||
| 186 | |||
| 187 | $createdlog[$updatetime]=$username."::"; | ||
| 188 | $createdlog["updated"]=$updatetime; | ||
| 189 | |||
| 190 | $newdata=$ppldata; | ||
| 191 | foreach($excelarray[$i] as $key => $value) | ||
| 192 | { | ||
| 193 | if($value!="") | ||
| 194 | { | ||
| 195 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 196 | { | ||
| 197 | $value=str_replace("'"," ",$value); | ||
| 198 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 199 | |||
| 200 | $fdirty[$key]=1; | ||
| 201 | |||
| 202 | $newdata[$key]=$value; | ||
| 203 | } | ||
| 204 | } | ||
| 205 | } | ||
| 206 | $empdata["peopledata"]=$newdata; | ||
| 207 | $empdata['modifylog']=$createdlog; | ||
| 208 | $empdata['dirty']=$fdirty; | ||
| 209 | |||
| 210 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 211 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 212 | |||
| 213 | $reason = ""; | ||
| 214 | |||
| 215 | $reason .= "Record ID is not on local server,"; | ||
| 216 | |||
| 217 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 218 | $excelarray[$i]['location'] =$location; | ||
| 219 | |||
| 220 | if($excelarray[$i]["clientcode"]!="") | ||
| 221 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 222 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 223 | |||
| 224 | $excelarray[$i]['Reason'] = $reason; | ||
| 225 | |||
| 226 | $failureArr[] = $excelarray[$i]; | ||
| 227 | |||
| 228 | } | ||
| 229 | } | ||
| 230 | else | ||
| 231 | { | ||
| 232 | |||
| 233 | $reason = ""; | ||
| 234 | |||
| 235 | if($excelarray[$i]["id"]=="") | ||
| 236 | $reason .= "Column ID is blank,"; | ||
| 237 | |||
| 238 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 239 | $excelarray[$i]['location'] =$location; | ||
| 240 | |||
| 241 | if($excelarray[$i]["clientcode"]!="") | ||
| 242 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 243 | |||
| 244 | $excelarray[$i]['Reason'] = $reason; | ||
| 245 | |||
| 246 | $failureArr[] = $excelarray[$i]; | ||
| 247 | |||
| 248 | } | ||
| 249 | |||
| 250 | } | ||
| 251 | /*if(!empty($successArr)){ | ||
| 252 | foreach($successArr as $succes) | ||
| 253 | { | ||
| 254 | $setSuccess=array(); | ||
| 255 | |||
| 256 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 257 | $setSuccess[] = "location='$location'"; | ||
| 258 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 259 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 260 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 261 | |||
| 262 | $setSuccess = implode(",",$setSuccess); | ||
| 263 | |||
| 264 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_success set $setSuccess")); | ||
| 265 | } | ||
| 266 | } | ||
| 267 | if(!empty($failureArr)){ | ||
| 268 | foreach($failureArr as $failur) | ||
| 269 | { | ||
| 270 | $setFailure=array(); | ||
| 271 | |||
| 272 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 273 | $setFailure[] = "location='$location'"; | ||
| 274 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 275 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 276 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 277 | |||
| 278 | $setFailure = implode(",",$setFailure); | ||
| 279 | |||
| 280 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 281 | } | ||
| 282 | }*/ | ||
| 283 | |||
| 284 | DB::connection("conn")->disconnect(); | ||
| 285 | } | ||
| 286 | } |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | |||
| 19 | use Illuminate\Database\Schema\Blueprint; | ||
| 20 | |||
| 21 | class bulkServerUpload extends Command { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * The console command name. | ||
| 25 | * | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | protected $signature = 'bulkServerUpload'; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command description. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $description = 'bulkServerUpload'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Execute the console command. | ||
| 39 | * | ||
| 40 | * @return mixed | ||
| 41 | */ | ||
| 42 | public function handle() | ||
| 43 | { | ||
| 44 | |||
| 45 | //echo "\n".date('Y-m-d')."\n"; | ||
| 46 | |||
| 47 | echo "2"; | ||
| 48 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 49 | $server_ip=env('app_ip'); | ||
| 50 | $central_ip=env('central_ip'); | ||
| 51 | |||
| 52 | |||
| 53 | $wakka = new KHRMSLib(); | ||
| 54 | |||
| 55 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | ||
| 56 | $kformlib->gthis=$wakka; | ||
| 57 | |||
| 58 | $themehome=$wakka->GetThemePath('/'); | ||
| 59 | $updatetime=time(); | ||
| 60 | |||
| 61 | $clientlst=$wakka->GetBBBUserData("clientslist"); | ||
| 62 | |||
| 63 | $isadmin=$wakka->IsAdmin(); | ||
| 64 | $username=$wakka->GetUserName(); | ||
| 65 | $triggers=Input::get("triggers"); | ||
| 66 | $tmpstr=explode(",",$kformlib->HRFiledsStr); | ||
| 67 | |||
| 68 | $success="";$message="";$successcnt=0;$duplicatecount=0; | ||
| 69 | |||
| 70 | |||
| 71 | $conn = array( | ||
| 72 | 'driver' => 'mysql', | ||
| 73 | 'host' => $central_ip, | ||
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 75 | 'username' => env('DB_USERNAME', 'root'), | ||
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | ||
| 77 | 'charset' => 'utf8', | ||
| 78 | 'collation' => 'utf8_unicode_ci', | ||
| 79 | 'prefix' => '', | ||
| 80 | 'options' => array( | ||
| 81 | PDO::ATTR_TIMEOUT => 5, | ||
| 82 | ), | ||
| 83 | ); | ||
| 84 | Config::set("database.connections.conn", $conn); | ||
| 85 | |||
| 86 | DB::connection("conn")->getDatabaseName(); | ||
| 87 | |||
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | ||
| 89 | $location=$serverclist[0]->location; | ||
| 90 | |||
| 91 | |||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat_09102018_1 where SERVER_IP='$server_ip'")); | ||
| 93 | |||
| 94 | $conn=''; | ||
| 95 | |||
| 96 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 97 | |||
| 98 | foreach($excelarray as $key => $array){ | ||
| 99 | $excelarray[$key] = (array)$array; | ||
| 100 | } | ||
| 101 | |||
| 102 | $highestColumn = DB::connection("conn")->select(DB::raw("select count(*) as cnt from information_schema.columns where table_name='bz_record_upload_uat_09102018_1'")); | ||
| 103 | $highestColumn = $highestColumn[0]->cnt; | ||
| 104 | |||
| 105 | $highestrow = count($excelarray); | ||
| 106 | |||
| 107 | $flag = 0; | ||
| 108 | $editflag=0; | ||
| 109 | |||
| 110 | for($i=0;$i<$highestrow;$i++) | ||
| 111 | { | ||
| 112 | if($excelarray[$i]["clientcode"]!="") | ||
| 113 | { | ||
| 114 | /*if($excelarray[$i]["id"]=="CREATE") | ||
| 115 | { | ||
| 116 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 117 | } | ||
| 118 | else*/ | ||
| 119 | $excelarray[$i]["clientcode"]=intval($excelarray[$i]["clientcode"]); | ||
| 120 | //$excelarray[$i]["client"]=$excelarray[$i]["rm_code"]; | ||
| 121 | if($wakka->getCount("records","clientcode='".$excelarray[$i]["clientcode"]."'")==1) | ||
| 122 | { | ||
| 123 | //$empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 124 | $empdata=$wakka->getPersonServer($excelarray[$i]["clientcode"]); | ||
| 125 | $excelarray[$i]["other_information"]='2018-10-09_1'; | ||
| 126 | $ppldata=$empdata["peopledata"]; | ||
| 127 | $createdlog=$empdata['modifylog']; | ||
| 128 | $fdirty=$empdata['dirty']; | ||
| 129 | |||
| 130 | $createdlog[$updatetime]=$username."::"; | ||
| 131 | $createdlog["updated"]=$updatetime; | ||
| 132 | |||
| 133 | $newdata=$ppldata; | ||
| 134 | foreach($excelarray[$i] as $key => $value) | ||
| 135 | { | ||
| 136 | if($value!="") | ||
| 137 | { | ||
| 138 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 139 | { | ||
| 140 | $value=str_replace("'"," ",$value); | ||
| 141 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 142 | |||
| 143 | $fdirty[$key]=1; | ||
| 144 | |||
| 145 | $newdata[$key]=$value; | ||
| 146 | } | ||
| 147 | } | ||
| 148 | } | ||
| 149 | |||
| 150 | /*Start - Changes need to be done*/ | ||
| 151 | |||
| 152 | if($excelarray[$i]["status"]==null) | ||
| 153 | { | ||
| 154 | $empdata['status'] = "rom"; | ||
| 155 | } | ||
| 156 | |||
| 157 | if($excelarray[$i]["dialer_status"]==null) | ||
| 158 | { | ||
| 159 | $empdata['dialer_status'] = "rom"; | ||
| 160 | } | ||
| 161 | |||
| 162 | if($excelarray[$i]["dialer_substatus"]==null) | ||
| 163 | { | ||
| 164 | $empdata['dialer_substatus'] = "rom"; | ||
| 165 | } | ||
| 166 | |||
| 167 | /*End - Changes need to be done*/ | ||
| 168 | |||
| 169 | $empdata["peopledata"]=$newdata; | ||
| 170 | $empdata['modifylog']=$createdlog; | ||
| 171 | $empdata['dirty']=$fdirty; | ||
| 172 | |||
| 173 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 174 | $wakka->setPersonServer($excelarray[$i]["clientcode"],$empdata); | ||
| 175 | $excelarray[$i]['modified']=date('Y-m-d H:i:s'); | ||
| 176 | $successArr[] = $excelarray[$i]; | ||
| 177 | |||
| 178 | } | ||
| 179 | else | ||
| 180 | { | ||
| 181 | $excelarray[$i]["id"]=$wakka->Query("insert into","","records",array('created'=>date('Y-m-d H:i:s'))); | ||
| 182 | $empdata=$wakka->getPerson($excelarray[$i]["id"]); | ||
| 183 | $ppldata=$empdata["peopledata"]; | ||
| 184 | $createdlog=$empdata['modifylog']; | ||
| 185 | $fdirty=$empdata['dirty']; | ||
| 186 | |||
| 187 | |||
| 188 | $createdlog[$updatetime]=$username."::"; | ||
| 189 | $createdlog["updated"]=$updatetime; | ||
| 190 | |||
| 191 | $newdata=$ppldata; | ||
| 192 | foreach($excelarray[$i] as $key => $value) | ||
| 193 | { | ||
| 194 | if($value!="") | ||
| 195 | { | ||
| 196 | if("A".$ppldata[$key]!="A".$value)//forcing string comparrision //MAGIC | ||
| 197 | { | ||
| 198 | $value=str_replace("'"," ",$value); | ||
| 199 | if(strstr($createdlog[$updatetime],$key)==FALSE)$createdlog[$updatetime].="$key|".str_replace(array("|",",")," ",$ppldata[$key])."|".str_replace(array("|",",")," ",$value).","; | ||
| 200 | |||
| 201 | $fdirty[$key]=1; | ||
| 202 | |||
| 203 | $newdata[$key]=$value; | ||
| 204 | } | ||
| 205 | } | ||
| 206 | } | ||
| 207 | $empdata["peopledata"]=$newdata; | ||
| 208 | $empdata['modifylog']=$createdlog; | ||
| 209 | $empdata['dirty']=$fdirty; | ||
| 210 | |||
| 211 | //$wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 212 | $wakka->setPerson($excelarray[$i]["id"],$empdata); | ||
| 213 | |||
| 214 | $reason = ""; | ||
| 215 | |||
| 216 | $reason .= "Record ID is not on local server,"; | ||
| 217 | |||
| 218 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 219 | $excelarray[$i]['location'] =$location; | ||
| 220 | |||
| 221 | if($excelarray[$i]["clientcode"]!="") | ||
| 222 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 223 | $excelarray[$i]['record_id'] = $excelarray[$i]["id"]; | ||
| 224 | |||
| 225 | $excelarray[$i]['Reason'] = $reason; | ||
| 226 | |||
| 227 | $failureArr[] = $excelarray[$i]; | ||
| 228 | |||
| 229 | } | ||
| 230 | } | ||
| 231 | else | ||
| 232 | { | ||
| 233 | |||
| 234 | $reason = ""; | ||
| 235 | |||
| 236 | if($excelarray[$i]["id"]=="") | ||
| 237 | $reason .= "Column ID is blank,"; | ||
| 238 | |||
| 239 | $excelarray[$i]['server_ip'] =$server_ip; | ||
| 240 | $excelarray[$i]['location'] =$location; | ||
| 241 | |||
| 242 | if($excelarray[$i]["clientcode"]!="") | ||
| 243 | $excelarray[$i]['cust_id'] =$excelarray[$i]["clientcode"]; | ||
| 244 | |||
| 245 | $excelarray[$i]['Reason'] = $reason; | ||
| 246 | |||
| 247 | $failureArr[] = $excelarray[$i]; | ||
| 248 | |||
| 249 | } | ||
| 250 | |||
| 251 | } | ||
| 252 | echo "\n"."Updated data partial upload end"."\n"; | ||
| 253 | /*if(!empty($successArr)){ | ||
| 254 | foreach($successArr as $succes) | ||
| 255 | { | ||
| 256 | $setSuccess=array(); | ||
| 257 | |||
| 258 | $setSuccess[] = "server_ip='$server_ip'"; | ||
| 259 | $setSuccess[] = "location='$location'"; | ||
| 260 | $setSuccess[] = "record_id='".$succes['id']."'"; | ||
| 261 | $setSuccess[] = "cust_id='".$succes['clientcode']."'"; | ||
| 262 | $setSuccess[] = "modified='".$succes['modified']."'"; | ||
| 263 | |||
| 264 | $setSuccess = implode(",",$setSuccess); | ||
| 265 | |||
| 266 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_09102018_1_success set $setSuccess")); | ||
| 267 | } | ||
| 268 | } | ||
| 269 | if(!empty($failureArr)){ | ||
| 270 | foreach($failureArr as $failur) | ||
| 271 | { | ||
| 272 | $setFailure=array(); | ||
| 273 | |||
| 274 | $setFailure[] = "server_ip='$server_ip'"; | ||
| 275 | $setFailure[] = "location='$location'"; | ||
| 276 | $setFailure[] = "cust_id='".$failur['clientcode']."'"; | ||
| 277 | $setFailure[] = "record_id='".$failur['record_id']."'"; | ||
| 278 | $setFailure[] = "reason='".$failur['Reason']."'"; | ||
| 279 | |||
| 280 | $setFailure = implode(",",$setFailure); | ||
| 281 | |||
| 282 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | ||
| 283 | } | ||
| 284 | }*/ | ||
| 285 | |||
| 286 | DB::connection("conn")->disconnect(); | ||
| 287 | } | ||
| 288 | } |
application/app/Console/Commands/BirthdayDate.php
100644 → 100755
File mode changed
application/app/Console/Commands/Calllogupdate.php
100644 → 100755
| ... | @@ -50,9 +50,9 @@ class Calllogupdate extends Command { | ... | @@ -50,9 +50,9 @@ class Calllogupdate extends Command { |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | use App\Http\Controllers\DialerController; | ||
| 17 | |||
| 18 | use Input; | ||
| 19 | use Log; | ||
| 20 | use App\Models\Sipid; | ||
| 21 | use App\Models\Kqueue; | ||
| 22 | use App\Models\Dialline; | ||
| 23 | use App\Models\Session; | ||
| 24 | use App\Models\Cutoff; | ||
| 25 | |||
| 26 | use Illuminate\Database\Schema\Blueprint; | ||
| 27 | |||
| 28 | class CreateCall extends Command { | ||
| 29 | |||
| 30 | /** | ||
| 31 | * The console command name. | ||
| 32 | * | ||
| 33 | * @var string | ||
| 34 | */ | ||
| 35 | protected $signature = 'CreateCall'; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * The console command description. | ||
| 39 | * | ||
| 40 | * @var string | ||
| 41 | */ | ||
| 42 | protected $description = 'Create Pedictive Call If any User is Free'; | ||
| 43 | |||
| 44 | /** | ||
| 45 | * Execute the console command. | ||
| 46 | * | ||
| 47 | * @return mixed | ||
| 48 | */ | ||
| 49 | public function handle() | ||
| 50 | { | ||
| 51 | while(true) | ||
| 52 | { | ||
| 53 | usleep(2000000); | ||
| 54 | $this->runPredictive(); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | public function runPredictive() | ||
| 59 | { | ||
| 60 | |||
| 61 | try { | ||
| 62 | $this->updatePrepareColumn(); | ||
| 63 | $usrArrs = $this->getActiveUsersCampaignWise("with"); | ||
| 64 | $cntAndStrArr = $this->getActualAvailChannelCount(); | ||
| 65 | |||
| 66 | $availChannel = $cntAndStrArr['cnt']; | ||
| 67 | $availDialStr = $cntAndStrArr['dialstr']; | ||
| 68 | |||
| 69 | if(count($usrArrs)){ | ||
| 70 | |||
| 71 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 72 | //Log::info($usrArrs); | ||
| 73 | |||
| 74 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 75 | //Log::info("Channel=".$availChannel); | ||
| 76 | |||
| 77 | foreach ($usrArrs as $client => $usrArr) { | ||
| 78 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 79 | //Log::info("campaign=".$client); | ||
| 80 | |||
| 81 | $acalls = $this->getCreateCallCount($client, count($usrArr)); | ||
| 82 | |||
| 83 | $acalls = min($acalls, $availChannel); | ||
| 84 | |||
| 85 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 86 | //Log::info("CallCount=".$acalls); | ||
| 87 | |||
| 88 | $this->CreateCall($client, $acalls, $availDialStr); | ||
| 89 | } | ||
| 90 | } | ||
| 91 | } catch (Exception $e) { | ||
| 92 | Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 93 | Log::error($e); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | |||
| 97 | public function updatePrepareColumn() | ||
| 98 | { | ||
| 99 | $allClientUsrIdArr = array(); | ||
| 100 | $updatedUserIdArr = array(); | ||
| 101 | $currentTime = strtotime(date("Y-m-d H:i:s")); | ||
| 102 | |||
| 103 | $clientWiseUserIdArr = $this->getActiveUsersCampaignWise("without"); | ||
| 104 | |||
| 105 | if(count($clientWiseUserIdArr)) { | ||
| 106 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 107 | //Log::info("updatePrepareColumn");Log::info($clientWiseUserIdArr); | ||
| 108 | |||
| 109 | foreach ($clientWiseUserIdArr as $client => $usrIdArr) { | ||
| 110 | $allClientUsrIdArr = array_merge($allClientUsrIdArr, $usrIdArr); | ||
| 111 | } | ||
| 112 | |||
| 113 | $usersTimeArr = Cutoff::whereIn('user_id', $allClientUsrIdArr)->get(); | ||
| 114 | |||
| 115 | foreach ($usersTimeArr as $userTimeArr) { | ||
| 116 | $cutOffTime = strtotime($userTimeArr->hangup_time) + ($userTimeArr->avg_dispo - $userTimeArr->avg_ring); | ||
| 117 | |||
| 118 | if($cutOffTime < $currentTime) | ||
| 119 | { | ||
| 120 | $updatedUserIdArr[] = $userTimeArr->user_id; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | |||
| 124 | if(count($updatedUserIdArr)) { | ||
| 125 | //Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 126 | //Log::info("updatedUserIdArr");Log::info($updatedUserIdArr); | ||
| 127 | } | ||
| 128 | |||
| 129 | DB::table('sipids')->whereIn('user', $updatedUserIdArr)->update(['prepare_call'=>1]); | ||
| 130 | } | ||
| 131 | } | ||
| 132 | |||
| 133 | public function getActiveUsersCampaignWise($checkPrepareCol) | ||
| 134 | { | ||
| 135 | $campaignWiseUsrs = array(); | ||
| 136 | $prepareUsrIds = array(); | ||
| 137 | |||
| 138 | $loggedInSips = Sipid::where('server','=',env('app_ip'))->where("user", "!=", 0)->where("status","=","1"); | ||
| 139 | if($checkPrepareCol=="with"){ | ||
| 140 | $loggedInSips = $loggedInSips->where("prepare_call","=","1"); | ||
| 141 | } | ||
| 142 | elseif($checkPrepareCol=="without"){ | ||
| 143 | $loggedInSips = $loggedInSips->where("patched","=","0"); | ||
| 144 | } | ||
| 145 | |||
| 146 | $loggedInSips = $loggedInSips->groupBy('user')->get(); | ||
| 147 | |||
| 148 | if(count($loggedInSips)){ | ||
| 149 | |||
| 150 | foreach ($loggedInSips as $loggedInSip) { | ||
| 151 | $prepareUsrIds[] = $loggedInSip->user; | ||
| 152 | } | ||
| 153 | |||
| 154 | //TODO: Change Dialmode Value in the column Of User Table (Ready to Predictive) | ||
| 155 | $usersLoggedIn = User::whereIn('id', $prepareUsrIds); | ||
| 156 | if($checkPrepareCol=="without")$usersLoggedIn = $usersLoggedIn->where('current_dialmode', '=', 'Predictive'); | ||
| 157 | $usersLoggedIn = $usersLoggedIn->select('id','sel_campaign')->get(); | ||
| 158 | |||
| 159 | foreach ($usersLoggedIn as $userLoggedIn) { | ||
| 160 | $campaignWiseUsrs[$userLoggedIn->sel_campaign][] = $userLoggedIn->id; | ||
| 161 | } | ||
| 162 | } | ||
| 163 | return $campaignWiseUsrs; | ||
| 164 | } | ||
| 165 | |||
| 166 | public function getActualAvailChannelCount() | ||
| 167 | { | ||
| 168 | $data = array(); | ||
| 169 | $cnt = 0; | ||
| 170 | $allChanlCnt = $this->getSpanCount(); | ||
| 171 | $dialstr = ""; | ||
| 172 | |||
| 173 | $diallineVal = Dialline::where('server','=', env('app_ip'))->where("status","=","Free")->where("dialstr","!=","")->where("enabled","=","1")->select('dialstr')->first(); | ||
| 174 | |||
| 175 | //TODO: When SIP and Dahdi both are active | ||
| 176 | if(count($diallineVal)){ | ||
| 177 | if(stristr($diallineVal->dialstr,"Dahdi")){ | ||
| 178 | $dialedCnt = $this->getActualDahdiDialedCallCount(); | ||
| 179 | |||
| 180 | $cnt = $allChanlCnt - $dialedCnt; | ||
| 181 | } | ||
| 182 | elseif(stristr($diallineVal->dialstr,"GATEWAY")){ | ||
| 183 | $dialedCnt = $this->getActualSipDialedCallCount(); | ||
| 184 | |||
| 185 | $cnt = $allChanlCnt - $dialedCnt; | ||
| 186 | } | ||
| 187 | |||
| 188 | $dialstr = $diallineVal->dialstr; | ||
| 189 | } | ||
| 190 | |||
| 191 | $data['cnt'] = $cnt; | ||
| 192 | $data['dialstr'] = $dialstr; | ||
| 193 | |||
| 194 | return $data; | ||
| 195 | } | ||
| 196 | |||
| 197 | public function getActualSipDialedCallCount() | ||
| 198 | { | ||
| 199 | $allChnnlArr = array(); | ||
| 200 | $dialstr = "Dial(SIP/GATEWAY/"; | ||
| 201 | $chnlCnt = 0; | ||
| 202 | |||
| 203 | exec("/usr/sbin/asterisk -rx 'core show channels'",$allChnnls); | ||
| 204 | |||
| 205 | foreach($allChnnls as $allChnnl){ | ||
| 206 | //$allChnnlArr[] = explode(" ", preg_replace('!\s+!', ' ', $allChnnl) ); | ||
| 207 | if(stristr($allChnnl, $dialstr)){ | ||
| 208 | $chnlCnt++; | ||
| 209 | } | ||
| 210 | } | ||
| 211 | |||
| 212 | return $chnlCnt; | ||
| 213 | } | ||
| 214 | |||
| 215 | public function getActualDahdiDialedCallCount() | ||
| 216 | { | ||
| 217 | $allChnnlArr = array(); | ||
| 218 | $dialstr = "- ACTIVE"; | ||
| 219 | $status = "RED"; | ||
| 220 | $chnlCnt = 0; | ||
| 221 | |||
| 222 | //exec("/usr/sbin/asterisk -rx 'service dahdi status'",$allChnnls); | ||
| 223 | exec("service dahdi status",$allChnnls); | ||
| 224 | |||
| 225 | foreach($allChnnls as $allChnnl){ | ||
| 226 | //$allChnnlArr[] = explode(" ", preg_replace('!\s+!', ' ', $allChnnl) ); | ||
| 227 | if(stristr($allChnnl, $status)){ | ||
| 228 | Break; | ||
| 229 | } | ||
| 230 | |||
| 231 | if(stristr($allChnnl, $dialstr)){ | ||
| 232 | $chnlCnt++; | ||
| 233 | } | ||
| 234 | } | ||
| 235 | |||
| 236 | return $chnlCnt; | ||
| 237 | } | ||
| 238 | |||
| 239 | //TODO: Generate Client File To Take All Parameteres Of Campaigns | ||
| 240 | public function getCreateCallCount($client, $usrCnt) | ||
| 241 | { | ||
| 242 | $wakka = new KHRMSLib(); | ||
| 243 | $mastersdata=$wakka->getCompanyMaster($client); | ||
| 244 | |||
| 245 | $ratio = $mastersdata["autodialercampaign"]; | ||
| 246 | $dialedCallCnt = $this->getDialedCallCount($client); | ||
| 247 | |||
| 248 | return ($usrCnt*$ratio) - $dialedCallCnt; | ||
| 249 | } | ||
| 250 | |||
| 251 | public function getDialedCallCount($client) | ||
| 252 | { | ||
| 253 | $cnt = Dialline::whereIn("status", ["Auto","AutoCall"])->where("conf","=","")->where("regexstr","=",$client)->count(); | ||
| 254 | |||
| 255 | return $cnt; | ||
| 256 | } | ||
| 257 | |||
| 258 | public function CreateCall($client, $acalls, $availDialStr) | ||
| 259 | { | ||
| 260 | if($acalls>0) | ||
| 261 | { | ||
| 262 | for($i=0;$i<$acalls;$i++) | ||
| 263 | { | ||
| 264 | $this->useChannelToDial($client, $availDialStr); | ||
| 265 | } | ||
| 266 | } | ||
| 267 | } | ||
| 268 | |||
| 269 | public function useChannelToDial($client, $availDialStr) | ||
| 270 | { | ||
| 271 | $dialline=Dialline::where('server','=', env('app_ip'))->where("status","=","Free")->where("enabled","=","1")->where("dialstr", "=", $availDialStr)->orderBy('updated_at','ASC')->first(); | ||
| 272 | |||
| 273 | //TODO::Need To Code Dspan Logic as per discussion | ||
| 274 | //if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan)->where('id','<=','30'); | ||
| 275 | //$dialline=$dialline->orderBy('id','ASC')->first(); | ||
| 276 | |||
| 277 | if(!empty($dialline)) | ||
| 278 | { | ||
| 279 | $this->createCrmCall($client, $dialline); | ||
| 280 | } | ||
| 281 | |||
| 282 | return; | ||
| 283 | } | ||
| 284 | |||
| 285 | public function createCrmCall($client, $dialline) | ||
| 286 | { | ||
| 287 | //TODO: Need to check whether callerid is required or not (in case of GSM Gateway) | ||
| 288 | $callerid=""; | ||
| 289 | $wakka = new KHRMSLib(); | ||
| 290 | |||
| 291 | $gz = new DialerController(); | ||
| 292 | $users= $gz->getCallSequencing(1,$client); | ||
| 293 | |||
| 294 | if(sizeof($users)>=1) | ||
| 295 | { | ||
| 296 | $record=$wakka->getPerson($users[0]['id'],$client); | ||
| 297 | if($record) | ||
| 298 | { | ||
| 299 | $record["peopledata"]["status"]="AutoCall"; | ||
| 300 | $wakka->setPerson($users[0]['id'],$record,$client); | ||
| 301 | DB::table('records_'.$client)->where('id',$users[0]['id'])->update(['filter_condition'=>'2','modified'=>date("Y-m-d H:i:s")]); | ||
| 302 | } | ||
| 303 | |||
| 304 | $dialline->user_id=$user_id; | ||
| 305 | $dialline->status="AutoCall"; | ||
| 306 | $dialline->regexstr=$users[0]['client']; | ||
| 307 | $dialline->number=$users[0]["mobile"]; | ||
| 308 | $dialline->save(); | ||
| 309 | |||
| 310 | $nowts=microtime(true)*1000; | ||
| 311 | |||
| 312 | //start the call log | ||
| 313 | $crmcall=new CRMCall(); | ||
| 314 | $crmcall->number=$users[0]["mobile"]; | ||
| 315 | $crmcall->user_id=0; | ||
| 316 | $crmcall->sipid_id=0; | ||
| 317 | $crmcall->crm_id=$users[0]['id']; | ||
| 318 | //$crmcall->lan=$users[0]['lan']; | ||
| 319 | $crmcall->client=$users[0]['client']; | ||
| 320 | $crmcall->department=$users[0]['department']; | ||
| 321 | $crmcall->state='New'; | ||
| 322 | $crmcall->type="AutoCall"; | ||
| 323 | $crmcall->dialline_id=$dialline->id; | ||
| 324 | |||
| 325 | $crmcall->setTs('ts_Wait',$nowts); | ||
| 326 | $crmcall->setTs('ts_Call',$nowts); | ||
| 327 | |||
| 328 | $crmcall->did=$callerid; | ||
| 329 | |||
| 330 | $tdata=array(); | ||
| 331 | $crmcall->data=json_encode($tdata); | ||
| 332 | $crmcall->save(); | ||
| 333 | |||
| 334 | //start actual calls | ||
| 335 | $newqueue=new Kqueue(); | ||
| 336 | $newqueue->autoCallOut($users[0]["mobile"],$callerid,$crmcall,$dialline); | ||
| 337 | } | ||
| 338 | |||
| 339 | return; | ||
| 340 | } | ||
| 341 | |||
| 342 | public function getSpanCount() | ||
| 343 | { | ||
| 344 | $spanArr = array("span1" => 30, "span2" => 30, "span3" => 30, "span4" => 30); | ||
| 345 | |||
| 346 | $cnt = array_sum($spanArr); | ||
| 347 | |||
| 348 | return $cnt; | ||
| 349 | } | ||
| 350 | } |
| ... | @@ -45,14 +45,14 @@ class CreportEight extends Command { | ... | @@ -45,14 +45,14 @@ class CreportEight extends Command { |
| 45 | 45 | ||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); |
| 47 | $central_ip=env('central_ip'); | 47 | $central_ip=env('central_ip'); |
| 48 | $server_ip=env('app_ip'); | 48 | $server_ip=env('DB_HOST'); |
| 49 | $calllog_report = "calllog_report_".$date; | 49 | $calllog_report = "calllog_report_".$date; |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -53,9 +53,9 @@ class CreportNine extends Command { | ... | @@ -53,9 +53,9 @@ class CreportNine extends Command { |
| 53 | $conn = array( | 53 | $conn = array( |
| 54 | 'driver' => 'mysql', | 54 | 'driver' => 'mysql', |
| 55 | 'host' => $central_ip, | 55 | 'host' => $central_ip, |
| 56 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 56 | 'database' => env('CENTRAL_DB'), |
| 57 | 'username' => env('DB_USERNAME', 'root'), | 57 | 'username' => env('CENTRAL_USERNAME'), |
| 58 | 'password' => env('DB_PASSWORD', ''), | 58 | 'password' => env('CENTRAL_PASSWORD'), |
| 59 | 'charset' => 'utf8', | 59 | 'charset' => 'utf8', |
| 60 | 'collation' => 'utf8_unicode_ci', | 60 | 'collation' => 'utf8_unicode_ci', |
| 61 | 'prefix' => '', | 61 | 'prefix' => '', | ... | ... |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class CreportTen extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'CreportTen'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for CreportTen'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | //$calllog_report = "calllog_report_".date("d_m_Y"); | ||
| 50 | $calllog_report = "calllog_report_test"; | ||
| 51 | $conn = array( | ||
| 52 | 'driver' => 'mysql', | ||
| 53 | 'host' => $central_ip, | ||
| 54 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 55 | 'username' => env('DB_USERNAME', 'root'), | ||
| 56 | 'password' => env('DB_PASSWORD', ''), | ||
| 57 | 'charset' => 'utf8', | ||
| 58 | 'collation' => 'utf8_unicode_ci', | ||
| 59 | 'prefix' => '', | ||
| 60 | 'options' => array( | ||
| 61 | PDO::ATTR_TIMEOUT => 5, | ||
| 62 | ), | ||
| 63 | ); | ||
| 64 | Config::set("database.connections.conn", $conn); | ||
| 65 | |||
| 66 | DB::connection("conn")->getDatabaseName(); | ||
| 67 | |||
| 68 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 69 | $server_id=$serverclist[0]->id; | ||
| 70 | if($server_id<10){ | ||
| 71 | $server_id="0".$server_id; | ||
| 72 | } | ||
| 73 | |||
| 74 | |||
| 75 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(crmcall_id) as maxid from $calllog_report where server='$server_id'")); | ||
| 76 | |||
| 77 | $maxids=$maxid[0]->maxid; | ||
| 78 | echo "Maxid".$maxids; | ||
| 79 | |||
| 80 | //$alist=DB::select(DB::raw("SELECT * from crmcalls_archive where created_at>'2018-06-01' and created_at<'2018-07-01'")); | ||
| 81 | //$alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at>'".date("Y-m-d")."' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 82 | |||
| 83 | $alist=DB::select(DB::raw("SELECT * from crmcalls where id>'$maxids' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | ||
| 84 | |||
| 85 | $userarr=array(); | ||
| 86 | foreach($alist as $aline) | ||
| 87 | { | ||
| 88 | $setstrarr=array(); | ||
| 89 | |||
| 90 | |||
| 91 | $clientcode="";$currentstatus="";$legalstatus="";$record_id=""; | ||
| 92 | if($aline->crm_id>0) | ||
| 93 | { | ||
| 94 | $user=DB::select(DB::raw("select id,clientcode,currentstatus,legalstatus from records where id='".$aline->crm_id."' limit 1;")); | ||
| 95 | if(isset($user[0])) | ||
| 96 | { | ||
| 97 | $record_id=$user[0]->id; | ||
| 98 | $clientcode=$user[0]->clientcode; | ||
| 99 | $currentstatus=$user[0]->currentstatus; | ||
| 100 | $legalstatus=$user[0]->legalstatus; | ||
| 101 | } | ||
| 102 | } | ||
| 103 | $tpostdata=json_decode($aline->data,true); | ||
| 104 | $fulldate=date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 105 | $talktime=$aline->talkSec+$aline->recstartSec+$aline->recendSec; | ||
| 106 | $length=round(($aline->waitSec+$aline->callSec+$talktime+$aline->dispoSec)/1000,2); | ||
| 107 | |||
| 108 | if(!isset($userarr[$aline->user_id])&&$aline->user_id>0)$userarr[$aline->user_id]=User::find($aline->user_id); | ||
| 109 | $dispname="";if(isset($userarr[$aline->user_id]))$dispname=$userarr[$aline->user_id]->dispname(); | ||
| 110 | $username="";if(isset($userarr[$aline->user_id]))$username=$userarr[$aline->user_id]->username; | ||
| 111 | $globalid=$server_id.$record_id; | ||
| 112 | $setstrarr[]="server='$server_id'"; | ||
| 113 | $setstrarr[]="record_id='$record_id'"; | ||
| 114 | $setstrarr[]="crmcall_id='$aline->id'"; | ||
| 115 | $setstrarr[]="globalid='$globalid'"; | ||
| 116 | $setstrarr[]="created_at='$aline->created_at'"; | ||
| 117 | $setstrarr[]="start='$fulldate'"; | ||
| 118 | $setstrarr[]="length='$length'"; | ||
| 119 | $setstrarr[]="user='$username'"; | ||
| 120 | $setstrarr[]="name='$dispname'"; | ||
| 121 | $setstrarr[]="dispo='$aline->userstatus'"; | ||
| 122 | $setstrarr[]="subdispo='$aline->usersubstatus'"; | ||
| 123 | $setstrarr[]="callback='$aline->usercallback'"; | ||
| 124 | |||
| 125 | $setstrarr[]="number='$aline->number'"; | ||
| 126 | $setstrarr[]="clientcode='$clientcode'"; | ||
| 127 | $setstrarr[]="currentstatus='$currentstatus'"; | ||
| 128 | $setstrarr[]="legalstatus='$legalstatus'"; | ||
| 129 | $setstrarr[]="client='$aline->client'"; | ||
| 130 | $setstrarr[]="department='$aline->department'"; | ||
| 131 | $setstrarr[]="state='$aline->state'"; | ||
| 132 | $setstrarr[]="hsource='$aline->hsource'"; | ||
| 133 | |||
| 134 | $setstrarr[]="type='$aline->type'"; | ||
| 135 | $setstrarr[]="status='$aline->status'"; | ||
| 136 | $setstrarr[]="statuscode='$aline->statuscode'"; | ||
| 137 | $setstrarr[]="statusstr='$aline->substatus'"; | ||
| 138 | $setstrarr[]="dialline='$aline->dialline_id'"; | ||
| 139 | $setstrarr[]="did='$aline->did'"; | ||
| 140 | $setstrarr[]="waitsec='".round($aline->waitSec/1000,2)."'"; | ||
| 141 | $setstrarr[]="callsec='".round($aline->callSec/1000,2)."'"; | ||
| 142 | $setstrarr[]="talksec='".round($talktime/1000,2)."'"; | ||
| 143 | $setstrarr[]="disposec='".round($aline->dispoSec/1000,2)."'"; | ||
| 144 | $setstrarr[]="remarks='".str_replace("'","",$aline->userremarks)."'"; | ||
| 145 | $setstrarr[]="userdata='$aline->userdata'"; | ||
| 146 | $setstrarr[]="attempt='$aline->attempt'"; | ||
| 147 | $setstrarr[]="priority='$aline->priority'"; | ||
| 148 | $setstrarr[]="question='$aline->question'"; | ||
| 149 | |||
| 150 | $setstr=implode(",",$setstrarr); | ||
| 151 | DB::connection("conn")->insert(DB::raw("insert into ".$calllog_report." set $setstr")); | ||
| 152 | //DB::connection("conn")->update(DB::raw("UPDATE ".$calllog_report." as ca INNER JOIN crmcalls as c on ca.crmcall_id = c.id set ca.state = c.state,ca.statuscode = c.statuscode,ca.status = c.status,ca.substatus = c.substatus,ca.callSec = c.callSec,ca.ts_Talk = c.ts_Talk,ca.ts_Recstart = c.ts_Recstart,ca.ts_Recend = c.ts_Recend,ca.ts_Dispo = c.ts_Dispo,ca.ts_Close = c.ts_Close,ca.dispoSec = c.dispoSec,ca.recstartSec=c.recstartSec,ca.data = c.data,ca.recsize = c.recsize,ca.userstatus = c.userstatus,ca.usersubstatus = c.usersubstatus,ca.usercallback = c.usercallback ,ca.userremarks = c.userremarks,ca.attempt = c.attempt,ca.priority = c.priority,ca.question = c.question")); | ||
| 153 | } | ||
| 154 | echo "AfterUploadingData=".date('Y-m-d H:i:s'); | ||
| 155 | } | ||
| 156 | } | ||
| 157 | |||
| 158 |
| ... | @@ -98,9 +98,9 @@ class KstychDaily extends Command { | ... | @@ -98,9 +98,9 @@ class KstychDaily extends Command { |
| 98 | $conn = array( | 98 | $conn = array( |
| 99 | 'driver' => 'mysql', | 99 | 'driver' => 'mysql', |
| 100 | 'host' => $server, | 100 | 'host' => $server, |
| 101 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 101 | 'database' => env('CENTRAL_DB'), |
| 102 | 'username' => env('DB_USERNAME', 'root'), | 102 | 'username' => env('CENTRAL_USERNAME'), |
| 103 | 'password' => env('DB_PASSWORD', ''), | 103 | 'password' => env('CENTRAL_PASSWORD'), |
| 104 | 'charset' => 'utf8', | 104 | 'charset' => 'utf8', |
| 105 | 'collation' => 'utf8_unicode_ci', | 105 | 'collation' => 'utf8_unicode_ci', |
| 106 | 'prefix' => '', | 106 | 'prefix' => '', | ... | ... |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | use App\Models\Cutoff; | ||
| 23 | |||
| 24 | use Log; | ||
| 25 | use Illuminate\Database\Schema\Blueprint; | ||
| 26 | |||
| 27 | class PredictiveCallHangUp extends Command { | ||
| 28 | |||
| 29 | /** | ||
| 30 | * The console command name. | ||
| 31 | * | ||
| 32 | * @var string | ||
| 33 | */ | ||
| 34 | protected $signature = 'PredictiveCallHangUp'; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * The console command description. | ||
| 38 | * | ||
| 39 | * @var string | ||
| 40 | */ | ||
| 41 | protected $description = 'Hang Up Extra Calls If Agents Are Not Free'; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Execute the console command. | ||
| 45 | * | ||
| 46 | * @return mixed | ||
| 47 | */ | ||
| 48 | public function handle() | ||
| 49 | { | ||
| 50 | while(true) | ||
| 51 | { | ||
| 52 | usleep(1000000); | ||
| 53 | $this->runHangUp(); | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | public function runHangUp() | ||
| 58 | { | ||
| 59 | try { | ||
| 60 | $breathingTime = 30; | ||
| 61 | $avgringsec = 30; | ||
| 62 | |||
| 63 | $avgringsec = Cutoff::select(DB::Raw('avg(avg_ring) as avgringsec'))->first(); | ||
| 64 | if($avgringsec)$avgringsec= intval($avgringsec->avgringsec); | ||
| 65 | |||
| 66 | $diallines = Dialline::whereIn("status", ["Auto","AutoCall"])->where("conf","=","")->select('src_channel','status','updated_at','channel','server')->get(); | ||
| 67 | |||
| 68 | foreach ($diallines as $dialline) { | ||
| 69 | |||
| 70 | $newqueue=new Kqueue(); | ||
| 71 | $lastUpdatedTime = strtotime(date("Y-m-d H:i:s")) - strtotime($dialline->updated_at); | ||
| 72 | |||
| 73 | if ($dialline->status == 'Auto' && $lastUpdatedTime > $breathingTime) { | ||
| 74 | $newqueue->hangupChannelS($dialline->channel,$dialline->server); | ||
| 75 | } | ||
| 76 | elseif($dialline->status == 'AutoCall' && $lastUpdatedTime > ($avgringsec+$breathingTime)) { | ||
| 77 | $newqueue->hangupChannelS($dialline->src_channel,$dialline->server); | ||
| 78 | } | ||
| 79 | } | ||
| 80 | } catch (Exception $e) { | ||
| 81 | Log::useFiles(storage_path()."/logs/predictive_".date("Y_m_d").".log"); | ||
| 82 | Log::error($e); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | } |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | |||
| 15 | use Illuminate\Database\Schema\Blueprint; | ||
| 16 | |||
| 17 | class Smsreport extends Command { | ||
| 18 | |||
| 19 | /** | ||
| 20 | * The console command name. | ||
| 21 | * | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | protected $signature = 'Smsreport'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * The console command description. | ||
| 28 | * | ||
| 29 | * @var string | ||
| 30 | */ | ||
| 31 | protected $description = 'App Main Daily Task for Smsreport'; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * Execute the console command. | ||
| 35 | * | ||
| 36 | * @return mixed | ||
| 37 | */ | ||
| 38 | public function handle() | ||
| 39 | { | ||
| 40 | $nowts=time(); | ||
| 41 | $date=date('F_Y'); | ||
| 42 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 43 | |||
| 44 | $logdate=strtotime('0 day'); | ||
| 45 | |||
| 46 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 47 | $central_ip=env('central_ip'); | ||
| 48 | $server_ip=env('app_ip'); | ||
| 49 | $calllog_report = "calllog_report_".$date; | ||
| 50 | $conn = array( | ||
| 51 | 'driver' => 'mysql', | ||
| 52 | 'host' => $central_ip, | ||
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 54 | 'username' => env('DB_USERNAME', 'root'), | ||
| 55 | 'password' => env('DB_PASSWORD', ''), | ||
| 56 | 'charset' => 'utf8', | ||
| 57 | 'collation' => 'utf8_unicode_ci', | ||
| 58 | 'prefix' => '', | ||
| 59 | 'options' => array( | ||
| 60 | PDO::ATTR_TIMEOUT => 5, | ||
| 61 | ), | ||
| 62 | ); | ||
| 63 | Config::set("database.connections.conn", $conn); | ||
| 64 | |||
| 65 | DB::connection("conn")->getDatabaseName(); | ||
| 66 | |||
| 67 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 68 | $server_id=str_pad($serverclist[0]->id, 2, '0', STR_PAD_LEFT); | ||
| 69 | |||
| 70 | $maxid=DB::connection("conn")->select(DB::raw("SELECT max(sms_id) as maxid from sms_report where server='$server_id'")); | ||
| 71 | |||
| 72 | $maxids=$maxid[0]->maxid; | ||
| 73 | |||
| 74 | $alist=DB::select(DB::raw("SELECT * from sms_log where id>'$maxids'")); | ||
| 75 | $iii=0; | ||
| 76 | $shortinsert=""; | ||
| 77 | foreach($alist as $aline) | ||
| 78 | { | ||
| 79 | $iii++; | ||
| 80 | $server = $server_id; | ||
| 81 | $sms_id = $aline->id; | ||
| 82 | $created_at = $aline->created_at; | ||
| 83 | $message_time = date("Y-m-d H:i:s",strtotime($aline->created_at)+330*60); | ||
| 84 | $server_ip = $aline->server_ip; | ||
| 85 | $call_id = $aline->call_id; | ||
| 86 | $agent_name = $aline->agent_name; | ||
| 87 | $subdispo = $aline->subdispo; | ||
| 88 | $number = $aline->number; | ||
| 89 | $message = $aline->message; | ||
| 90 | $response = $aline->response; | ||
| 91 | |||
| 92 | $shortinsert.="('$server', '$sms_id','$created_at', '$message_time', '$server_ip', '$call_id', '$agent_name', '$subdispo', '$number', '$message', '$response'),"; | ||
| 93 | |||
| 94 | if($iii%50==0 || $iii == count($alist)){ | ||
| 95 | |||
| 96 | $shortinsert=substr($shortinsert,0,-1); | ||
| 97 | DB::connection("conn")->insert(DB::raw("INSERT INTO sms_report (`server`, `sms_id`, `created_at`, `message_time`, `server_ip`, `call_id`, `agent_name`, `subdispo`, `number`, `message`, `response`) VALUES $shortinsert")); | ||
| 98 | $shortinsert=""; | ||
| 99 | } | ||
| 100 | } | ||
| 101 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 102 | DB::connection("conn")->disconnect(); | ||
| 103 | } | ||
| 104 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | //use Mail; | ||
| 5 | use DB; | ||
| 6 | use Config; | ||
| 7 | |||
| 8 | use App\Models\User; | ||
| 9 | use App\Models\Accesslog; | ||
| 10 | |||
| 11 | use App\Models\CRMCall; | ||
| 12 | use Schema; | ||
| 13 | use PDO; | ||
| 14 | use App\Models\Notification; | ||
| 15 | use App\Jobs\KHRMSLib; | ||
| 16 | |||
| 17 | use Input; | ||
| 18 | use App\Models\Sipid; | ||
| 19 | use App\Models\Kqueue; | ||
| 20 | use App\Models\Dialline; | ||
| 21 | use App\Models\Session; | ||
| 22 | use App\Models\Cutoff; | ||
| 23 | |||
| 24 | use Log; | ||
| 25 | use Illuminate\Database\Schema\Blueprint; | ||
| 26 | |||
| 27 | class UpdateAvgRingSec extends Command { | ||
| 28 | |||
| 29 | /** | ||
| 30 | * The console command name. | ||
| 31 | * | ||
| 32 | * @var string | ||
| 33 | */ | ||
| 34 | protected $signature = 'UpdateAvgRingSec'; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * The console command description. | ||
| 38 | * | ||
| 39 | * @var string | ||
| 40 | */ | ||
| 41 | protected $description = 'Update Avg Call Ring Sec Of Last 50 Calls'; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Execute the console command. | ||
| 45 | * | ||
| 46 | * @return mixed | ||
| 47 | */ | ||
| 48 | public function handle() | ||
| 49 | { | ||
| 50 | $avgcallsecObj = CRMCall::select(DB::Raw('ROUND((avg(callsec))/1000) as avgcallsec'))->limit(50)->where("type","!=","Inbound")->first(); | ||
| 51 | |||
| 52 | if(count($avgcallsecObj)) | ||
| 53 | { | ||
| 54 | Cutoff::where('user_id', '!=', "")->update( | ||
| 55 | ['avg_ring' => $avgcallsecObj->avgcallsec | ||
| 56 | ]); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use DB; | ||
| 5 | use Config; | ||
| 6 | |||
| 7 | use App\Models\User; | ||
| 8 | use App\Models\Accesslog; | ||
| 9 | |||
| 10 | use App\Models\CRMCall; | ||
| 11 | use Schema; | ||
| 12 | use PDO; | ||
| 13 | |||
| 14 | use Illuminate\Database\Schema\Blueprint; | ||
| 15 | |||
| 16 | class Userlog_datavalidation extends Command { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * The console command name. | ||
| 20 | * | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | protected $signature = 'Userlog_datavalidation'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * The console command description. | ||
| 27 | * | ||
| 28 | * @var string | ||
| 29 | */ | ||
| 30 | protected $description = 'Userlog_datavalidation'; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Execute the console command. | ||
| 34 | * | ||
| 35 | * @return mixed | ||
| 36 | */ | ||
| 37 | public function handle() | ||
| 38 | { | ||
| 39 | $nowts=time(); | ||
| 40 | echo "\n".date('Y-m-d')."\n"; | ||
| 41 | |||
| 42 | $logdate=strtotime('-1 day'); | ||
| 43 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 44 | $server_ip=env('app_ip'); | ||
| 45 | $central_ip=env('central_ip'); | ||
| 46 | |||
| 47 | $conn = array( | ||
| 48 | 'driver' => 'mysql', | ||
| 49 | 'host' => $central_ip, | ||
| 50 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 51 | 'username' => env('DB_USERNAME', 'root'), | ||
| 52 | 'password' => env('DB_PASSWORD', ''), | ||
| 53 | 'charset' => 'utf8', | ||
| 54 | 'collation' => 'utf8_unicode_ci', | ||
| 55 | 'prefix' => '', | ||
| 56 | 'options' => array( | ||
| 57 | PDO::ATTR_TIMEOUT => 5, | ||
| 58 | ), | ||
| 59 | ); | ||
| 60 | Config::set("database.connections.conn", $conn); | ||
| 61 | if(DB::connection("conn")->getDatabaseName()) | ||
| 62 | { | ||
| 63 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 64 | $server_id=$serverclist[0]->id; | ||
| 65 | if($server_id<10){ | ||
| 66 | $server_id="0".$server_id; | ||
| 67 | } | ||
| 68 | |||
| 69 | |||
| 70 | $i=0; | ||
| 71 | |||
| 72 | |||
| 73 | $ulist=DB::select(DB::raw("select * from users WHERE 1")); | ||
| 74 | foreach($ulist as $uline) { | ||
| 75 | $users[$uline->id] = $uline->username; | ||
| 76 | } | ||
| 77 | if($alist=DB::select(DB::raw("select * from userlogs WHERE created_at>'".date("Y-m-d",$logdate)."' and created_at<'".date("Y-m-d",$logdate+24*60*60)."'"))){ | ||
| 78 | |||
| 79 | |||
| 80 | foreach($alist as $aline) { | ||
| 81 | $i++; | ||
| 82 | $global_id = $server_id . $i; | ||
| 83 | if($aline->enddate=='0000-00-00'|| $aline->endtime=='00:00:00' || $aline->durationsec=='0') | ||
| 84 | { | ||
| 85 | $enddatetime=date("Y-m-d H:i:s",strtotime($aline->updated_at)); | ||
| 86 | $enddate=explode(" ",$enddatetime)[0]; | ||
| 87 | $endtime=explode(" ",$enddatetime)[1]; | ||
| 88 | $durationsec=date("Y-m-d H:i:s",strtotime($endtime-$aline->starttime)); | ||
| 89 | } | ||
| 90 | else | ||
| 91 | { | ||
| 92 | $enddate=$aline->enddate; | ||
| 93 | $endtime=$aline->endtime; | ||
| 94 | $durationsec=$aline->durationsec; | ||
| 95 | } | ||
| 96 | |||
| 97 | $rowdata = array('server'=>$server_id,'server_ip'=>$server_ip,'global_id'=>$global_id,'id'=>$aline->id, | ||
| 98 | 'created_at'=>$aline->created_at,'updated_at'=>$aline->updated_at,'user_id'=>$aline->user_id,'user'=>$users[$aline->user_id], | ||
| 99 | 'startdate'=>$aline->startdate,'starttime'=>$aline->starttime,'enddate'=>$enddate,'endtime'=>$endtime, | ||
| 100 | 'durationsec'=>$durationsec,'data'=>$aline->data,'group'=>$aline->group,'login'=>'','dialnext'=>'','dialnext-agentbriefing'=>'','dialnext-downtime'=>'','dialnext-floorannouncements'=>'','dialnext-incoming'=>'','dialnext-lunchbreak'=>'','dialnext-manual'=>'','dialnext-notready'=>'','dialnext-qualityfeedback'=>'','dialnext-teabreak'=>'','dialnext-teammeeting'=>'','dialnext-utilitybreak'=>'','manual'=>'','manual-agentbriefing'=>'','manual-agentbriefing'=>'','manual-downtime'=>'','manual-floorannouncements'=>'','manual-incoming'=>'','manual-lunchbreak'=>'','manual-manual'=>'','manual-notready'=>'','manual-qualityfeedback'=>'','manual-teabreak'=>'','manual-teammeeting'=>'','manual-utilitybreak'=>'','paused'=>'','paused-agentbriefing'=>'','paused-downtime'=>'','paused-floorannouncements'=>'','paused-incoming'=>'','paused-lunchbreak'=>'','paused-manual'=>'','paused-notready'=>'','paused-qualityfeedback'=>'','paused-teabreak'=>'','paused-teammeeting'=>'','paused-utilitybreak'=>'','paused-autowrapup'=>'','paused-wrapup'=>'','progressive'=>'','progressive-agentbriefing'=>'','progressive-agentbriefing'=>'','progressive-downtime'=>'','progressive-floorannouncements'=>'','progressive-incoming'=>'','progressive-lunchbreak'=>'','progressive-manual'=>'','progressive-notready'=>'','progressive-qualityfeedback'=>'','progressive-teabreak'=>'','progressive-teammeeting'=>'','progressive-utilitybreak'=>'','ready-incoming'=>'' | ||
| 101 | ); | ||
| 102 | |||
| 103 | $data=json_decode($aline->data,true); | ||
| 104 | foreach($data as $sipid=>$sdata) | ||
| 105 | { | ||
| 106 | $prets= isset($sdata[1]) ? $sdata[1] : (strtotime($aline->startdate . " " . $aline->starttime)+19600)*1000; | ||
| 107 | if(isset($sdata['states'])) | ||
| 108 | { | ||
| 109 | $previous="login"; | ||
| 110 | foreach($sdata['states'] as $fts=>$states) | ||
| 111 | { | ||
| 112 | if($states[0] != 1) | ||
| 113 | { | ||
| 114 | $rowdata[$previous] +=round(($fts-$prets)/1000,2); | ||
| 115 | |||
| 116 | $previous = (trim($states[1]) != '') ? strtolower($states[0]."-".$states[1]) : strtolower($states[0]); | ||
| 117 | $prets=$fts; | ||
| 118 | } | ||
| 119 | |||
| 120 | } | ||
| 121 | $rowdata[$previous] += round(($sdata['ts']-$prets)/1000,2); | ||
| 122 | } | ||
| 123 | } | ||
| 124 | $rowdata["login"] = $aline->durationsec; | ||
| 125 | |||
| 126 | $rowdata['not-ready']=$rowdata['paused-agentbriefing']+$rowdata['paused-autowrapup']+$rowdata['paused-downtime']+$rowdata['paused-floorannouncements']+$rowdata['paused-lunchbreak']+$rowdata['paused-notready']+$rowdata['paused-qualityfeedback']+$rowdata['paused-teammeeting']+$rowdata['paused-teabreak']+$rowdata['paused-utilitybreak']; | ||
| 127 | |||
| 128 | |||
| 129 | $key_value = ''; | ||
| 130 | |||
| 131 | |||
| 132 | $startTime=$aline->startdate." ".$aline->starttime; | ||
| 133 | $endTime=$aline->enddate." ".$aline->endtime; | ||
| 134 | |||
| 135 | $crmCalls=DB::select(DB::raw("select user_id,type,ts_Wait,ts_Call,ts_Talk,ts_Recstart,ts_Recend,ts_Dispo,ts_Close from crmcalls WHERE updated_at>='".$startTime."' and updated_at<'".$endTime."' and user_id='".$aline->user_id."'")); | ||
| 136 | |||
| 137 | $ts_Wait=0;$ts_Call=0;$ts_Talk=0;$ts_Dispo=0; | ||
| 138 | $progTs_Wait=0;$progTs_Call=0;$progTs_Talk=0;$progTs_Dispo=0; | ||
| 139 | $manTs_Wait=0;$manTs_Call=0;$manTs_Talk=0;$manTs_Dispo=0; | ||
| 140 | $inbTs_Wait=0;$inbTs_Call=0;$inbTs_Talk=0;$inbTs_Dispo=0; | ||
| 141 | $tt_prog=0;$tt_man=0;$tt_inb=0; | ||
| 142 | |||
| 143 | if($crmCalls!=null){ | ||
| 144 | foreach($crmCalls as $crmCall){ | ||
| 145 | $ts_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 146 | $ts_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 147 | $ts_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 148 | $ts_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 149 | |||
| 150 | if($crmCall->type == 'Progressive') | ||
| 151 | { | ||
| 152 | $progTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 153 | $progTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 154 | $progTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 155 | $progTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 156 | } | ||
| 157 | |||
| 158 | if($crmCall->type == 'Manual') | ||
| 159 | { | ||
| 160 | $manTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 161 | $manTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 162 | $manTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 163 | $manTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 164 | } | ||
| 165 | |||
| 166 | if($crmCall->type == 'Inbound') | ||
| 167 | { | ||
| 168 | $inbTs_Wait += round(($crmCall->ts_Call - $crmCall->ts_Wait)/1000,2); | ||
| 169 | $inbTs_Call += round(($crmCall->ts_Talk - $crmCall->ts_Call)/1000,2); | ||
| 170 | $inbTs_Talk += round(($crmCall->ts_Dispo - $crmCall->ts_Talk)/1000,2); | ||
| 171 | $inbTs_Dispo += round(($crmCall->ts_Close - $crmCall->ts_Dispo)/1000,2); | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | $tt_prog = $progTs_Wait + $progTs_Call + $progTs_Talk + $progTs_Dispo; | ||
| 177 | $tt_man = $manTs_Wait + $manTs_Call + $manTs_Talk + $manTs_Dispo; | ||
| 178 | $tt_inb = $inbTs_Wait + $inbTs_Call + $inbTs_Talk + $inbTs_Dispo; | ||
| 179 | |||
| 180 | $total_idealtime=$rowdata["login"]-($rowdata['not-ready']+$tt_prog+$tt_man+$tt_inb); | ||
| 181 | |||
| 182 | echo "notready time-----idle----".$total_idealtime; | ||
| 183 | |||
| 184 | foreach($rowdata AS $key=>$value) { | ||
| 185 | if($key != 1) | ||
| 186 | $key_value .= "`$key` = '$value', "; | ||
| 187 | } | ||
| 188 | $prod_TOS = $ts_Wait + $ts_Call + $ts_Talk + $ts_Dispo; | ||
| 189 | |||
| 190 | $key_value .= "`tt_prog` = '$tt_prog', "; | ||
| 191 | $key_value .= "`tt_man` = '$tt_man', "; | ||
| 192 | $key_value .= "`tt_inb` = '$tt_inb', "; | ||
| 193 | |||
| 194 | $key_value .= "`ts_Wait` = '$ts_Wait', "; | ||
| 195 | $key_value .= "`ts_Call` = '$ts_Call', "; | ||
| 196 | $key_value .= "`ts_Talk` = '$ts_Talk', "; | ||
| 197 | $key_value .= "`ts_Dispo` = '$ts_Dispo', "; | ||
| 198 | $key_value .= "`progts_Wait` = '$progTs_Wait', "; | ||
| 199 | $key_value .= "`progts_Call` = '$progTs_Call', "; | ||
| 200 | $key_value .= "`progts_Talk` = '$progTs_Talk', "; | ||
| 201 | $key_value .= "`progts_Dispo` = '$progTs_Dispo', "; | ||
| 202 | $key_value .= "`mants_Wait` = '$manTs_Wait', "; | ||
| 203 | $key_value .= "`mants_Call` = '$manTs_Call', "; | ||
| 204 | $key_value .= "`mants_Talk` = '$manTs_Talk', "; | ||
| 205 | $key_value .= "`mants_Dispo` = '$manTs_Dispo', "; | ||
| 206 | $key_value .= "`incts_Wait` = '$inbTs_Wait', "; | ||
| 207 | $key_value .= "`incts_Call` = '$inbTs_Call', "; | ||
| 208 | $key_value .= "`incts_Talk` = '$inbTs_Talk', "; | ||
| 209 | $key_value .= "`incts_Dispo` = '$inbTs_Dispo', "; | ||
| 210 | $key_value .= "`prod_tos` = '$prod_TOS', "; | ||
| 211 | $key_value .= "`totalidealtime` = '$total_idealtime', "; | ||
| 212 | |||
| 213 | |||
| 214 | |||
| 215 | $key_value = substr($key_value, 0, -2); | ||
| 216 | |||
| 217 | //$userlogsTable = "userlogs_".date("d_m_Y",$logdate); | ||
| 218 | $userlogsTable = "userlogs_datavalid"; | ||
| 219 | DB::connection("conn")->insert(DB::raw("INSERT INTO ".$userlogsTable." SET $key_value")); | ||
| 220 | |||
| 221 | } | ||
| 222 | |||
| 223 | } | ||
| 224 | } | ||
| 225 | } | ||
| 226 | } |
| 1 | <?php namespace App\Console\Commands; | ||
| 2 | |||
| 3 | use Illuminate\Console\Command; | ||
| 4 | use DB; | ||
| 5 | use Config; | ||
| 6 | |||
| 7 | use App\Models\User; | ||
| 8 | use App\Models\Accesslog; | ||
| 9 | |||
| 10 | use App\Models\CRMCall; | ||
| 11 | use Schema; | ||
| 12 | use PDO; | ||
| 13 | |||
| 14 | use Illuminate\Database\Schema\Blueprint; | ||
| 15 | |||
| 16 | class dailyupload_calllog extends Command { | ||
| 17 | |||
| 18 | /** | ||
| 19 | * The console command name. | ||
| 20 | * | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | protected $signature = 'dailyupload_calllog'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * The console command description. | ||
| 27 | * | ||
| 28 | * @var string | ||
| 29 | */ | ||
| 30 | protected $description = 'dailyupload_calllog'; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Execute the console command. | ||
| 34 | * | ||
| 35 | * @return mixed | ||
| 36 | */ | ||
| 37 | public function handle() | ||
| 38 | { | ||
| 39 | $nowts=time(); | ||
| 40 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 41 | $logdate=strtotime('0 day'); | ||
| 42 | |||
| 43 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | ||
| 44 | $server_ip=env('app_ip'); | ||
| 45 | $central_ip=env('central_ip'); | ||
| 46 | $calllog_report = "calllog_report_".date("d_m_Y",$logdate); | ||
| 47 | $created_at=date("Y-m-d H:i:s"); | ||
| 48 | |||
| 49 | $conn = array( | ||
| 50 | 'driver' => 'mysql', | ||
| 51 | 'host' => $central_ip, | ||
| 52 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | ||
| 53 | 'username' => env('DB_USERNAME', 'root'), | ||
| 54 | 'password' => env('DB_PASSWORD', ''), | ||
| 55 | 'charset' => 'utf8', | ||
| 56 | 'collation' => 'utf8_unicode_ci', | ||
| 57 | 'prefix' => '', | ||
| 58 | 'options' => array( | ||
| 59 | PDO::ATTR_TIMEOUT => 5, | ||
| 60 | ), | ||
| 61 | ); | ||
| 62 | Config::set("database.connections.conn", $conn); | ||
| 63 | if(DB::connection("conn")->getDatabaseName()) | ||
| 64 | { | ||
| 65 | |||
| 66 | $serverclist=DB::connection("conn")->select(DB::raw("select id from server_details where server_ip='$server_ip'")); | ||
| 67 | $server_id=$serverclist[0]->id; | ||
| 68 | if($server_id<10){ | ||
| 69 | $server_id="0".$server_id; | ||
| 70 | } | ||
| 71 | |||
| 72 | $clist=DB::connection("conn")->select(DB::raw("select count(*) as cnt,server from $calllog_report group by server")); | ||
| 73 | $caar=[]; | ||
| 74 | foreach($clist as $cline) | ||
| 75 | { | ||
| 76 | $caar[$cline->server]= $cline->cnt; | ||
| 77 | |||
| 78 | |||
| 79 | } | ||
| 80 | $mlist=DB::select(DB::raw("select count(*) as countrecord from crmcalls where created_at>'".date("Y-m-d",$logdate)."' and created_at<'".date("Y-m-d",$logdate+24*60*60)."'")); | ||
| 81 | |||
| 82 | $location_cont='0'; | ||
| 83 | $central_cont='0'; | ||
| 84 | |||
| 85 | $location_cont=$mlist[0]->countrecord; | ||
| 86 | if(array_key_exists($server_id,$caar)){ | ||
| 87 | $central_cont=$caar[$server_id]; | ||
| 88 | }else{ | ||
| 89 | $central_cont=0; | ||
| 90 | |||
| 91 | } | ||
| 92 | $dif=($central_cont)-($mlist[0]->countrecord); | ||
| 93 | |||
| 94 | if($dif==0){ | ||
| 95 | |||
| 96 | $result="Y"; | ||
| 97 | |||
| 98 | DB::connection("conn")->insert(DB::raw("insert into dailyupload_calllog_records set created_at='$created_at',server_id='$server_id',server_ip='$server_ip',central_count='$central_cont',location_count='$location_cont',difference='$dif',result='$result'")); | ||
| 99 | |||
| 100 | }else{ | ||
| 101 | |||
| 102 | $result="N"; | ||
| 103 | DB::connection("conn")->insert(DB::raw("insert into dailyupload_calllog_records set created_at='$created_at',server_id='$server_id',server_ip='$server_ip',central_count='$central_cont',location_count='$location_cont',difference='$dif',result='$result'")); | ||
| 104 | |||
| 105 | } | ||
| 106 | |||
| 107 | DB::connection("conn")->disconnect(); | ||
| 108 | |||
| 109 | } | ||
| 110 | |||
| 111 | } | ||
| 112 | |||
| 113 | |||
| 114 | } |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', |
| ... | @@ -88,8 +88,7 @@ class bulkServerUpload extends Command { | ... | @@ -88,8 +88,7 @@ class bulkServerUpload extends Command { |
| 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); | 88 | $serverclist=DB::connection("conn")->select(DB::raw("select location from server_details where server_ip='$server_ip'")); |
| 89 | $location=$serverclist[0]->location; | 89 | $location=$serverclist[0]->location; |
| 90 | 90 | ||
| 91 | 91 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 0,50000")); | |
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 0,20000")); | ||
| 93 | 92 | ||
| 94 | $conn=''; | 93 | $conn=''; |
| 95 | 94 | ||
| ... | @@ -211,7 +210,7 @@ class bulkServerUpload extends Command { | ... | @@ -211,7 +210,7 @@ class bulkServerUpload extends Command { |
| 211 | } | 210 | } |
| 212 | 211 | ||
| 213 | } | 212 | } |
| 214 | if(!empty($successArr)){ | 213 | /*if(!empty($successArr)){ |
| 215 | foreach($successArr as $succes) | 214 | foreach($successArr as $succes) |
| 216 | { | 215 | { |
| 217 | $setSuccess=array(); | 216 | $setSuccess=array(); |
| ... | @@ -242,7 +241,7 @@ class bulkServerUpload extends Command { | ... | @@ -242,7 +241,7 @@ class bulkServerUpload extends Command { |
| 242 | 241 | ||
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | 242 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); |
| 244 | } | 243 | } |
| 245 | } | 244 | }*/ |
| 246 | 245 | ||
| 247 | DB::connection("conn")->disconnect(); | 246 | DB::connection("conn")->disconnect(); |
| 248 | } | 247 | } | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_1 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_1 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', |
| ... | @@ -89,7 +89,7 @@ class bulkServerUpload_1 extends Command { | ... | @@ -89,7 +89,7 @@ class bulkServerUpload_1 extends Command { |
| 89 | $location=$serverclist[0]->location; | 89 | $location=$serverclist[0]->location; |
| 90 | 90 | ||
| 91 | 91 | ||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 20001,40000")); | 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 50000,50000")); |
| 93 | 93 | ||
| 94 | $conn=''; | 94 | $conn=''; |
| 95 | 95 | ||
| ... | @@ -211,6 +211,7 @@ class bulkServerUpload_1 extends Command { | ... | @@ -211,6 +211,7 @@ class bulkServerUpload_1 extends Command { |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | } | 213 | } |
| 214 | /* | ||
| 214 | if(!empty($successArr)){ | 215 | if(!empty($successArr)){ |
| 215 | foreach($successArr as $succes) | 216 | foreach($successArr as $succes) |
| 216 | { | 217 | { |
| ... | @@ -243,6 +244,7 @@ class bulkServerUpload_1 extends Command { | ... | @@ -243,6 +244,7 @@ class bulkServerUpload_1 extends Command { |
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | 244 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); |
| 244 | } | 245 | } |
| 245 | } | 246 | } |
| 247 | */ | ||
| 246 | 248 | ||
| 247 | DB::connection("conn")->disconnect(); | 249 | DB::connection("conn")->disconnect(); |
| 248 | } | 250 | } | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_2 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_2 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', |
| ... | @@ -89,7 +89,7 @@ class bulkServerUpload_2 extends Command { | ... | @@ -89,7 +89,7 @@ class bulkServerUpload_2 extends Command { |
| 89 | $location=$serverclist[0]->location; | 89 | $location=$serverclist[0]->location; |
| 90 | 90 | ||
| 91 | 91 | ||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 40001,60000")); | 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 100000,50000")); |
| 93 | 93 | ||
| 94 | $conn=''; | 94 | $conn=''; |
| 95 | 95 | ||
| ... | @@ -211,6 +211,7 @@ class bulkServerUpload_2 extends Command { | ... | @@ -211,6 +211,7 @@ class bulkServerUpload_2 extends Command { |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | } | 213 | } |
| 214 | /* | ||
| 214 | if(!empty($successArr)){ | 215 | if(!empty($successArr)){ |
| 215 | foreach($successArr as $succes) | 216 | foreach($successArr as $succes) |
| 216 | { | 217 | { |
| ... | @@ -243,7 +244,7 @@ class bulkServerUpload_2 extends Command { | ... | @@ -243,7 +244,7 @@ class bulkServerUpload_2 extends Command { |
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | 244 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); |
| 244 | } | 245 | } |
| 245 | } | 246 | } |
| 246 | 247 | */ | |
| 247 | DB::connection("conn")->disconnect(); | 248 | DB::connection("conn")->disconnect(); |
| 248 | } | 249 | } |
| 249 | } | 250 | } | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_3 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_3 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', |
| ... | @@ -89,7 +89,7 @@ class bulkServerUpload_3 extends Command { | ... | @@ -89,7 +89,7 @@ class bulkServerUpload_3 extends Command { |
| 89 | $location=$serverclist[0]->location; | 89 | $location=$serverclist[0]->location; |
| 90 | 90 | ||
| 91 | 91 | ||
| 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 60001,80000")); | 92 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat where SERVER_IP='$server_ip' order by auto_id asc limit 150000,50000")); |
| 93 | 93 | ||
| 94 | $conn=''; | 94 | $conn=''; |
| 95 | 95 | ||
| ... | @@ -211,6 +211,7 @@ class bulkServerUpload_3 extends Command { | ... | @@ -211,6 +211,7 @@ class bulkServerUpload_3 extends Command { |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | } | 213 | } |
| 214 | /* | ||
| 214 | if(!empty($successArr)){ | 215 | if(!empty($successArr)){ |
| 215 | foreach($successArr as $succes) | 216 | foreach($successArr as $succes) |
| 216 | { | 217 | { |
| ... | @@ -243,7 +244,7 @@ class bulkServerUpload_3 extends Command { | ... | @@ -243,7 +244,7 @@ class bulkServerUpload_3 extends Command { |
| 243 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); | 244 | DB::connection("conn")->insert(DB::raw("insert into bz_record_upload_uat_failure set $setFailure")); |
| 244 | } | 245 | } |
| 245 | } | 246 | } |
| 246 | 247 | */ | |
| 247 | DB::connection("conn")->disconnect(); | 248 | DB::connection("conn")->disconnect(); |
| 248 | } | 249 | } |
| 249 | } | 250 | } | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_4 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_4 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_5 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_5 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_6 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_6 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_daily extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_daily extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', |
| ... | @@ -91,7 +91,7 @@ echo $central_ip; | ... | @@ -91,7 +91,7 @@ echo $central_ip; |
| 91 | echo $location; | 91 | echo $location; |
| 92 | 92 | ||
| 93 | 93 | ||
| 94 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat_daily where SERVER_IP='$server_ip'")); | 94 | $excelarray = DB::connection("conn")->select(DB::raw("select * from bz_record_upload_uat_daily where SERVER_IP='$server_ip' order by auto_id asc limit 0,200")); |
| 95 | 95 | ||
| 96 | $conn=''; | 96 | $conn=''; |
| 97 | 97 | ... | ... |
application/app/Console/Commands/bulkServerUpload_data3.php
100644 → 100755
| ... | @@ -71,9 +71,9 @@ class bulkServerUpload_data3 extends Command { | ... | @@ -71,9 +71,9 @@ class bulkServerUpload_data3 extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', | ... | ... |
| ... | @@ -71,9 +71,9 @@ class bulkserverupload_data extends Command { | ... | @@ -71,9 +71,9 @@ class bulkserverupload_data extends Command { |
| 71 | $conn = array( | 71 | $conn = array( |
| 72 | 'driver' => 'mysql', | 72 | 'driver' => 'mysql', |
| 73 | 'host' => $central_ip, | 73 | 'host' => $central_ip, |
| 74 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 74 | 'database' => env('CENTRAL_DB'), |
| 75 | 'username' => env('DB_USERNAME', 'root'), | 75 | 'username' => env('CENTRAL_USERNAME'), |
| 76 | 'password' => env('DB_PASSWORD', 'yb9738z'), | 76 | 'password' => env('CENTRAL_PASSWORD'), |
| 77 | 'charset' => 'utf8', | 77 | 'charset' => 'utf8', |
| 78 | 'collation' => 'utf8_unicode_ci', | 78 | 'collation' => 'utf8_unicode_ci', |
| 79 | 'prefix' => '', | 79 | 'prefix' => '', | ... | ... |
| ... | @@ -51,9 +51,9 @@ class calllog extends Command { | ... | @@ -51,9 +51,9 @@ class calllog extends Command { |
| 51 | $conn = array( | 51 | $conn = array( |
| 52 | 'driver' => 'mysql', | 52 | 'driver' => 'mysql', |
| 53 | 'host' => $central_ip, | 53 | 'host' => $central_ip, |
| 54 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 54 | 'database' => env('CENTRAL_DB'), |
| 55 | 'username' => env('DB_USERNAME', 'root'), | 55 | 'username' => env('CENTRAL_USERNAME'), |
| 56 | 'password' => env('DB_PASSWORD', ''), | 56 | 'password' => env('CENTRAL_PASSWORD'), |
| 57 | 'charset' => 'utf8', | 57 | 'charset' => 'utf8', |
| 58 | 'collation' => 'utf8_unicode_ci', | 58 | 'collation' => 'utf8_unicode_ci', |
| 59 | 'prefix' => '', | 59 | 'prefix' => '', | ... | ... |
| ... | @@ -47,9 +47,9 @@ class complaint_data extends Command { | ... | @@ -47,9 +47,9 @@ class complaint_data extends Command { |
| 47 | $conn = array( | 47 | $conn = array( |
| 48 | 'driver' => 'mysql', | 48 | 'driver' => 'mysql', |
| 49 | 'host' => $central_ip, | 49 | 'host' => $central_ip, |
| 50 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 50 | 'database' => env('CENTRAL_DB'), |
| 51 | 'username' => env('DB_USERNAME', 'root'), | 51 | 'username' => env('CENTRAL_USERNAME'), |
| 52 | 'password' => env('DB_PASSWORD', ''), | 52 | 'password' => env('CENTRAL_PASSWORD'), |
| 53 | 'charset' => 'utf8', | 53 | 'charset' => 'utf8', |
| 54 | 'collation' => 'utf8_unicode_ci', | 54 | 'collation' => 'utf8_unicode_ci', |
| 55 | 'prefix' => '', | 55 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ class dailyupload_calllog extends Command { | ... | @@ -50,9 +50,9 @@ class dailyupload_calllog extends Command { |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -51,9 +51,9 @@ class dailyupload_questionaire extends Command { | ... | @@ -51,9 +51,9 @@ class dailyupload_questionaire extends Command { |
| 51 | $conn = array( | 51 | $conn = array( |
| 52 | 'driver' => 'mysql', | 52 | 'driver' => 'mysql', |
| 53 | 'host' => $central_ip, | 53 | 'host' => $central_ip, |
| 54 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 54 | 'database' => env('CENTRAL_DB'), |
| 55 | 'username' => env('DB_USERNAME', 'root'), | 55 | 'username' => env('CENTRAL_USERNAME'), |
| 56 | 'password' => env('DB_PASSWORD', ''), | 56 | 'password' => env('CENTRAL_PASSWORD'), |
| 57 | 'charset' => 'utf8', | 57 | 'charset' => 'utf8', |
| 58 | 'collation' => 'utf8_unicode_ci', | 58 | 'collation' => 'utf8_unicode_ci', |
| 59 | 'prefix' => '', | 59 | 'prefix' => '', | ... | ... |
| ... | @@ -44,15 +44,15 @@ class full_remark_details extends Command { | ... | @@ -44,15 +44,15 @@ class full_remark_details extends Command { |
| 44 | 44 | ||
| 45 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); | 45 | $tcol=0;$fieldsarr=array();$extrahdrarr=array(); |
| 46 | $server_ip=env('app_ip'); | 46 | $server_ip=env('app_ip'); |
| 47 | $full_remark = "full_remark_details"; | ||
| 48 | $central_ip=env('central_ip'); | 47 | $central_ip=env('central_ip'); |
| 48 | $full_remark = "full_remark_details"; | ||
| 49 | 49 | ||
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', |
| ... | @@ -76,8 +76,8 @@ class full_remark_details extends Command { | ... | @@ -76,8 +76,8 @@ class full_remark_details extends Command { |
| 76 | $maxids=$maxid[0]->maxid; | 76 | $maxids=$maxid[0]->maxid; |
| 77 | 77 | ||
| 78 | //$qlist=DB::select(DB::raw("SELECT * from full_remark")); | 78 | //$qlist=DB::select(DB::raw("SELECT * from full_remark")); |
| 79 | $qlist=DB::select(DB::raw("SELECT * from full_remark where id>'$maxids' and created_at>'".date("Y-m-d")."' and created_at<'".date("Y-m-d H:i:s",$logdate-(60*60))."'")); | 79 | $qlist=DB::select(DB::raw("SELECT * from full_remark where id>'$maxids' and fullremark!=''")); |
| 80 | 80 | echo count($qlist); | |
| 81 | $userarr=array(); | 81 | $userarr=array(); |
| 82 | foreach($qlist as $qline) | 82 | foreach($qlist as $qline) |
| 83 | { | 83 | { |
| ... | @@ -94,6 +94,7 @@ class full_remark_details extends Command { | ... | @@ -94,6 +94,7 @@ class full_remark_details extends Command { |
| 94 | DB::connection("conn")->insert(DB::raw("insert into ".$full_remark." set $setstr")); | 94 | DB::connection("conn")->insert(DB::raw("insert into ".$full_remark." set $setstr")); |
| 95 | 95 | ||
| 96 | } | 96 | } |
| 97 | echo "\n".date('Y-m-d H:i:s')."\n"; | ||
| 97 | DB::connection("conn")->disconnect(); | 98 | DB::connection("conn")->disconnect(); |
| 98 | 99 | ||
| 99 | } | 100 | } | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -47,9 +47,9 @@ class relationship_tag extends Command { | ... | @@ -47,9 +47,9 @@ class relationship_tag extends Command { |
| 47 | $conn = array( | 47 | $conn = array( |
| 48 | 'driver' => 'mysql', | 48 | 'driver' => 'mysql', |
| 49 | 'host' => $central_ip, | 49 | 'host' => $central_ip, |
| 50 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 50 | 'database' => env('CENTRAL_DB'), |
| 51 | 'username' => env('DB_USERNAME', 'root'), | 51 | 'username' => env('CENTRAL_USERNAME'), |
| 52 | 'password' => env('DB_PASSWORD', ''), | 52 | 'password' => env('CENTRAL_PASSWORD'), |
| 53 | 'charset' => 'utf8', | 53 | 'charset' => 'utf8', |
| 54 | 'collation' => 'utf8_unicode_ci', | 54 | 'collation' => 'utf8_unicode_ci', |
| 55 | 'prefix' => '', | 55 | 'prefix' => '', | ... | ... |
| ... | @@ -47,9 +47,9 @@ public function handle() | ... | @@ -47,9 +47,9 @@ public function handle() |
| 47 | $conn = array( | 47 | $conn = array( |
| 48 | 'driver' => 'mysql', | 48 | 'driver' => 'mysql', |
| 49 | 'host' => $central_ip, | 49 | 'host' => $central_ip, |
| 50 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 50 | 'database' => env('CENTRAL_DB'), |
| 51 | 'username' => env('DB_USERNAME', 'root'), | 51 | 'username' => env('CENTRAL_USERNAME'), |
| 52 | 'password' => env('DB_PASSWORD', ''), | 52 | 'password' => env('CENTRAL_PASSWORD'), |
| 53 | 'charset' => 'utf8', | 53 | 'charset' => 'utf8', |
| 54 | 'collation' => 'utf8_unicode_ci', | 54 | 'collation' => 'utf8_unicode_ci', |
| 55 | 'prefix' => '', | 55 | 'prefix' => '', | ... | ... |
| ... | @@ -54,9 +54,9 @@ public function handle() | ... | @@ -54,9 +54,9 @@ public function handle() |
| 54 | $conn = array( | 54 | $conn = array( |
| 55 | 'driver' => 'mysql', | 55 | 'driver' => 'mysql', |
| 56 | 'host' => $central_ip, | 56 | 'host' => $central_ip, |
| 57 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 57 | 'database' => env('CENTRAL_DB'), |
| 58 | 'username' => env('DB_USERNAME', 'root'), | 58 | 'username' => env('CENTRAL_USERNAME'), |
| 59 | 'password' => env('DB_PASSWORD', ''), | 59 | 'password' => env('CENTRAL_PASSWORD'), |
| 60 | 'charset' => 'utf8', | 60 | 'charset' => 'utf8', |
| 61 | 'collation' => 'utf8_unicode_ci', | 61 | 'collation' => 'utf8_unicode_ci', |
| 62 | 'prefix' => '', | 62 | 'prefix' => '', | ... | ... |
| ... | @@ -60,9 +60,9 @@ use Illuminate\Database\Schema\Blueprint; | ... | @@ -60,9 +60,9 @@ use Illuminate\Database\Schema\Blueprint; |
| 60 | $conn = array( | 60 | $conn = array( |
| 61 | 'driver' => 'mysql', | 61 | 'driver' => 'mysql', |
| 62 | 'host' => $central_ip, | 62 | 'host' => $central_ip, |
| 63 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 63 | 'database' => env('CENTRAL_DB'), |
| 64 | 'username' => env('DB_USERNAME', 'root'), | 64 | 'username' => env('CENTRAL_USERNAME'), |
| 65 | 'password' => env('DB_PASSWORD', ''), | 65 | 'password' => env('CENTRAL_PASSWORD'), |
| 66 | 'charset' => 'utf8', | 66 | 'charset' => 'utf8', |
| 67 | 'collation' => 'utf8_unicode_ci', | 67 | 'collation' => 'utf8_unicode_ci', |
| 68 | 'prefix' => '', | 68 | 'prefix' => '', | ... | ... |
| ... | @@ -51,9 +51,9 @@ class recording_reconcilation_metadata extends Command | ... | @@ -51,9 +51,9 @@ class recording_reconcilation_metadata extends Command |
| 51 | $conn = array( | 51 | $conn = array( |
| 52 | 'driver' => 'mysql', | 52 | 'driver' => 'mysql', |
| 53 | 'host' => $central_ip, | 53 | 'host' => $central_ip, |
| 54 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 54 | 'database' => env('CENTRAL_DB'), |
| 55 | 'username' => env('DB_USERNAME', 'root'), | 55 | 'username' => env('CENTRAL_USERNAME'), |
| 56 | 'password' => env('DB_PASSWORD', ''), | 56 | 'password' => env('CENTRAL_PASSWORD'), |
| 57 | 'charset' => 'utf8', | 57 | 'charset' => 'utf8', |
| 58 | 'collation' => 'utf8_unicode_ci', | 58 | 'collation' => 'utf8_unicode_ci', |
| 59 | 'prefix' => '', | 59 | 'prefix' => '', | ... | ... |
| ... | @@ -46,9 +46,9 @@ class records_details extends Command { | ... | @@ -46,9 +46,9 @@ class records_details extends Command { |
| 46 | $conn = array( | 46 | $conn = array( |
| 47 | 'driver' => 'mysql', | 47 | 'driver' => 'mysql', |
| 48 | 'host' => $central_ip, | 48 | 'host' => $central_ip, |
| 49 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 49 | 'database' => env('CENTRAL_DB'), |
| 50 | 'username' => env('DB_USERNAME', 'root'), | 50 | 'username' => env('CENTRAL_USERNAME'), |
| 51 | 'password' => env('DB_PASSWORD', ''), | 51 | 'password' => env('CENTRAL_PASSWORD'), |
| 52 | 'charset' => 'utf8', | 52 | 'charset' => 'utf8', |
| 53 | 'collation' => 'utf8_unicode_ci', | 53 | 'collation' => 'utf8_unicode_ci', |
| 54 | 'prefix' => '', | 54 | 'prefix' => '', |
| ... | @@ -73,7 +73,7 @@ echo ",".$server_ip; | ... | @@ -73,7 +73,7 @@ echo ",".$server_ip; |
| 73 | 73 | ||
| 74 | $maxids=$maxid[0]->maxid; | 74 | $maxids=$maxid[0]->maxid; |
| 75 | 75 | ||
| 76 | $qlist=DB::select(DB::raw("SELECT id,clientcode,client,status,clientinternalid,mobile,priority,modified,question,firstname FROM `records` where id>'$maxids'")); | 76 | $qlist=DB::select(DB::raw("SELECT id,created,clientcode,client,status,clientinternalid,mobile,priority,modified,question,firstname FROM `records` where id>'$maxids' and client != 'Inactive'")); |
| 77 | 77 | ||
| 78 | $countnumber=count($qlist); | 78 | $countnumber=count($qlist); |
| 79 | $finalnumber=$countnumber/50; | 79 | $finalnumber=$countnumber/50; |
| ... | @@ -86,6 +86,7 @@ echo ",".$server_ip; | ... | @@ -86,6 +86,7 @@ echo ",".$server_ip; |
| 86 | foreach($qlist as $qline) | 86 | foreach($qlist as $qline) |
| 87 | { | 87 | { |
| 88 | $record_id=$qline->id; | 88 | $record_id=$qline->id; |
| 89 | $created=$qline->created; | ||
| 89 | $clientcode=$qline->clientcode; | 90 | $clientcode=$qline->clientcode; |
| 90 | $client=$qline->client; | 91 | $client=$qline->client; |
| 91 | $status=$qline->status; | 92 | $status=$qline->status; |
| ... | @@ -96,19 +97,19 @@ echo ",".$server_ip; | ... | @@ -96,19 +97,19 @@ echo ",".$server_ip; |
| 96 | $question=$qline->question; | 97 | $question=$qline->question; |
| 97 | $firstname=$qline->firstname; | 98 | $firstname=$qline->firstname; |
| 98 | 99 | ||
| 99 | $shortinsert.="('$client', '$server_ip', '$record_id', '$clientcode', '$status', '$clientinternalid', '$location', '$mobile', '$question', '$firstname', '$priority', '$modified'),"; | 100 | $shortinsert.="('$client', '$server_ip', '$record_id', '$clientcode', '$status', '$clientinternalid', '$location', '$mobile', '$question', '$firstname', '$priority', '$modified', '$created'),"; |
| 100 | 101 | ||
| 101 | 102 | ||
| 102 | if($kkk<=$finalnumber){ | 103 | if($kkk<=$finalnumber){ |
| 103 | if($iii%50==0){ | 104 | if($iii%50==0){ |
| 104 | 105 | ||
| 105 | $shortinsert=substr($shortinsert,0,-1); | 106 | $shortinsert=substr($shortinsert,0,-1); |
| 106 | DB::connection("conn")->insert(DB::raw("INSERT INTO `records_details` (`client`, `server_ip`, `record_id`, `cust_id`, `records_status`, `group_id`, `location`, `mobile`, `question`,`firstname`, `priority`, `modified`) VALUES $shortinsert")); | 107 | DB::connection("conn")->insert(DB::raw("INSERT INTO `records_details` (`client`, `server_ip`, `record_id`, `cust_id`, `records_status`, `group_id`, `location`, `mobile`, `question`,`firstname`, `priority`, `modified`, `created`) VALUES $shortinsert")); |
| 107 | 108 | ||
| 108 | $kkk++; | 109 | $kkk++; |
| 109 | } | 110 | } |
| 110 | }else{ | 111 | }else{ |
| 111 | DB::connection("conn")->insert(DB::raw("insert into records_details set client='$client', server_ip='$server_ip', record_id='$record_id', cust_id='$clientcode', records_status='$status', group_id='$clientinternalid', location='$location',mobile='$mobile',question='$question',firstname='$firstname',priority='$priority',modified='$modified'")); | 112 | DB::connection("conn")->insert(DB::raw("insert into records_details set client='$client', server_ip='$server_ip', record_id='$record_id', cust_id='$clientcode', records_status='$status', group_id='$clientinternalid', location='$location',mobile='$mobile',question='$question',firstname='$firstname',priority='$priority',modified='$modified',created='$created'")); |
| 112 | } | 113 | } |
| 113 | if($iii%50==0){ | 114 | if($iii%50==0){ |
| 114 | $shortinsert=""; | 115 | $shortinsert=""; | ... | ... |
| ... | @@ -47,9 +47,9 @@ class relationship_tag extends Command { | ... | @@ -47,9 +47,9 @@ class relationship_tag extends Command { |
| 47 | $conn = array( | 47 | $conn = array( |
| 48 | 'driver' => 'mysql', | 48 | 'driver' => 'mysql', |
| 49 | 'host' => $central_ip, | 49 | 'host' => $central_ip, |
| 50 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 50 | 'database' => env('CENTRAL_DB'), |
| 51 | 'username' => env('DB_USERNAME', 'root'), | 51 | 'username' => env('CENTRAL_USERNAME'), |
| 52 | 'password' => env('DB_PASSWORD', ''), | 52 | 'password' => env('CENTRAL_PASSWORD'), |
| 53 | 'charset' => 'utf8', | 53 | 'charset' => 'utf8', |
| 54 | 'collation' => 'utf8_unicode_ci', | 54 | 'collation' => 'utf8_unicode_ci', |
| 55 | 'prefix' => '', | 55 | 'prefix' => '', | ... | ... |
| ... | @@ -46,9 +46,9 @@ public function handle() | ... | @@ -46,9 +46,9 @@ public function handle() |
| 46 | $conn = array( | 46 | $conn = array( |
| 47 | 'driver' => 'mysql', | 47 | 'driver' => 'mysql', |
| 48 | 'host' => $central_ip, | 48 | 'host' => $central_ip, |
| 49 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 49 | 'database' => env('CENTRAL_DB'), |
| 50 | 'username' => env('DB_USERNAME', 'root'), | 50 | 'username' => env('CENTRAL_USERNAME'), |
| 51 | 'password' => env('DB_PASSWORD', ''), | 51 | 'password' => env('CENTRAL_PASSWORD'), |
| 52 | 'charset' => 'utf8', | 52 | 'charset' => 'utf8', |
| 53 | 'collation' => 'utf8_unicode_ci', | 53 | 'collation' => 'utf8_unicode_ci', |
| 54 | 'prefix' => '', | 54 | 'prefix' => '', | ... | ... |
| ... | @@ -46,9 +46,9 @@ public function handle() | ... | @@ -46,9 +46,9 @@ public function handle() |
| 46 | $conn = array( | 46 | $conn = array( |
| 47 | 'driver' => 'mysql', | 47 | 'driver' => 'mysql', |
| 48 | 'host' => $central_ip, | 48 | 'host' => $central_ip, |
| 49 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 49 | 'database' => env('CENTRAL_DB'), |
| 50 | 'username' => env('DB_USERNAME', 'root'), | 50 | 'username' => env('CENTRAL_USERNAME'), |
| 51 | 'password' => env('DB_PASSWORD', ''), | 51 | 'password' => env('CENTRAL_PASSWORD'), |
| 52 | 'charset' => 'utf8', | 52 | 'charset' => 'utf8', |
| 53 | 'collation' => 'utf8_unicode_ci', | 53 | 'collation' => 'utf8_unicode_ci', |
| 54 | 'prefix' => '', | 54 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -50,9 +50,9 @@ public function handle() | ... | @@ -50,9 +50,9 @@ public function handle() |
| 50 | $conn = array( | 50 | $conn = array( |
| 51 | 'driver' => 'mysql', | 51 | 'driver' => 'mysql', |
| 52 | 'host' => $central_ip, | 52 | 'host' => $central_ip, |
| 53 | 'database' => env('DB_DATABASE', 'kstych_flexydial'), | 53 | 'database' => env('CENTRAL_DB'), |
| 54 | 'username' => env('DB_USERNAME', 'root'), | 54 | 'username' => env('CENTRAL_USERNAME'), |
| 55 | 'password' => env('DB_PASSWORD', ''), | 55 | 'password' => env('CENTRAL_PASSWORD'), |
| 56 | 'charset' => 'utf8', | 56 | 'charset' => 'utf8', |
| 57 | 'collation' => 'utf8_unicode_ci', | 57 | 'collation' => 'utf8_unicode_ci', |
| 58 | 'prefix' => '', | 58 | 'prefix' => '', | ... | ... |
| ... | @@ -47,8 +47,10 @@ protected $commands = [ | ... | @@ -47,8 +47,10 @@ protected $commands = [ |
| 47 | 'App\Console\Commands\BirthdayDate', | 47 | 'App\Console\Commands\BirthdayDate', |
| 48 | 'App\Console\Commands\bulkserverupload_data', | 48 | 'App\Console\Commands\bulkserverupload_data', |
| 49 | 'App\Console\Commands\bulkServerUpload_data3', | 49 | 'App\Console\Commands\bulkServerUpload_data3', |
| 50 | 'App\Console\Commands\Userlog_datavalidation', | 50 | 'App\Console\Commands\Calllogupdate', |
| 51 | 51 | 'App\Console\Commands\CreateCall', | |
| 52 | 'App\Console\Commands\PredictiveCallHangUp', | ||
| 53 | 'App\Console\Commands\UpdateAvgRingSec', | ||
| 52 | ]; | 54 | ]; |
| 53 | 55 | ||
| 54 | /** | 56 | /** |
| ... | @@ -59,12 +61,13 @@ protected $commands = [ | ... | @@ -59,12 +61,13 @@ protected $commands = [ |
| 59 | */ | 61 | */ |
| 60 | protected function schedule(Schedule $schedule) | 62 | protected function schedule(Schedule $schedule) |
| 61 | { | 63 | { |
| 62 | $schedule->command('KstychDaily')->daily()->withoutOverlapping(); | 64 | //$schedule->command('KstychDaily')->daily()->withoutOverlapping(); |
| 65 | $schedule->command('UpdateAvgRingSec')->daily()->withoutOverlapping(); | ||
| 63 | //$schedule->command('bulkServerUpload')->everyFiveMinutes()->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 66 | //$schedule->command('bulkServerUpload')->everyFiveMinutes()->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 64 | //$schedule->command('bulkserverupload_data')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkserverupload_data.txt")->withoutOverlapping(); | 67 | //$schedule->command('bulkserverupload_data')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkserverupload_data.txt")->withoutOverlapping(); |
| 65 | $schedule->command('bulkserverupload_data')->dailyAt('14:17')->appendOutputTo(storage_path()."/reason/bulkserverupload_data.txt")->withoutOverlapping(); | 68 | //$schedule->command('bulkserverupload_data')->dailyAt('14:17')->appendOutputTo(storage_path()."/reason/bulkserverupload_data.txt")->withoutOverlapping(); |
| 66 | $schedule->command('bulkServerUpload')->dailyAt('14:15')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 69 | //$schedule->command('bulkServerUpload')->dailyAt('14:15')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 67 | $schedule->command('bulkServerUpload_data3')->dailyAt('14:20')->appendOutputTo(storage_path()."/reason/bulkServerUpload_data3.txt")->withoutOverlapping(); | 70 | //$schedule->command('bulkServerUpload_data3')->dailyAt('14:20')->appendOutputTo(storage_path()."/reason/bulkServerUpload_data3.txt")->withoutOverlapping(); |
| 68 | 71 | ||
| 69 | //$schedule->command('relationship_tag')->everyMinute()->appendOutputTo(storage_path()."/reason/relationship_tag.txt")->withoutOverlapping(); | 72 | //$schedule->command('relationship_tag')->everyMinute()->appendOutputTo(storage_path()."/reason/relationship_tag.txt")->withoutOverlapping(); |
| 70 | //$schedule->command('calllog')->everyMinute()->appendOutputTo(storage_path()."/reason/calllog.txt")->withoutOverlapping(); | 73 | //$schedule->command('calllog')->everyMinute()->appendOutputTo(storage_path()."/reason/calllog.txt")->withoutOverlapping(); |
| ... | @@ -73,19 +76,18 @@ protected function schedule(Schedule $schedule) | ... | @@ -73,19 +76,18 @@ protected function schedule(Schedule $schedule) |
| 73 | //$schedule->command('supervisor_agent_rec')->everyMinute()->appendOutputTo(storage_path()."/reason/supervisor_agent_rec.txt")->withoutOverlapping(); | 76 | //$schedule->command('supervisor_agent_rec')->everyMinute()->appendOutputTo(storage_path()."/reason/supervisor_agent_rec.txt")->withoutOverlapping(); |
| 74 | //$schedule->command('supervisor_recommendation')->everyMinute()->appendOutputTo(storage_path()."/reason/supervisor_recommendation.txt")->withoutOverlapping(); | 77 | //$schedule->command('supervisor_recommendation')->everyMinute()->appendOutputTo(storage_path()."/reason/supervisor_recommendation.txt")->withoutOverlapping(); |
| 75 | //$schedule->command('question_tree')->everyMinute()->appendOutputTo(storage_path()."/reason/question_tree.txt")->withoutOverlapping(); | 78 | //$schedule->command('question_tree')->everyMinute()->appendOutputTo(storage_path()."/reason/question_tree.txt")->withoutOverlapping(); |
| 79 | //$schedule->command('bulkServerUpload')->dailyAt('10:08')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 76 | 80 | ||
| 77 | $schedule->command('Userlog_data')->dailyAt('01:10')->appendOutputTo(storage_path()."/reason/Userlog_data.txt")->withoutOverlapping(); | 81 | //$schedule->command('Userlog_data')->dailyAt('01:10')->appendOutputTo(storage_path()."/reason/Userlog_data.txt")->withoutOverlapping(); |
| 78 | |||
| 79 | //$schedule->command('Userlog_data')->everyMinute()->appendOutputTo(storage_path()."/reason/Userlog_data.txt")->withoutOverlapping(); | ||
| 80 | 82 | ||
| 81 | $schedule->command('bulkServerUpload')->dailyAt('14:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 83 | $schedule->command('bulkServerUpload')->dailyAt('14:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 82 | $schedule->command('bulkServerUpload_1')->dailyAt('16:18')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 84 | $schedule->command('bulkServerUpload_1')->dailyAt('16:12')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 83 | $schedule->command('bulkServerUpload_2')->dailyAt('17:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 85 | $schedule->command('bulkServerUpload_2')->dailyAt('16:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 84 | $schedule->command('bulkServerUpload_3')->dailyAt('19:15')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 86 | $schedule->command('bulkServerUpload_3')->dailyAt('21:15')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 85 | $schedule->command('bulkServerUpload_4')->dailyAt('20:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | 87 | $schedule->command('bulkServerUpload_4')->dailyAt('23:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); |
| 86 | //$schedule->command('bulkServerUpload_daily')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkServerUpload_daily.txt")->withoutOverlapping(); | 88 | //$schedule->command('bulkServerUpload_daily')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkServerUpload_daily.txt")->withoutOverlapping(); |
| 87 | //$schedule->command('bulkServerUpload_daily')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | 89 | //$schedule->command('bulkServerUpload_daily')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); |
| 88 | $schedule->command('BirthdayDate')->dailyAt('01:45')->appendOutputTo(storage_path()."/reason/BirthdayDate.txt")->withoutOverlapping(); | 90 | /*$schedule->command('BirthdayDate')->dailyAt('01:45')->appendOutputTo(storage_path()."/reason/BirthdayDate.txt")->withoutOverlapping(); |
| 89 | $schedule->command('bulkServerUpload_daily')->dailyAt('05:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | 91 | $schedule->command('bulkServerUpload_daily')->dailyAt('05:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); |
| 90 | $schedule->command('bulkServerUpload_daily')->dailyAt('07:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | 92 | $schedule->command('bulkServerUpload_daily')->dailyAt('07:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); |
| 91 | $schedule->command('bulkServerUpload_daily')->dailyAt('09:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | 93 | $schedule->command('bulkServerUpload_daily')->dailyAt('09:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); |
| ... | @@ -98,7 +100,7 @@ protected function schedule(Schedule $schedule) | ... | @@ -98,7 +100,7 @@ protected function schedule(Schedule $schedule) |
| 98 | $schedule->command('CreportNine')->dailyAt('14:44')->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); | 100 | $schedule->command('CreportNine')->dailyAt('14:44')->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); |
| 99 | 101 | ||
| 100 | $schedule->command('CreportNine')->dailyAt('01:14')->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); | 102 | $schedule->command('CreportNine')->dailyAt('01:14')->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); |
| 101 | 103 | $schedule->command('Calllogupdate')->dailyAt('09:55')->appendOutputTo(storage_path()."/reason/calllog_update.txt")->withoutOverlapping(); | |
| 102 | //$schedule->command('CreportNine')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); | 104 | //$schedule->command('CreportNine')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); |
| 103 | //$schedule->command('CreportEight')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportEight.txt")->withoutOverlapping(); | 105 | //$schedule->command('CreportEight')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportEight.txt")->withoutOverlapping(); |
| 104 | $schedule->command('questionnaire_details')->hourly()->appendOutputTo(storage_path()."/reason/questionnaire_details.txt")->withoutOverlapping(); | 106 | $schedule->command('questionnaire_details')->hourly()->appendOutputTo(storage_path()."/reason/questionnaire_details.txt")->withoutOverlapping(); |
| ... | @@ -126,8 +128,7 @@ protected function schedule(Schedule $schedule) | ... | @@ -126,8 +128,7 @@ protected function schedule(Schedule $schedule) |
| 126 | 128 | ||
| 127 | //$schedule->command('relationship_data')->everyMinute()->appendOutputTo(storage_path()."/reason/relationship_data.txt")->withoutOverlapping(); | 129 | //$schedule->command('relationship_data')->everyMinute()->appendOutputTo(storage_path()."/reason/relationship_data.txt")->withoutOverlapping(); |
| 128 | //$schedule->command('table_create')->everyMinute()->appendOutputTo(storage_path()."/reason/table_create.txt")->withoutOverlapping(); | 130 | //$schedule->command('table_create')->everyMinute()->appendOutputTo(storage_path()."/reason/table_create.txt")->withoutOverlapping(); |
| 129 | 131 | */ | |
| 130 | //$schedule->command('Userlog_datavalidation')->everyMinute()->appendOutputTo(storage_path()."/reason/Userlog_datavalid.txt")->withoutOverlapping(); | ||
| 131 | } | 132 | } |
| 132 | 133 | ||
| 133 | } | 134 | } | ... | ... |
| 1 | <?php namespace App\Console; | ||
| 2 | |||
| 3 | use Illuminate\Console\Scheduling\Schedule; | ||
| 4 | use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
| 5 | |||
| 6 | class Kernel extends ConsoleKernel | ||
| 7 | { | ||
| 8 | |||
| 9 | /** | ||
| 10 | * The Artisan commands provided by your application. | ||
| 11 | * | ||
| 12 | * @var array | ||
| 13 | */ | ||
| 14 | protected $commands = [ | ||
| 15 | 'App\Console\Commands\KstychDaily', | ||
| 16 | 'App\Console\Commands\KstychPAMI', | ||
| 17 | 'App\Console\Commands\KstychPAGI', | ||
| 18 | 'App\Console\Commands\DailyLogout', | ||
| 19 | 'App\Console\Commands\bulkServerUpload', | ||
| 20 | 'App\Console\Commands\bulkServerUpload_1', | ||
| 21 | 'App\Console\Commands\bulkServerUpload_2', | ||
| 22 | 'App\Console\Commands\bulkServerUpload_3', | ||
| 23 | 'App\Console\Commands\bulkServerUpload_4', | ||
| 24 | //'App\Console\Commands\bulkServerUpload_5', | ||
| 25 | 'App\Console\Commands\bulkServerUpload_daily', | ||
| 26 | 'App\Console\Commands\InsertCrmArchive', | ||
| 27 | 'App\Console\Commands\DeleteCrmcalls', | ||
| 28 | 'App\Console\Commands\records_details', | ||
| 29 | 'App\Console\Commands\CreportEight', | ||
| 30 | 'App\Console\Commands\questionnaire_details', | ||
| 31 | 'App\Console\Commands\Userlog_data', | ||
| 32 | 'App\Console\Commands\lead_form_details', | ||
| 33 | 'App\Console\Commands\full_remark_details', | ||
| 34 | 'App\Console\Commands\recording_reconcilation', | ||
| 35 | 'App\Console\Commands\recording_reconcilation_metadata', | ||
| 36 | 'App\Console\Commands\dailyupload_calllog', | ||
| 37 | 'App\Console\Commands\dailyupload_questionaire', | ||
| 38 | 'App\Console\Commands\relationship_data', | ||
| 39 | 'App\Console\Commands\relationship_tag', | ||
| 40 | 'App\Console\Commands\supervisor_agent_rec', | ||
| 41 | 'App\Console\Commands\supervisor_recommendation', | ||
| 42 | 'App\Console\Commands\rlppb_details', | ||
| 43 | 'App\Console\Commands\question_tree', | ||
| 44 | //'App\Console\Commands\table_create', | ||
| 45 | //'App\Console\Commands\calllog', | ||
| 46 | //'App\Console\Commands\CreportNine', | ||
| 47 | //'App\Console\Commands\CreportTen', | ||
| 48 | 'App\Console\Commands\BirthdayDate', | ||
| 49 | 'App\Console\Commands\bulkserverupload_data', | ||
| 50 | ]; | ||
| 51 | |||
| 52 | /** | ||
| 53 | * Define the application's command schedule. | ||
| 54 | * | ||
| 55 | * @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
| 56 | * @return void | ||
| 57 | */ | ||
| 58 | protected function schedule(Schedule $schedule) | ||
| 59 | { | ||
| 60 | $schedule->command('KstychDaily')->daily()->withoutOverlapping(); | ||
| 61 | //$schedule->command('bulkServerUpload')->everyFiveMinutes()->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 62 | |||
| 63 | $schedule->command('bulkserverupload_data')->dailyAt('01:45')->appendOutputTo(storage_path()."/reason/bulkserverupload_data.txt")->withoutOverlapping(); | ||
| 64 | |||
| 65 | //$schedule->command('relationship_tag')->everyMinute()->appendOutputTo(storage_path()."/reason/relationship_tag.txt")->withoutOverlapping(); | ||
| 66 | //$schedule->command('calllog')->everyMinute()->appendOutputTo(storage_path()."/reason/calllog.txt")->withoutOverlapping(); | ||
| 67 | //$schedule->command('rlppb_details')->everyMinute()->appendOutputTo(storage_path()."/reason/rlppb_details.txt")->withoutOverlapping(); | ||
| 68 | $schedule->command('BirthdayDate')->dailyAt('01:45')->appendOutputTo(storage_path()."/reason/BirthdayDate.txt")->withoutOverlapping(); | ||
| 69 | //$schedule->command('supervisor_agent_rec')->everyMinute()->appendOutputTo(storage_path()."/reason/supervisor_agent_rec.txt")->withoutOverlapping(); | ||
| 70 | //$schedule->command('supervisor_recommendation')->everyMinute()->appendOutputTo(storage_path()."/reason/supervisor_recommendation.txt")->withoutOverlapping(); | ||
| 71 | //$schedule->command('question_tree')->everyMinute()->appendOutputTo(storage_path()."/reason/question_tree.txt")->withoutOverlapping(); | ||
| 72 | |||
| 73 | $schedule->command('Userlog_data')->dailyAt('01:10')->appendOutputTo(storage_path()."/reason/Userlog_data.txt")->withoutOverlapping(); | ||
| 74 | |||
| 75 | $schedule->command('bulkServerUpload')->dailyAt('14:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 76 | $schedule->command('bulkServerUpload_1')->dailyAt('16:18')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 77 | $schedule->command('bulkServerUpload_2')->dailyAt('17:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 78 | $schedule->command('bulkServerUpload_3')->dailyAt('19:15')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 79 | $schedule->command('bulkServerUpload_4')->dailyAt('20:45')->appendOutputTo(storage_path()."/reason/bulkserver.txt")->withoutOverlapping(); | ||
| 80 | //$schedule->command('bulkServerUpload_daily')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkServerUpload_daily.txt")->withoutOverlapping(); | ||
| 81 | //$schedule->command('bulkServerUpload_daily')->everyMinute()->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | ||
| 82 | |||
| 83 | $schedule->command('bulkServerUpload_daily')->dailyAt('05:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | ||
| 84 | $schedule->command('bulkServerUpload_daily')->dailyAt('07:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | ||
| 85 | $schedule->command('bulkServerUpload_daily')->dailyAt('09:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | ||
| 86 | $schedule->command('bulkServerUpload_daily')->dailyAt('11:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | ||
| 87 | $schedule->command('bulkServerUpload_daily')->dailyAt('13:05')->appendOutputTo(storage_path()."/reason/bulkserver_daily.txt")->withoutOverlapping(); | ||
| 88 | |||
| 89 | $schedule->command('dailyupload_questionaire')->dailyAt('19:30')->appendOutputTo(storage_path()."/reason/dailyupload_questionaire.txt")->withoutOverlapping(); | ||
| 90 | //$schedule->command('CreportEight')->everyFiveMinutes()->appendOutputTo(storage_path()."/reason/CreportEight.txt")->withoutOverlapping(); | ||
| 91 | |||
| 92 | $schedule->command('CreportEight')->everyTenMinutes()->appendOutputTo(storage_path()."/reason/CreportEight.txt")->withoutOverlapping(); | ||
| 93 | //$schedule->command('CreportNine')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportNine.txt")->withoutOverlapping(); | ||
| 94 | //$schedule->command('CreportTen')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportTen.txt")->withoutOverlapping(); | ||
| 95 | //$schedule->command('CreportEight')->everyMinute()->appendOutputTo(storage_path()."/reason/CreportEight.txt")->withoutOverlapping(); | ||
| 96 | $schedule->command('questionnaire_details')->hourly()->appendOutputTo(storage_path()."/reason/questionnaire_details.txt")->withoutOverlapping(); | ||
| 97 | $schedule->command('InsertCrmArchive')->hourly()->appendOutputTo(storage_path()."/reason/InsertCrmArchive.txt")->withoutOverlapping(); | ||
| 98 | |||
| 99 | |||
| 100 | //$schedule->command('InsertCrmArchive')->everyMinute()->appendOutputTo(storage_path()."/reason/InsertCrmArchive.txt")->withoutOverlapping(); | ||
| 101 | $schedule->command('DeleteCrmcalls')->hourly()->withoutOverlapping(); | ||
| 102 | |||
| 103 | $schedule->command('DailyLogout')->dailyAt('14:30')->withoutOverlapping(); | ||
| 104 | |||
| 105 | $schedule->command('lead_form_details')->everyTenMinutes()->appendOutputTo(storage_path()."/reason/lead_form_details.txt")->withoutOverlapping(); | ||
| 106 | $schedule->command('records_details')->dailyAt('17:45')->appendOutputTo(storage_path()."/reason/records_details.txt")->withoutOverlapping(); | ||
| 107 | //$schedule->command('recording_reconcilation')->everyMinute()->appendOutputTo(storage_path()."/reason/recording_reconcilation.txt")->withoutOverlapping(); | ||
| 108 | //$schedule->command('recording_reconcilation_metadata')->everyMinute()->appendOutputTo(storage_path()."/reason/recording_reconcilation_metadata.txt")->withoutOverlapping(); | ||
| 109 | |||
| 110 | //$schedule->command('lead_form_details')->everyMinute()->appendOutputTo(storage_path()."/reason/lead_form_details.txt")->withoutOverlapping(); | ||
| 111 | |||
| 112 | $schedule->command('dailyupload_calllog')->dailyAt('19:30')->appendOutputTo(storage_path()."/reason/dailycalllog_records.txt")->withoutOverlapping(); | ||
| 113 | |||
| 114 | //$schedule->command('records_details')->everyMinute()->appendOutputTo(storage_path()."/reason/records_details.txt")->withoutOverlapping(); | ||
| 115 | $schedule->command('full_remark_details')->hourly()->appendOutputTo(storage_path()."/reason/full_remark_details.txt")->withoutOverlapping(); | ||
| 116 | //$schedule->command('questionnaire_details')->everyMinute()->appendOutputTo(storage_path()."/reason/questionnaire_details.txt")->withoutOverlapping(); | ||
| 117 | |||
| 118 | //$schedule->command('relationship_data')->everyMinute()->appendOutputTo(storage_path()."/reason/relationship_data.txt")->withoutOverlapping(); | ||
| 119 | //$schedule->command('table_create')->everyMinute()->appendOutputTo(storage_path()."/reason/table_create.txt")->withoutOverlapping(); | ||
| 120 | |||
| 121 | } | ||
| 122 | |||
| 123 | } |
| 1 | <?php | ||
| 2 | define('SMS_NOTCONTACTED',1); | ||
| 3 | define('SMS_THANKYOU',2); | ||
| 4 | $smsContactedSubdispositionsArr = array ('Contacted','Feedback'); | ||
| 5 | $smsNotContactedSubdispositionsArr = array ( | ||
| 6 | 'NC - Customer Traveling / Abroad', | ||
| 7 | 'NC - Customer in Meeting', | ||
| 8 | 'NC - Ringing / No response', | ||
| 9 | 'NC - Not Reachable', | ||
| 10 | 'NC - Switched off', | ||
| 11 | 'NC - Third Party' | ||
| 12 | ); | ||
| 13 | $smsTemplatesArr = array( | ||
| 14 | //SMS_NOTCONTACTED => "Dear Customer,Your Virtual Relationship Manager #name# from HDFC Bank tried reaching you. Kindly call #number# for all your banking and financial needs", | ||
| 15 | //SMS_NOTCONTACTED =>"Dear Customer, Your Virtual RM #name# from HDFC Bank tried reaching you. Kindly call #number# for all your banking and financial needs.", | ||
| 16 | SMS_NOTCONTACTED =>"Your RM is unable to contact you! | ||
| 17 | Call #name# @ #number# for any banking need. | ||
| 18 | Check & invest in our FD/RD @best rate. | ||
| 19 | Click here: bit.ly/2TqCdKA", | ||
| 20 | //SMS_THANKYOU =>"Thank you for speaking to your VirtualRM on #date# . Now also access your account 24/7 via NetBanking/MobileBanking. Download MobileBanking App: bit.ly/2ajTksK" | ||
| 21 | //SMS_THANKYOU =>"Thank you for speaking to your Virtual RM on #date#. Now also access your account 24/7 via Net / Mobile Banking. Download Mobile App: bit.ly/2ajTksK" | ||
| 22 | SMS_THANKYOU =>"Your opinion matters! | ||
| 23 | Thanks for talking & sharing your feedback on #number# with RM #name# | ||
| 24 | Check & invest in our FD/RD @best rate | ||
| 25 | Click: bit.ly/2TqCdKA" | ||
| 26 | ); | ||
| 27 | ?> |
application/app/Constants/gatewaydispo.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| ... | @@ -77,7 +77,7 @@ class DialModeController extends Controller { | ... | @@ -77,7 +77,7 @@ class DialModeController extends Controller { |
| 77 | 77 | ||
| 78 | $data['client'] = $client; | 78 | $data['client'] = $client; |
| 79 | $data['username'] = $username; | 79 | $data['username'] = $username; |
| 80 | 80 | $data['callingmodeArr'] = array("Progressive", "Manual", "Incoming", "Predictive"); | |
| 81 | 81 | ||
| 82 | return view('layout.module.dialmode.index',$data); | 82 | return view('layout.module.dialmode.index',$data); |
| 83 | } | 83 | } | ... | ... |
This diff is collapsed.
Click to expand it.
| 1 | <?php namespace App\Http\Controllers; | ||
| 2 | |||
| 3 | use Auth; | ||
| 4 | use Input; | ||
| 5 | use Config; | ||
| 6 | use Session; | ||
| 7 | use DB; | ||
| 8 | use App\Services\FormBuilder; | ||
| 9 | use Illuminate\Http\Request; | ||
| 10 | use Response; | ||
| 11 | use App\Models\Disposition; | ||
| 12 | use App\Models\SubDisposition; | ||
| 13 | |||
| 14 | class DispositionController extends Controller { | ||
| 15 | |||
| 16 | |||
| 17 | public function __construct() | ||
| 18 | { | ||
| 19 | $this->middleware('auth'); | ||
| 20 | $this->middleware('module_access'); | ||
| 21 | } | ||
| 22 | |||
| 23 | public function index() | ||
| 24 | { | ||
| 25 | $data['dispositions']= Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 26 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 27 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 28 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 29 | ->groupBy('sub_disposition.dispo_id') | ||
| 30 | ->get(); | ||
| 31 | |||
| 32 | return view("layout.module.disposition.index", $data); | ||
| 33 | } | ||
| 34 | public function create() | ||
| 35 | { | ||
| 36 | return view('layout.module.disposition.create'); | ||
| 37 | } | ||
| 38 | public function store(Request $request) | ||
| 39 | { | ||
| 40 | $action = Input::get("action"); | ||
| 41 | |||
| 42 | if($action == 'isExists'){ | ||
| 43 | $disposition = Input::get("disposition"); | ||
| 44 | $code = Input::get("code"); | ||
| 45 | $exists=Disposition::where("name","=",$disposition)->orwhere("code","=",$code)->first(); | ||
| 46 | if($exists){ | ||
| 47 | $dispositionId = Input::get("dispoId"); | ||
| 48 | if($dispositionId == $exists->id){ | ||
| 49 | return "false"; | ||
| 50 | } | ||
| 51 | return "true"; | ||
| 52 | }else{ | ||
| 53 | return "false"; | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | if($action == 'createDisposition'){ | ||
| 58 | $code = Input::get("code"); | ||
| 59 | $disposition = Input::get("disposition"); | ||
| 60 | $subDisposition = Input::get("subDisposition"); | ||
| 61 | $status = Input::get("status"); | ||
| 62 | |||
| 63 | $disposition = Disposition::create([ | ||
| 64 | 'code' => $code, | ||
| 65 | 'name' => $disposition, | ||
| 66 | 'status' => $status, | ||
| 67 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 68 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 69 | ]); | ||
| 70 | |||
| 71 | $dispoId = $disposition->id; | ||
| 72 | |||
| 73 | foreach ($subDisposition as $key => $value) { | ||
| 74 | $subDisposition = SubDisposition::create([ | ||
| 75 | 'dispo_id' => $dispoId, | ||
| 76 | 'name' => $value, | ||
| 77 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 78 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 79 | ]); | ||
| 80 | } | ||
| 81 | return; | ||
| 82 | |||
| 83 | } | ||
| 84 | |||
| 85 | if($action == 'updateDisposition'){ | ||
| 86 | $dispoId = Input::get("dispoId"); | ||
| 87 | $code = Input::get("code"); | ||
| 88 | $disposition = Input::get("disposition"); | ||
| 89 | $subDisposition = Input::get("subDisposition"); | ||
| 90 | $status = Input::get("status"); | ||
| 91 | |||
| 92 | Disposition::where('id', $dispoId) | ||
| 93 | ->update([ | ||
| 94 | 'code' => $code, | ||
| 95 | 'name' => $disposition, | ||
| 96 | 'status' => $status]); | ||
| 97 | |||
| 98 | SubDisposition::where('dispo_id', $dispoId)->delete(); | ||
| 99 | |||
| 100 | foreach ($subDisposition as $key => $value) { | ||
| 101 | $subDisposition = SubDisposition::create([ | ||
| 102 | 'dispo_id' => $dispoId, | ||
| 103 | 'name' => $value, | ||
| 104 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 105 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 106 | ]); | ||
| 107 | } | ||
| 108 | return; | ||
| 109 | |||
| 110 | } | ||
| 111 | } | ||
| 112 | public function show($id) | ||
| 113 | { | ||
| 114 | |||
| 115 | } | ||
| 116 | public function edit($id) | ||
| 117 | { | ||
| 118 | $data['disposition']= Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 119 | ->select('disposition.id AS dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 120 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 121 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 122 | ->groupBy('sub_disposition.dispo_id') | ||
| 123 | ->where('disposition.id','=',$id) | ||
| 124 | ->get()->first(); | ||
| 125 | |||
| 126 | return view('layout.module.disposition.edit',$data); | ||
| 127 | } | ||
| 128 | public function update($id) | ||
| 129 | { | ||
| 130 | |||
| 131 | } | ||
| 132 | public function destroy($id) | ||
| 133 | { | ||
| 134 | } | ||
| 135 | public function dashboard() | ||
| 136 | { | ||
| 137 | } | ||
| 138 | } |
| 1 | <?php namespace App\Http\Controllers; | ||
| 2 | |||
| 3 | use Auth; | ||
| 4 | use Input; | ||
| 5 | use Config; | ||
| 6 | use Session; | ||
| 7 | use DB; | ||
| 8 | use App\Services\FormBuilder; | ||
| 9 | use Illuminate\Http\Request; | ||
| 10 | use Response; | ||
| 11 | use App\Models\Disposition; | ||
| 12 | use App\Models\SubDisposition; | ||
| 13 | use App\Models\DispositionPlan; | ||
| 14 | use App\Models\DispositionPlanConfig; | ||
| 15 | |||
| 16 | class DispositionPlanController extends Controller { | ||
| 17 | |||
| 18 | |||
| 19 | public function __construct() | ||
| 20 | { | ||
| 21 | $this->middleware('auth'); | ||
| 22 | $this->middleware('module_access'); | ||
| 23 | } | ||
| 24 | |||
| 25 | public function index() | ||
| 26 | { | ||
| 27 | $data['dispositionPlan']= DispositionPlan::leftjoin('disposition_plan_config', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 28 | ->select('disposition_plan.id as dispositionPlanId', 'disposition_plan.name as name','disposition_plan.status AS status', | ||
| 29 | DB::raw('count(*) as totalDisposition, disposition_plan_config.id'), | ||
| 30 | DB::raw('GROUP_CONCAT(disposition_plan_config.disposition) as disposition, disposition_plan_config.disposition')) | ||
| 31 | ->groupBy('disposition_plan_config.dispo_plan_id') | ||
| 32 | //->where('status','active') | ||
| 33 | ->get(); | ||
| 34 | |||
| 35 | return view("layout.module.dispositionplan.index", $data); | ||
| 36 | } | ||
| 37 | public function create() | ||
| 38 | { | ||
| 39 | $data['dispositionEntities'] = Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 40 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 41 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 42 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 43 | ->groupBy('sub_disposition.dispo_id') | ||
| 44 | ->where('status','active') | ||
| 45 | ->get(); | ||
| 46 | |||
| 47 | return view('layout.module.dispositionplan.create', $data); | ||
| 48 | } | ||
| 49 | public function store(Request $request) | ||
| 50 | { | ||
| 51 | $action = Input::get("action"); | ||
| 52 | |||
| 53 | if($action == 'isExists'){ | ||
| 54 | $plan = Input::get("plan"); | ||
| 55 | $exists=DispositionPlan::where("name","=",$plan)->first(); | ||
| 56 | |||
| 57 | if($exists){ | ||
| 58 | $planId = Input::get("dispositionPlanId"); | ||
| 59 | if($planId == $exists->id){ | ||
| 60 | return "false"; | ||
| 61 | } | ||
| 62 | return "true"; | ||
| 63 | }else{ | ||
| 64 | return "false"; | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | if($action == 'createDispositionPlan'){ | ||
| 69 | $plan = Input::get("plan"); | ||
| 70 | $dispositionList = Input::get("disposition"); | ||
| 71 | $subDisposition = Input::get("subDisposition"); | ||
| 72 | $status = Input::get("status"); | ||
| 73 | |||
| 74 | $dispositionPlan = DispositionPlan::create([ | ||
| 75 | 'name' => $plan, | ||
| 76 | 'status' => $status, | ||
| 77 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 78 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 79 | ]); | ||
| 80 | |||
| 81 | foreach ($dispositionList as $key => $disposition) { | ||
| 82 | $dispositionPlanConfig = DispositionPlanConfig::create([ | ||
| 83 | 'dispo_plan_id' => $dispositionPlan->id, | ||
| 84 | 'disposition' => $disposition, | ||
| 85 | 'sub_disposition' => implode(",", $subDisposition[$key]), | ||
| 86 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 87 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 88 | ]); | ||
| 89 | } | ||
| 90 | return; | ||
| 91 | } | ||
| 92 | |||
| 93 | if($action == 'updateDispositionPlan'){ | ||
| 94 | $dispositionPlanId = Input::get("dispositionPlanId"); | ||
| 95 | $plan = Input::get("plan"); | ||
| 96 | $dispositionList = Input::get("disposition"); | ||
| 97 | $subDisposition = Input::get("subDisposition"); | ||
| 98 | $status = Input::get("status"); | ||
| 99 | |||
| 100 | DispositionPlan::where('id', $dispositionPlanId) | ||
| 101 | ->update(['name' => $plan, | ||
| 102 | 'status' => $status, | ||
| 103 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 104 | ]); | ||
| 105 | |||
| 106 | DispositionPlanConfig::where('dispo_plan_id', $dispositionPlanId)->delete(); | ||
| 107 | |||
| 108 | foreach ($dispositionList as $key => $disposition) { | ||
| 109 | $dispositionPlanConfig = DispositionPlanConfig::create([ | ||
| 110 | 'dispo_plan_id' => $dispositionPlanId, | ||
| 111 | 'disposition' => $disposition, | ||
| 112 | 'sub_disposition' => implode(",", $subDisposition[$key]), | ||
| 113 | 'created_at' => date("Y-m-d H:i:s"), | ||
| 114 | 'updated_at' => date("Y-m-d H:i:s") | ||
| 115 | ]); | ||
| 116 | } | ||
| 117 | return; | ||
| 118 | } | ||
| 119 | } | ||
| 120 | public function show($id) | ||
| 121 | { | ||
| 122 | |||
| 123 | } | ||
| 124 | public function edit($id) | ||
| 125 | { | ||
| 126 | $data['dispositionEntities'] = Disposition::join('sub_disposition', 'disposition.id', '=', 'sub_disposition.dispo_id') | ||
| 127 | ->select('disposition.id as dispoId', 'disposition.name as disposition','disposition.code as code','disposition.status AS status', | ||
| 128 | DB::raw('count(*) as totalSubDispo, sub_disposition.id'), | ||
| 129 | DB::raw('GROUP_CONCAT(sub_disposition.name) as sunDispoName, sub_disposition.name')) | ||
| 130 | ->groupBy('sub_disposition.dispo_id') | ||
| 131 | ->where('status','active') | ||
| 132 | ->get(); | ||
| 133 | |||
| 134 | $data['dispositionPlan']= DispositionPlan::join('disposition_plan_config', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 135 | ->select('disposition_plan.id as dispositionPlanId', 'disposition_plan.name as name','disposition_plan.status AS status','disposition_plan_config.disposition as disposition','disposition_plan_config.sub_disposition as sub_disposition') | ||
| 136 | ->where('disposition_plan.id','=',$id) | ||
| 137 | ->get(); | ||
| 138 | |||
| 139 | |||
| 140 | return view('layout.module.dispositionplan.edit',$data); | ||
| 141 | } | ||
| 142 | public function update($id) | ||
| 143 | { | ||
| 144 | |||
| 145 | } | ||
| 146 | public function destroy($id) | ||
| 147 | { | ||
| 148 | } | ||
| 149 | public function dashboard() | ||
| 150 | { | ||
| 151 | } | ||
| 152 | } |
| 1 | <?php | ||
| 2 | namespace App\Http\Controllers; | ||
| 3 | use Illuminate\Http\Request; | ||
| 4 | use App\Http\Requests; | ||
| 5 | use App\Models\Pri; | ||
| 6 | use Validator; | ||
| 7 | |||
| 8 | class PriController extends Controller | ||
| 9 | { | ||
| 10 | public function pri(Request $request) | ||
| 11 | { | ||
| 12 | // $ab =escapeshellarg(`ls -al`); | ||
| 13 | // echo "<pre>$ab</pre>"; | ||
| 14 | $output = `ls -al`; | ||
| 15 | echo "<pre>$output</pre>"; | ||
| 16 | } | ||
| 17 | |||
| 18 | } |
| 1 | <?php | ||
| 2 | namespace App\Http\Controllers; | ||
| 3 | use Illuminate\Http\Request; | ||
| 4 | use App\Http\Requests; | ||
| 5 | use Auth; | ||
| 6 | use Log; | ||
| 7 | use DB; | ||
| 8 | class SmsController extends Controller | ||
| 9 | { | ||
| 10 | public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; | ||
| 11 | //public $userarray = array("A21568","admin"); | ||
| 12 | public function sendSmsBasedOnSubDisposition($kstychCall) | ||
| 13 | { | ||
| 14 | //public $userarray = array("A21568","admin"); | ||
| 15 | //$users = $this->userarray; | ||
| 16 | //Log::info(Auth::user()->username." ^ ".$users[0]); | ||
| 17 | //Log::info(in_array(Auth::user()->username , $users)); | ||
| 18 | //if(in_array(Auth::user()->username , $users)){ | ||
| 19 | $msgText = $this->getSmsTemplate($kstychCall); | ||
| 20 | if( !empty($msgText) ) { | ||
| 21 | $msgText = $this->fillValuesInTemplate($msgText); | ||
| 22 | //Log::info($msgText); | ||
| 23 | $this->sendSmsRequest($kstychCall, $msgText); | ||
| 24 | } | ||
| 25 | //} | ||
| 26 | return; | ||
| 27 | } | ||
| 28 | public function sendSmsRequest($kstychCall, $msgText) | ||
| 29 | { | ||
| 30 | $url = $this->smsUrl; | ||
| 31 | //Log::info($kstychCall['callnumber']); | ||
| 32 | $inputArray = [ | ||
| 33 | 'userId'=>'hdfcbalrt', | ||
| 34 | "pass"=>'hdfcbalrt25', | ||
| 35 | "appid"=>"hdfcbalrt", | ||
| 36 | "subappid"=>"hdfcbalrt", | ||
| 37 | "contenttype"=>"1", | ||
| 38 | "to"=>$kstychCall['callnumber'], | ||
| 39 | "from"=>"HDFCBK", | ||
| 40 | "text"=>$msgText, | ||
| 41 | "selfid"=>"true", | ||
| 42 | "alert"=>"1", | ||
| 43 | "dlrreq"=>"true", | ||
| 44 | "intflag"=>"false" | ||
| 45 | ]; | ||
| 46 | $query = http_build_query($inputArray); | ||
| 47 | $url .= $query; | ||
| 48 | try{ | ||
| 49 | $ch = curl_init(); | ||
| 50 | curl_setopt($ch, CURLOPT_URL, $url); | ||
| 51 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | ||
| 52 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
| 53 | $response = curl_exec($ch); | ||
| 54 | $number=$kstychCall['callnumber']; | ||
| 55 | $callid=intval($kstychCall['callid'])+0; | ||
| 56 | $serverip=env(app_ip); | ||
| 57 | $rmname=Auth::user()->fullname; | ||
| 58 | $subdispo=$kstychCall["usersubstatus"]; | ||
| 59 | DB::insert(DB::raw("insert into sms_log set server_ip='$serverip',call_id='$callid',rm_name='$rmname',subdispo='$subdispo',number='$number',message='$msgText',response='$response'")); | ||
| 60 | Log::useFiles(storage_path().'/logs/SMS_Messages_'.date("Y-m-d").'.log'); | ||
| 61 | Log::info('|'.env(app_ip).'|'.date('Y-m-d H:i:s', strtotime('+5 hours 30 minutes')).'|'.Auth::user()->fullname.'|'.$kstychCall['callnumber'].'|"'.$msgText.'"|'.$response.'|'); | ||
| 62 | //Log::info($response); | ||
| 63 | curl_close($ch); | ||
| 64 | } catch(Exception $e) { | ||
| 65 | Log::info($e->getMessage()); | ||
| 66 | } | ||
| 67 | } | ||
| 68 | public function getSmsTemplate($kstychCall) | ||
| 69 | { | ||
| 70 | $msgText = ""; | ||
| 71 | include( app_path() . '/Constants/SmsTemplate.php'); | ||
| 72 | if( in_array( $kstychCall["usersubstatus"] , $smsContactedSubdispositionsArr) ) { | ||
| 73 | $msgText = $smsTemplatesArr[SMS_THANKYOU]; | ||
| 74 | } else if( in_array( $kstychCall["usersubstatus"] , $smsNotContactedSubdispositionsArr) ) { | ||
| 75 | $msgText = $smsTemplatesArr[SMS_NOTCONTACTED]; | ||
| 76 | } | ||
| 77 | return $msgText; | ||
| 78 | } | ||
| 79 | public function fillValuesInTemplate($msgText) | ||
| 80 | { | ||
| 81 | if( !empty($msgText) ) | ||
| 82 | { | ||
| 83 | $msgText = str_replace("#name#", Auth::user()->fullname, $msgText); | ||
| 84 | //$msgText = str_replace("#number#", explode(":", Auth::user()->exten)[0], $msgText); | ||
| 85 | $exten = ''; | ||
| 86 | $extension = Auth::user()->exten; | ||
| 87 | if(!empty($extension)) | ||
| 88 | { | ||
| 89 | $extenArr = explode(":", $extension); | ||
| 90 | $exten = $extenArr[0]; | ||
| 91 | } | ||
| 92 | //Log::info($exten); | ||
| 93 | |||
| 94 | $msgText = str_replace("#number#", $exten, $msgText); | ||
| 95 | $msgText = str_replace("#date#", date('d-m-Y'), $msgText); | ||
| 96 | } | ||
| 97 | return $msgText; | ||
| 98 | } | ||
| 99 | } |
| ... | @@ -252,7 +252,7 @@ class UserController extends Controller { | ... | @@ -252,7 +252,7 @@ class UserController extends Controller { |
| 252 | if(isset($userdata["usergroup"]))$user->group=$userdata["usergroup"]; | 252 | if(isset($userdata["usergroup"]))$user->group=$userdata["usergroup"]; |
| 253 | 253 | ||
| 254 | $user->presence=0; | 254 | $user->presence=0; |
| 255 | 255 | if(isset($userdata["clientsownerlist"]))$user->clients=$userdata["clientsownerlist"]; | |
| 256 | if(isset($userdata["lteam"]))$user->lteam=$userdata["lteam"]; | 256 | if(isset($userdata["lteam"]))$user->lteam=$userdata["lteam"]; |
| 257 | if(isset($userdata["lteam2"]))$user->lteam2=$userdata["lteam2"]; | 257 | if(isset($userdata["lteam2"]))$user->lteam2=$userdata["lteam2"]; |
| 258 | if(isset($userdata["supervisor"]))$user->supervisor=$userdata["supervisor"]; | 258 | if(isset($userdata["supervisor"]))$user->supervisor=$userdata["supervisor"]; |
| ... | @@ -290,7 +290,7 @@ class UserController extends Controller { | ... | @@ -290,7 +290,7 @@ class UserController extends Controller { |
| 290 | if(isset($userdata["recclientsownerlist"]))$bbb['recclientsownerlist']=$userdata["recclientsownerlist"]; | 290 | if(isset($userdata["recclientsownerlist"]))$bbb['recclientsownerlist']=$userdata["recclientsownerlist"]; |
| 291 | if(isset($userdata["bdmclientsownerlist"]))$bbb['bdmclientsownerlist']=$userdata["bdmclientsownerlist"]; | 291 | if(isset($userdata["bdmclientsownerlist"]))$bbb['bdmclientsownerlist']=$userdata["bdmclientsownerlist"]; |
| 292 | $data['hrmsdata']=serialize($bbb); | 292 | $data['hrmsdata']=serialize($bbb); |
| 293 | 293 | //$user->clients=$userdata["clientsownerlist"]; | |
| 294 | $user->data=json_encode($data); | 294 | $user->data=json_encode($data); |
| 295 | 295 | ||
| 296 | $meta=$user->meta(); | 296 | $meta=$user->meta(); | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -41,6 +41,8 @@ Route::group(['middleware' => ['web']], function () { | ... | @@ -41,6 +41,8 @@ Route::group(['middleware' => ['web']], function () { |
| 41 | Route::resource('user','UserController'); | 41 | Route::resource('user','UserController'); |
| 42 | Route::resource('group','GroupController'); | 42 | Route::resource('group','GroupController'); |
| 43 | Route::resource('role','RoleController'); | 43 | Route::resource('role','RoleController'); |
| 44 | Route::resource('dispositionPlan','DispositionPlanController'); | ||
| 45 | Route::resource('disposition','DispositionController'); | ||
| 44 | 46 | ||
| 45 | Route::resource('master','MasterController'); | 47 | Route::resource('master','MasterController'); |
| 46 | Route::resource('admin','AdminController'); | 48 | Route::resource('admin','AdminController'); | ... | ... |
This diff could not be displayed because it is too large.
| ... | @@ -575,6 +575,13 @@ $data.="</div><div style='width:49%;float:left'> | ... | @@ -575,6 +575,13 @@ $data.="</div><div style='width:49%;float:left'> |
| 575 | <label class=label-small_new style='width:25%;' title=''>Callback: </label> | 575 | <label class=label-small_new style='width:25%;' title=''>Callback: </label> |
| 576 | <input class='form_new form_new_amend datetimepicker_dthr' id='dialer_usercallback' name='dialer_usercallback'> | 576 | <input class='form_new form_new_amend datetimepicker_dthr' id='dialer_usercallback' name='dialer_usercallback'> |
| 577 | </p>"; | 577 | </p>"; |
| 578 | //if(Auth::user()->id==266){ | ||
| 579 | $data.="<p style='clear:both'> | ||
| 580 | <label class=label-small_new style='width:25%;' title=''>Appointmet Date: </label> | ||
| 581 | <input class='form_new form_new_amend datetimepicker_dthr' id='dialer_appointment' name='dialer_appointment'> | ||
| 582 | </p>"; | ||
| 583 | //} | ||
| 584 | |||
| 578 | /*$data.="<p style='clear:both'> | 585 | /*$data.="<p style='clear:both'> |
| 579 | <label class=label-small_new style='width:25%;' title=''>Call Remarks: </label> | 586 | <label class=label-small_new style='width:25%;' title=''>Call Remarks: </label> |
| 580 | <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:70%' maxlength=250></textarea> | 587 | <textarea id='dialer_userremarks' name='dialer_userremarks' style='width:70%' maxlength=250></textarea> |
| ... | @@ -818,20 +825,69 @@ $data.="</fieldset></div> | ... | @@ -818,20 +825,69 @@ $data.="</fieldset></div> |
| 818 | var dialerdispoarray={};var dispoClassArray={}; | 825 | var dialerdispoarray={};var dispoClassArray={}; |
| 819 | dialerdispoarray['']='';\n"; | 826 | dialerdispoarray['']='';\n"; |
| 820 | 827 | ||
| 821 | $mastersdata=$gthis->getDispocampaignData($dataarr[client]); | 828 | // to get client corconfig |
| 822 | //$dispoarr=explode("~",$mastersdata['mvalue']); | 829 | /*$mastersdata= $gthis->getDispocampaignData($dataarr['client']); |
| 830 | $dispoarr = []; | ||
| 823 | 831 | ||
| 824 | if(empty($mastersdata)) | 832 | if(empty($mastersdata)) |
| 825 | { | 833 | { |
| 834 | // if client company is empty get data from campaign company | ||
| 826 | $mastersdata=$gthis->getCompanyMaster($client); | 835 | $mastersdata=$gthis->getCompanyMaster($client); |
| 827 | if(empty($mastersdata['dialerDispoList']))$mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; | ||
| 828 | 836 | ||
| 837 | /* commented above code : now get data from dispostion table | ||
| 838 | if(empty($mastersdata['dialerDispoList'])){ | ||
| 839 | $mastersdata['dialerDispoList']=$gthis->HRCoreVars['dialerDispoList']; | ||
| 840 | }* | ||
| 841 | if(!empty($mastersdata['dialerDispoList'])){ | ||
| 829 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | 842 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); |
| 843 | } | ||
| 830 | }else{ | 844 | }else{ |
| 831 | $dispoarr=explode("~",$mastersdata['mvalue']); | 845 | $dispoarr=explode("~",$mastersdata['mvalue']); |
| 832 | } | 846 | } |
| 833 | 847 | ||
| 848 | if(count($dispoarr) > 0){ | ||
| 849 | foreach($dispoarr as $dispo) | ||
| 850 | { | ||
| 851 | if(!empty($dispo)) | ||
| 852 | { | ||
| 853 | $dispoprts=explode("|",$dispo); | ||
| 854 | if(sizeof($dispoprts)>=3) | ||
| 855 | { | ||
| 856 | $data.="dialerdispoarray['$dispoprts[1]']='$dispoprts[2]';dispoClassArray['$dispoprts[0]']='$dispoprts[1]';"; | ||
| 857 | } | ||
| 858 | } | ||
| 859 | } | ||
| 860 | }else{ | ||
| 861 | // get disposition from disposition table | ||
| 862 | $dispositionPlan = $gthis->getDispositionList(); | ||
| 863 | foreach ($dispositionPlan as $key => $value) { | ||
| 864 | $disposition = $value->disposition; | ||
| 865 | $subDisposition = $value->sunDispoName; | ||
| 866 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 867 | } | ||
| 868 | }*/ | ||
| 869 | |||
| 870 | $mastersdata = DB::table('campaign_disposition_plan') | ||
| 871 | ->join('disposition_plan_config', 'campaign_disposition_plan.dispo_plan_id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 872 | ->join('disposition_plan', 'disposition_plan.id', '=', 'disposition_plan_config.dispo_plan_id') | ||
| 873 | ->select('disposition_plan_config.disposition as disposition ', 'disposition_plan_config.sub_disposition as subDisposition') | ||
| 874 | ->where("disposition_plan.status","active") | ||
| 875 | ->where("campaign","=",$dataarr['client']) | ||
| 876 | ->get(); | ||
| 834 | 877 | ||
| 878 | if(count($mastersdata) > 0){ | ||
| 879 | |||
| 880 | foreach ($mastersdata as $key => $value) { | ||
| 881 | $disposition = $value->disposition; | ||
| 882 | $subDisposition = $value->subDisposition; | ||
| 883 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 884 | } | ||
| 885 | |||
| 886 | }else{ | ||
| 887 | // if client company is empty get data from campaign company | ||
| 888 | $mastersdata=$gthis->getCompanyMaster($client); | ||
| 889 | if(!empty($mastersdata['dialerDispoList'])){ | ||
| 890 | $dispoarr=explode("~",$mastersdata['dialerDispoList']); | ||
| 835 | foreach($dispoarr as $dispo) | 891 | foreach($dispoarr as $dispo) |
| 836 | { | 892 | { |
| 837 | if(!empty($dispo)) | 893 | if(!empty($dispo)) |
| ... | @@ -843,6 +899,16 @@ $data.="</fieldset></div> | ... | @@ -843,6 +899,16 @@ $data.="</fieldset></div> |
| 843 | } | 899 | } |
| 844 | } | 900 | } |
| 845 | } | 901 | } |
| 902 | }else{ | ||
| 903 | // get disposition from disposition table | ||
| 904 | $dispositionPlan = $gthis->getDispositionList(); | ||
| 905 | foreach ($dispositionPlan as $key => $value) { | ||
| 906 | $disposition = $value->disposition; | ||
| 907 | $subDisposition = $value->sunDispoName; | ||
| 908 | $data.="dialerdispoarray['$disposition']='$subDisposition';"; | ||
| 909 | } | ||
| 910 | } | ||
| 911 | } | ||
| 846 | 912 | ||
| 847 | $data.=" | 913 | $data.=" |
| 848 | 914 | ||
| ... | @@ -4033,8 +4099,8 @@ function validatePostData() | ... | @@ -4033,8 +4099,8 @@ function validatePostData() |
| 4033 | } | 4099 | } |
| 4034 | 4100 | ||
| 4035 | //client cannot be changed unless Admin | 4101 | //client cannot be changed unless Admin |
| 4036 | if(!$wakka->IsAdmin())if(trim($ppldata["client"])!=""&&$ppldata["client"]!=Input::get("client"))$message=" Client Cannot be changed, use Renew-Record"; | 4102 | //if(!$wakka->IsAdmin())if(trim($ppldata["client"])!=""&&$ppldata["client"]!=Input::get("client"))$message=" Client Cannot be changed, use Renew-Record"; |
| 4037 | 4103 | if(!$wakka->IsAdmin())if(trim($ppldata["client"])=="")$message=" Client Cannot be changed, use Renew-Record"; | |
| 4038 | if(Input::get('currentstatus')==$wakka->HRCoreVars['hrTriggerHoldStatus']) | 4104 | if(Input::get('currentstatus')==$wakka->HRCoreVars['hrTriggerHoldStatus']) |
| 4039 | { | 4105 | { |
| 4040 | $message="";//bypass checks for candidates | 4106 | $message="";//bypass checks for candidates |
| ... | @@ -4187,7 +4253,7 @@ function validatePostData() | ... | @@ -4187,7 +4253,7 @@ function validatePostData() |
| 4187 | $recruitdata["dirty"][$taskline['completecheck']]=1; | 4253 | $recruitdata["dirty"][$taskline['completecheck']]=1; |
| 4188 | } | 4254 | } |
| 4189 | $this->recruitdata=$recruitdata; | 4255 | $this->recruitdata=$recruitdata; |
| 4190 | $res=$wakka->setPerson($varid,$this->recruitdata); | 4256 | $res=$wakka->setPerson($varid,$this->recruitdata,''); |
| 4191 | 4257 | ||
| 4192 | } | 4258 | } |
| 4193 | } | 4259 | } | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
application/app/Jobs/KPAMIListen2.php
0 → 100644
This diff is collapsed.
Click to expand it.
application/app/Models/Cutoff.php
0 → 100644
application/app/Models/Disposition.php
0 → 100644
application/app/Models/DispositionPlan.php
0 → 100644
| ... | @@ -45,6 +45,59 @@ class Kqueue extends Model{ | ... | @@ -45,6 +45,59 @@ class Kqueue extends Model{ |
| 45 | $this->data=json_encode($odata); | 45 | $this->data=json_encode($odata); |
| 46 | $this->save(); | 46 | $this->save(); |
| 47 | } | 47 | } |
| 48 | public function autoCallOut($callnumber,$callerid,$crmcall,$dialline) | ||
| 49 | { | ||
| 50 | $dialstr = $dialline->dialstr; | ||
| 51 | $server = $dialline->server; | ||
| 52 | |||
| 53 | if($server != '') | ||
| 54 | { | ||
| 55 | $odata=array();$odata['VARS']=array(); | ||
| 56 | $odata['fromext']="Local/$callnumber@kstychDialerINB"; | ||
| 57 | $odata['context']="kstychDialer"; | ||
| 58 | $odata['callerid']=$callerid; | ||
| 59 | $odata['toext']="1002".$callnumber; | ||
| 60 | $odata['account']='m|a|'.$crmcall->id; | ||
| 61 | $odata['VARS']['dialstr']=$dialstr; | ||
| 62 | |||
| 63 | //originate conf | ||
| 64 | $this->type="SIP_".$server; | ||
| 65 | $this->key="originate"; | ||
| 66 | $this->status="New"; | ||
| 67 | $this->data=json_encode($odata); | ||
| 68 | $this->save(); | ||
| 69 | } | ||
| 70 | |||
| 71 | } | ||
| 72 | public function transferCall($sipid,$callnumber,$callerid,$crmcall,$dialline) | ||
| 73 | { | ||
| 74 | $dialstr = $dialline->dialstr; | ||
| 75 | $server = $dialline->server; | ||
| 76 | $channel = $dialline->channel; | ||
| 77 | if($server != '') | ||
| 78 | { | ||
| 79 | $odata=array();$odata['VARS']=array(); | ||
| 80 | /*$odata['fromext']="Local/1000".$sipid->id."@kstychDialer"; | ||
| 81 | $odata['context']="initiateTransfer"; | ||
| 82 | $odata['callerid']=$channel; | ||
| 83 | $odata['toext']="1003".$callnumber; | ||
| 84 | $odata['account']='m|t|'.$crmcall->id; | ||
| 85 | $odata['VARS']['dialstr']=$dialstr; | ||
| 86 | $odata['VARS']['chnl']=$channel; | ||
| 87 | $odata['VARS']['callnumber']=$callnumber;*/ | ||
| 88 | $odata['channel']=$channel; | ||
| 89 | $odata['exten']="1003".$callnumber; | ||
| 90 | $odata['context']="initiateTransfer"; | ||
| 91 | $odata['priority']=1; | ||
| 92 | //originate conf | ||
| 93 | $this->type="SIP_".$server; | ||
| 94 | $this->key="transfer"; | ||
| 95 | $this->status="New"; | ||
| 96 | $this->data=json_encode($odata); | ||
| 97 | $this->save(); | ||
| 98 | } | ||
| 99 | |||
| 100 | } | ||
| 48 | public function sipOriginate($sipid,$to,$context) | 101 | public function sipOriginate($sipid,$to,$context) |
| 49 | { | 102 | { |
| 50 | $odata=array();$odata['VARS']=array(); | 103 | $odata=array();$odata['VARS']=array(); | ... | ... |
application/app/Models/SubDisposition.php
0 → 100644
| ... | @@ -15,6 +15,8 @@ return [ | ... | @@ -15,6 +15,8 @@ return [ |
| 15 | 15 | ||
| 16 | 'log' => 'daily', | 16 | 'log' => 'daily', |
| 17 | 17 | ||
| 18 | 'log_max_files' => 30, | ||
| 19 | |||
| 18 | 20 | ||
| 19 | 'providers' => [ | 21 | 'providers' => [ |
| 20 | 22 | ||
| ... | @@ -113,6 +115,8 @@ return [ | ... | @@ -113,6 +115,8 @@ return [ |
| 113 | "submenu"=>["Campaign Management"=>["menuAction('campaign');"], | 115 | "submenu"=>["Campaign Management"=>["menuAction('campaign');"], |
| 114 | "Bulk Upload"=>["menuAction('campaign/bulkupload');"], | 116 | "Bulk Upload"=>["menuAction('campaign/bulkupload');"], |
| 115 | ]], | 117 | ]], |
| 118 | "dispositionPlan" => ["disp"=>"Disposition Plan","icon"=>"globe","dash"=>"","onclick"=>"menuAction('dispositionPlan');"], | ||
| 119 | "disposition" => ["disp"=>"Disposition List","icon"=>"globe","dash"=>"","onclick"=>"menuAction('disposition');"], | ||
| 116 | "Admin" => ["disp"=>"Admin","icon"=>"gear","dash"=>"", | 120 | "Admin" => ["disp"=>"Admin","icon"=>"gear","dash"=>"", |
| 117 | "submenu"=>["Masters"=>["showBlock('Masters');"], | 121 | "submenu"=>["Masters"=>["showBlock('Masters');"], |
| 118 | "Delete Record"=>["showBlock('DeletePerson');"], | 122 | "Delete Record"=>["showBlock('DeletePerson');"], |
| ... | @@ -150,7 +154,7 @@ return [ | ... | @@ -150,7 +154,7 @@ return [ |
| 150 | 'sipssldomain' => env('app_sipssldomain',env('app_domain','localhost')), | 154 | 'sipssldomain' => env('app_sipssldomain',env('app_domain','localhost')), |
| 151 | 'webdomain' => env('web_domain',env('app_domain','localhost')), | 155 | 'webdomain' => env('web_domain',env('app_domain','localhost')), |
| 152 | 'email' => env("app_emailid","[email protected]"), | 156 | 'email' => env("app_emailid","[email protected]"), |
| 153 | 'app_version' => "4.2.12", | 157 | 'app_version' => "4.2.14", |
| 154 | 'mytheme' => 'layout', | 158 | 'mytheme' => 'layout', |
| 155 | 'app_admin' => env('app_admin', 'admin'), | 159 | 'app_admin' => env('app_admin', 'admin'), |
| 156 | 'app_support_ids' => [1], | 160 | 'app_support_ids' => [1], | ... | ... |
| ... | @@ -323,7 +323,7 @@ function dailyTasks | ... | @@ -323,7 +323,7 @@ function dailyTasks |
| 323 | if [ $nowtime -eq "000" ] | 323 | if [ $nowtime -eq "000" ] |
| 324 | then | 324 | then |
| 325 | 325 | ||
| 326 | rm -f $app_path/application/storage/logs/laravel-*.log | 326 | ##rm -f $app_path/application/storage/logs/laravel-*.log |
| 327 | touch $app_path/application/storage/logs/laravel-$(date +%Y-%m-%d).log | 327 | touch $app_path/application/storage/logs/laravel-$(date +%Y-%m-%d).log |
| 328 | chmod -R 777 $app_path/application/storage | 328 | chmod -R 777 $app_path/application/storage |
| 329 | chmod -R 777 $app_path/custom/app | 329 | chmod -R 777 $app_path/custom/app |
| ... | @@ -352,6 +352,32 @@ function astPAMICheck | ... | @@ -352,6 +352,32 @@ function astPAMICheck |
| 352 | fi | 352 | fi |
| 353 | done | 353 | done |
| 354 | } | 354 | } |
| 355 | function createCall | ||
| 356 | { | ||
| 357 | echo "create" | ||
| 358 | AsteriskServers=$(echo $asterisk_slaves | tr "," "\n") | ||
| 359 | for server in $AsteriskServers | ||
| 360 | do | ||
| 361 | IFS=':' read -r -a ServerArr <<< "$server" | ||
| 362 | |||
| 363 | if ! screen -list | grep -q "CreateCall_$app_domain${ServerArr[0]}"; then | ||
| 364 | /usr/bin/screen -d -m -S CreateCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan CreateCall" | ||
| 365 | fi | ||
| 366 | done | ||
| 367 | } | ||
| 368 | function hangUpCall | ||
| 369 | { | ||
| 370 | echo "hang" | ||
| 371 | AsteriskServers=$(echo $asterisk_slaves | tr "," "\n") | ||
| 372 | for server in $AsteriskServers | ||
| 373 | do | ||
| 374 | IFS=':' read -r -a ServerArr <<< "$server" | ||
| 375 | |||
| 376 | if ! screen -list | grep -q "HangUpCall_$app_domain${ServerArr[0]}"; then | ||
| 377 | /usr/bin/screen -d -m -S HangUpCall_$app_domain${ServerArr[0]} bash -c "cd $app_path/application/;php $app_path/application/artisan PredictiveCallHangUp" | ||
| 378 | fi | ||
| 379 | done | ||
| 380 | } | ||
| 355 | function waitForLock | 381 | function waitForLock |
| 356 | { | 382 | { |
| 357 | if [ ! -f /tmp/cronsh-$app_domain.lock ]; then | 383 | if [ ! -f /tmp/cronsh-$app_domain.lock ]; then |
| ... | @@ -412,6 +438,8 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then | ... | @@ -412,6 +438,8 @@ if [ "$OSNAME" == "Fedora" ] && [ $OSVER -gt 21 ] ; then |
| 412 | sshdCheck | 438 | sshdCheck |
| 413 | dailyTasks | 439 | dailyTasks |
| 414 | astPAMICheck | 440 | astPAMICheck |
| 441 | createCall | ||
| 442 | hangUpCall | ||
| 415 | fi | 443 | fi |
| 416 | clearLock | 444 | clearLock |
| 417 | cd $app_path/application;php artisan schedule:run | 445 | cd $app_path/application;php artisan schedule:run | ... | ... |
application/hangup_beep.gsm
deleted
100644 → 0
No preview for this file type
application/hangup_beep.mp3
deleted
100644 → 0
No preview for this file type
application/hangup_beep.wav
deleted
100644 → 0
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
| ... | @@ -12,7 +12,7 @@ astlogdir => /var/log/asterisk | ... | @@ -12,7 +12,7 @@ astlogdir => /var/log/asterisk |
| 12 | astsbindir => /usr/sbin | 12 | astsbindir => /usr/sbin |
| 13 | 13 | ||
| 14 | [options] | 14 | [options] |
| 15 | ;verbose = 3 | 15 | verbose = 9 |
| 16 | ;debug = 3 | 16 | ;debug = 3 |
| 17 | ;alwaysfork = yes ; Same as -F at startup. | 17 | ;alwaysfork = yes ; Same as -F at startup. |
| 18 | ;nofork = yes ; Same as -f at startup. | 18 | ;nofork = yes ; Same as -f at startup. | ... | ... |
application/public/assets/extras/data/asterisk/extensions.conf
100644 → 100755
| ... | @@ -35,7 +35,7 @@ exten => _1001XXX!,1,Dial(SIP/${EXTEN:4}) | ... | @@ -35,7 +35,7 @@ exten => _1001XXX!,1,Dial(SIP/${EXTEN:4}) |
| 35 | exten => _1001XXX!,n,Hangup | 35 | exten => _1001XXX!,n,Hangup |
| 36 | 36 | ||
| 37 | exten => _1002XXX!,1,MixMonitor(/var/spool/asterisk/astrec/${STRFTIME(${EPOCH},,%Y/%m/%d)}/out/outbound_${STRFTIME(${EPOCH},Asia/Kolkata,%Y%m%d-%H%M%S)}_${CALLERID(num)}_${EXTEN:4}_${UNIQUEID}.gsm,av(0)V(0)) | 37 | exten => _1002XXX!,1,MixMonitor(/var/spool/asterisk/astrec/${STRFTIME(${EPOCH},,%Y/%m/%d)}/out/outbound_${STRFTIME(${EPOCH},Asia/Kolkata,%Y%m%d-%H%M%S)}_${CALLERID(num)}_${EXTEN:4}_${UNIQUEID}.gsm,av(0)V(0)) |
| 38 | exten => _1002XXX!,2,Dial(${dialstr}${EXTEN:4},55,tTo) | 38 | exten => _1002XXX!,2,Dial(${dialstr}0${EXTEN:4},55,tTo) |
| 39 | exten => _1002XXX!,n,Hangup | 39 | exten => _1002XXX!,n,Hangup |
| 40 | 40 | ||
| 41 | [kstychDialerINB] | 41 | [kstychDialerINB] |
| ... | @@ -45,19 +45,20 @@ exten => _X!,n,MixMonitor(/var/spool/asterisk/astrec/${STRFTIME(${EPOCH},,%Y/%m/ | ... | @@ -45,19 +45,20 @@ exten => _X!,n,MixMonitor(/var/spool/asterisk/astrec/${STRFTIME(${EPOCH},,%Y/%m/ |
| 45 | exten => _X!,n,ConfBridge(${CHANNEL}) | 45 | exten => _X!,n,ConfBridge(${CHANNEL}) |
| 46 | exten => _X!,n,Hangup | 46 | exten => _X!,n,Hangup |
| 47 | 47 | ||
| 48 | [initiateTransfer] | ||
| 49 | exten => _1003XXXXXXXXXX!,1,Dial(SIP/GATEWAY/${EXTEN:4},30,tT) | ||
| 50 | exten => _1003XXXXXXXXXX!,n,Hangup | ||
| 51 | |||
| 52 | [confTransfer] | ||
| 53 | exten => _1004XXX!,1,ConfBridge(${CHANNEL}) | ||
| 54 | exten => _1004XXX!,n,Hangup | ||
| 55 | |||
| 48 | [kstychPlayFile] | 56 | [kstychPlayFile] |
| 49 | exten => 1001,1,Answer | 57 | exten => 1001,1,Answer |
| 50 | exten => 1001,n,Playback(silence/1) | 58 | exten => 1001,n,Playback(silence/1) |
| 51 | exten => 1001,n,Playback(/var/lib/asterisk/sounds/RM_not_available_unreachabl) | 59 | exten => 1001,n,Playback(/var/lib/asterisk/sounds/RM_not_available_unreachabl) |
| 52 | exten => 1001,n,Hangup | 60 | exten => 1001,n,Hangup |
| 53 | 61 | ||
| 54 | [kstychPlayHangFile] | ||
| 55 | exten => 3001,1,Answer | ||
| 56 | exten => 3001,n,Playback(silence/1) | ||
| 57 | exten => 3001,n,Playback(/var/lib/asterisk/sounds/hangup_beep) | ||
| 58 | exten => 3001,n,Hangup | ||
| 59 | |||
| 60 | |||
| 61 | ;[kstychAbsFile] | 62 | ;[kstychAbsFile] |
| 62 | ;exten => 2001,1,Answer | 63 | ;exten => 2001,1,Answer |
| 63 | ;exten => 2001,n,Playback(silence/1) | 64 | ;exten => 2001,n,Playback(silence/1) | ... | ... |
| ... | @@ -6,7 +6,7 @@ tcpenable=no ; Enable server for incoming TCP connections (de | ... | @@ -6,7 +6,7 @@ tcpenable=no ; Enable server for incoming TCP connections (de |
| 6 | tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) | 6 | tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) |
| 7 | transport=udp,ws,wss ; Set the default transports. The order determines the primary default transport. | 7 | transport=udp,ws,wss ; Set the default transports. The order determines the primary default transport. |
| 8 | srvlookup=yes ; Enable DNS SRV lookups on outbound calls | 8 | srvlookup=yes ; Enable DNS SRV lookups on outbound calls |
| 9 | realm=192.168.3.131 | 9 | realm=REPLACESERVERIP |
| 10 | 10 | ||
| 11 | allow = !all,ulaw,alaw,gsm,g723,g726,g729,h264,h263,ilbc,g726aal2,mpeg4,vp8 | 11 | allow = !all,ulaw,alaw,gsm,g723,g726,g729,h264,h263,ilbc,g726aal2,mpeg4,vp8 |
| 12 | 12 | ||
| ... | @@ -16,7 +16,7 @@ rtpkeepalive=60 ; Send keepalives in the RTP stream to keep NAT open | ... | @@ -16,7 +16,7 @@ rtpkeepalive=60 ; Send keepalives in the RTP stream to keep NAT open |
| 16 | notifyringing = yes ; Notify subscriptions on RINGING state (default: no) | 16 | notifyringing = yes ; Notify subscriptions on RINGING state (default: no) |
| 17 | notifyhold = yes ; Notify subscriptions on HOLD state (default: no) | 17 | notifyhold = yes ; Notify subscriptions on HOLD state (default: no) |
| 18 | limitonpeers = yes ; Apply call limits on peers only. This will improve | 18 | limitonpeers = yes ; Apply call limits on peers only. This will improve |
| 19 | externip=192.168.3.131 | 19 | externip=REPLACESERVERIP |
| 20 | localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks | 20 | localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks |
| 21 | localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 | 21 | localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 |
| 22 | localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation | 22 | localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation |
| ... | @@ -25,11 +25,22 @@ nat=force_rport,comedia ; Global NAT settings (Affects all | ... | @@ -25,11 +25,22 @@ nat=force_rport,comedia ; Global NAT settings (Affects all |
| 25 | qualify=yes ; By default, qualify all peers at 2000ms | 25 | qualify=yes ; By default, qualify all peers at 2000ms |
| 26 | limitonpeer = yes ; enable call limit on a per peer basis, different from limitonpeers | 26 | limitonpeer = yes ; enable call limit on a per peer basis, different from limitonpeers |
| 27 | icesupport = yes | 27 | icesupport = yes |
| 28 | stunaddr = 192.168.3.131:3478 | 28 | stunaddr = REPLACESERVERIP:3478 |
| 29 | alwaysauthreject = yes | 29 | alwaysauthreject = yes |
| 30 | 30 | ||
| 31 | rtcp_mux=yes | 31 | rtcp_mux=yes |
| 32 | turnaddr=192.168.3.131 | 32 | turnaddr=REPLACESERVERIP |
| 33 | turnusername=test | 33 | turnusername=test |
| 34 | turnpassword=1234 | 34 | turnpassword=1234 |
| 35 | 35 | ||
| 36 | [GATEWAY] | ||
| 37 | type=peer | ||
| 38 | host=10.3.180.33 | ||
| 39 | dtmfmode=inband ; the possibilities are inband , rfc2833, or info | ||
| 40 | disallow=all | ||
| 41 | allow=ulaw; because we have chosen inband for dtmf we need alaw or ulaw (G.711) | ||
| 42 | allow=alaw | ||
| 43 | context=SIPDialerINB | ||
| 44 | |||
| 45 | |||
| 46 | ... | ... |
| ... | @@ -61,7 +61,7 @@ kstychCall['supcomntid']=''; | ... | @@ -61,7 +61,7 @@ kstychCall['supcomntid']=''; |
| 61 | kstychCall['userdata']={}; | 61 | kstychCall['userdata']={}; |
| 62 | kstychCall['previewcrmid']=''; | 62 | kstychCall['previewcrmid']=''; |
| 63 | kstychCall['callWrapupTime']=180; | 63 | kstychCall['callWrapupTime']=180; |
| 64 | kstychCall['prograssiveDelay']=10; | 64 | kstychCall['prograssiveDelay']=20; |
| 65 | kstychCall['ts_now']=0; | 65 | kstychCall['ts_now']=0; |
| 66 | 66 | ||
| 67 | kstychCall['bttc_day']=''; | 67 | kstychCall['bttc_day']=''; |
| ... | @@ -560,6 +560,7 @@ function saveCloseDialerCall(flag) | ... | @@ -560,6 +560,7 @@ function saveCloseDialerCall(flag) |
| 560 | kstychCall['userstatus']=$('#dialer_userstatus').val(); | 560 | kstychCall['userstatus']=$('#dialer_userstatus').val(); |
| 561 | kstychCall['usersubstatus']=$('#dialer_usersubstatus').val(); | 561 | kstychCall['usersubstatus']=$('#dialer_usersubstatus').val(); |
| 562 | kstychCall['usercallback']=$('#dialer_usercallback').val(); | 562 | kstychCall['usercallback']=$('#dialer_usercallback').val(); |
| 563 | kstychCall['userappointment']=$('#dialer_appointment').val(); | ||
| 563 | kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert | 564 | kstychCall["attempt"]=$('#attempt').val();//attempt dropdown value insert |
| 564 | 565 | ||
| 565 | //kstychCall['userremarks']=$('#dialer_userremarks').val(); | 566 | //kstychCall['userremarks']=$('#dialer_userremarks').val(); |
| ... | @@ -595,8 +596,12 @@ console.log(fullRem); | ... | @@ -595,8 +596,12 @@ console.log(fullRem); |
| 595 | { | 596 | { |
| 596 | kstychCall['userstatus']="AUTOWRAPUP"; | 597 | kstychCall['userstatus']="AUTOWRAPUP"; |
| 597 | kstychCall['usersubstatus']="AUTOWRAPUP"; | 598 | kstychCall['usersubstatus']="AUTOWRAPUP"; |
| 599 | |||
| 600 | |||
| 598 | $('#dialer_usercallback').val(""); | 601 | $('#dialer_usercallback').val(""); |
| 599 | kstychCall['usercallback']=""; | 602 | kstychCall['usercallback']=""; |
| 603 | $('#dialer_appointment').val(""); | ||
| 604 | kstychCall['userappointment']=""; | ||
| 600 | kstychCall['userremarks']=""; | 605 | kstychCall['userremarks']=""; |
| 601 | kstychCall['userflag']=""; | 606 | kstychCall['userflag']=""; |
| 602 | } | 607 | } |
| ... | @@ -606,6 +611,8 @@ console.log(fullRem); | ... | @@ -606,6 +611,8 @@ console.log(fullRem); |
| 606 | kstychCall['usersubstatus']="REDIAL"; | 611 | kstychCall['usersubstatus']="REDIAL"; |
| 607 | $('#dialer_usercallback').val(""); | 612 | $('#dialer_usercallback').val(""); |
| 608 | kstychCall['usercallback']=""; | 613 | kstychCall['usercallback']=""; |
| 614 | $('#dialer_appointment').val(""); | ||
| 615 | kstychCall['userappointment']=""; | ||
| 609 | kstychCall['userremarks']=""; | 616 | kstychCall['userremarks']=""; |
| 610 | kstychCall['userflag']=""; | 617 | kstychCall['userflag']=""; |
| 611 | 618 | ||
| ... | @@ -616,11 +623,13 @@ console.log(fullRem); | ... | @@ -616,11 +623,13 @@ console.log(fullRem); |
| 616 | kstychCall['userstatus']="NORECORD"; | 623 | kstychCall['userstatus']="NORECORD"; |
| 617 | kstychCall['usersubstatus']="NORECORD"; | 624 | kstychCall['usersubstatus']="NORECORD"; |
| 618 | kstychCall['usercallback']=""; | 625 | kstychCall['usercallback']=""; |
| 626 | kstychCall['userappointment']=""; | ||
| 619 | kstychCall['userremarks']=""; | 627 | kstychCall['userremarks']=""; |
| 620 | kstychCall['userflag']=""; | 628 | kstychCall['userflag']=""; |
| 621 | kstychCall["attempt"]=""; | 629 | kstychCall["attempt"]=""; |
| 622 | 630 | ||
| 623 | $('#dialer_usercallback').val(""); | 631 | $('#dialer_usercallback').val(""); |
| 632 | $('#dialer_appointment').val(""); | ||
| 624 | } | 633 | } |
| 625 | else | 634 | else |
| 626 | { | 635 | { |
| ... | @@ -678,6 +687,40 @@ console.log(fullRem); | ... | @@ -678,6 +687,40 @@ console.log(fullRem); |
| 678 | return; | 687 | return; |
| 679 | } | 688 | } |
| 680 | 689 | ||
| 690 | if(kstychCall['usersubstatus'].toLowerCase().indexOf("appointment")>-1||kstychCall['userstatus'].toLowerCase().indexOf("appointment")>-1) | ||
| 691 | { | ||
| 692 | if($('#dialer_appointment').val()=="") | ||
| 693 | { | ||
| 694 | //console.log("followup"); | ||
| 695 | simpleNotification('error','topRight',"Please select Appointment Date within one month in future"); | ||
| 696 | return; | ||
| 697 | } | ||
| 698 | } | ||
| 699 | else | ||
| 700 | { | ||
| 701 | if($('#dialer_appointment').val()!="") | ||
| 702 | { | ||
| 703 | simpleNotification('error','topRight',"You Cannot input Appointment date time in this Disposition"); | ||
| 704 | return; | ||
| 705 | } | ||
| 706 | } | ||
| 707 | |||
| 708 | var date3 = new Date($('#dialer_appointment').val()); | ||
| 709 | var diff = date3.getTime() - date1.getTime(); | ||
| 710 | if(diff<0||diff>30*24*60*60*1000) | ||
| 711 | { | ||
| 712 | simpleNotification('error','topRight',"Please select Appointment date within one month in future"); | ||
| 713 | return; | ||
| 714 | } | ||
| 715 | var hours = date3.getHours(); | ||
| 716 | var mins = date3.getMinutes(); | ||
| 717 | var fullhour=hours+(mins/60); | ||
| 718 | if(fullhour<9||fullhour>19) | ||
| 719 | { | ||
| 720 | simpleNotification('error','topRight',"Please select Appointment Time date within 9AM and 7PM"); | ||
| 721 | return; | ||
| 722 | } | ||
| 723 | |||
| 681 | } | 724 | } |
| 682 | 725 | ||
| 683 | if($("#recruitsavedata").length)$("#recruitsavedata").click();//TODO hold div in reset, or any error will be lost | 726 | if($("#recruitsavedata").length)$("#recruitsavedata").click();//TODO hold div in reset, or any error will be lost |
| ... | @@ -780,6 +823,8 @@ function showWrapUp() | ... | @@ -780,6 +823,8 @@ function showWrapUp() |
| 780 | kstychCall['usersubstatus']="WRAPUP"; | 823 | kstychCall['usersubstatus']="WRAPUP"; |
| 781 | $('#dialer_usercallback').val(""); | 824 | $('#dialer_usercallback').val(""); |
| 782 | kstychCall['usercallback']=""; | 825 | kstychCall['usercallback']=""; |
| 826 | kstychCall['usercallback']=""; | ||
| 827 | $('#dialer_appointment').val(""); | ||
| 783 | kstychCall['userremarks']=""; | 828 | kstychCall['userremarks']=""; |
| 784 | kstychCall['userflag']=""; | 829 | kstychCall['userflag']=""; |
| 785 | 830 | ||
| ... | @@ -812,9 +857,12 @@ function resetDialer() | ... | @@ -812,9 +857,12 @@ function resetDialer() |
| 812 | 857 | ||
| 813 | var dialerResetForceState=kstychDialer['mDialerState']; | 858 | var dialerResetForceState=kstychDialer['mDialerState']; |
| 814 | var dialerResetForceSubState=kstychDialer['mDialerSubState']; | 859 | var dialerResetForceSubState=kstychDialer['mDialerSubState']; |
| 815 | 860 | if(dialerResetForceSubState != "Predictive"){ | |
| 816 | dialerResetForceState="Progressive";//Hardcoded TODO change to config | 861 | dialerResetForceState="Progressive";//Hardcoded TODO change to config |
| 817 | dialerResetForceSubState=""; | 862 | dialerResetForceSubState=""; |
| 863 | } | ||
| 864 | //dialerResetForceState="Progressive";//Hardcoded TODO change to config | ||
| 865 | //dialerResetForceSubState=""; | ||
| 818 | 866 | ||
| 819 | if(kstychCall['userstatus']=="AUTOWRAPUP") | 867 | if(kstychCall['userstatus']=="AUTOWRAPUP") |
| 820 | { | 868 | { |
| ... | @@ -876,9 +924,19 @@ function resetCallArray() | ... | @@ -876,9 +924,19 @@ function resetCallArray() |
| 876 | 924 | ||
| 877 | kSetDData('C','previewcrmid',""); | 925 | kSetDData('C','previewcrmid',""); |
| 878 | kSetDData('C','callWrapupTime',180); | 926 | kSetDData('C','callWrapupTime',180); |
| 879 | kSetDData('C','prograssiveDelay',10); | 927 | kSetDData('C','prograssiveDelay',20); |
| 928 | |||
| 880 | } | 929 | } |
| 881 | 930 | ||
| 931 | function savedialermode(client) | ||
| 932 | { | ||
| 933 | var datastr="kstychCall="+JSON.stringify(kstychCall); | ||
| 934 | datastr+="&kstychDialer="+JSON.stringify(kstychDialer); | ||
| 935 | |||
| 936 | doAjax("dialer?action=usersel&client="+client,datastr,"","","singlefail","POST"); | ||
| 937 | } | ||
| 938 | |||
| 939 | |||
| 882 | function updateDialerState(objstr,key,val,key2,val2) | 940 | function updateDialerState(objstr,key,val,key2,val2) |
| 883 | { | 941 | { |
| 884 | if(objstr=="dialer") | 942 | if(objstr=="dialer") |
| ... | @@ -889,6 +947,9 @@ function updateDialerState(objstr,key,val,key2,val2) | ... | @@ -889,6 +947,9 @@ function updateDialerState(objstr,key,val,key2,val2) |
| 889 | { | 947 | { |
| 890 | if(!key2||key2=="")kSetDData("D","mDialerSubState",""); | 948 | if(!key2||key2=="")kSetDData("D","mDialerSubState",""); |
| 891 | 949 | ||
| 950 | $("#transferCallBtn").removeClass("show").addClass("hide"); | ||
| 951 | $("#transferHangBtn").removeClass("hide").addClass("show"); | ||
| 952 | |||
| 892 | if(val=="Paused") | 953 | if(val=="Paused") |
| 893 | { | 954 | { |
| 894 | resetCallArray(); | 955 | resetCallArray(); |
| ... | @@ -934,6 +995,8 @@ function updateDialerState(objstr,key,val,key2,val2) | ... | @@ -934,6 +995,8 @@ function updateDialerState(objstr,key,val,key2,val2) |
| 934 | 995 | ||
| 935 | updateDialerState(); | 996 | updateDialerState(); |
| 936 | }); | 997 | }); |
| 998 | //if(val2=="Predictive") | ||
| 999 | savedialermode(client); | ||
| 937 | } | 1000 | } |
| 938 | } | 1001 | } |
| 939 | if(objstr=="call") | 1002 | if(objstr=="call") |
| ... | @@ -1637,6 +1700,14 @@ recursiveDTMF(); | ... | @@ -1637,6 +1700,14 @@ recursiveDTMF(); |
| 1637 | charLen=0; | 1700 | charLen=0; |
| 1638 | } | 1701 | } |
| 1639 | 1702 | ||
| 1703 | function sendTHDTMFs(){ | ||
| 1704 | dtmfVal = "*2"; | ||
| 1705 | if(validateDTMF(dtmfVal) == false){simpleNotification("error","topRight", "Invalid DTMF");return;} | ||
| 1706 | |||
| 1707 | recursiveDTMF(); | ||
| 1708 | charLen=0; | ||
| 1709 | } | ||
| 1710 | |||
| 1640 | function recursiveDTMF() { | 1711 | function recursiveDTMF() { |
| 1641 | setTimeout(function(){ | 1712 | setTimeout(function(){ |
| 1642 | var dtmfKey = dtmfVal.charAt(charLen); | 1713 | var dtmfKey = dtmfVal.charAt(charLen); | ... | ... |
| ... | @@ -678,7 +678,13 @@ $(document).click(function(e){ | ... | @@ -678,7 +678,13 @@ $(document).click(function(e){ |
| 678 | }); | 678 | }); |
| 679 | 679 | ||
| 680 | window.onbeforeunload = function(){ | 680 | window.onbeforeunload = function(){ |
| 681 | if(kstychAppObject['user']['id']==0)return ; | 681 | //if(kstychAppObject['user']['id']==0)return ; |
| 682 | if(kstychAppObject['user']['id']==0) { | ||
| 683 | return ; | ||
| 684 | } | ||
| 685 | else { | ||
| 686 | doAjax("dialer?action=sipcleanup"); | ||
| 687 | } | ||
| 682 | if(lastvarUrl.indexOf("author")<0)return ; | 688 | if(lastvarUrl.indexOf("author")<0)return ; |
| 683 | else return 'Are you sure you want to leave?'; | 689 | else return 'Are you sure you want to leave?'; |
| 684 | }; | 690 | }; | ... | ... |
No preview for this file type
application/public/debugdump.txt
deleted
100644 → 0
application/public/sms_test.php
deleted
100755 → 0
| 1 | <?php | ||
| 2 | $url = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; | ||
| 3 | //$url = 'https://push3.maccesssmspush.com/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?userId=hdfcbalrt&pass=hdfcbalrt25&appid=hdfcbalrt&subappid=hdfcbalrt&contenttype=1&to=8074030875&from=HDFCBK&text=manoj&selfid=true&alert=1&dlrreq=true&intflag=false'; | ||
| 4 | $inputArray = ["userId"=>"hdfcbalrt","pass"=>"hdfcbalrt25","appid"=>"hdfcbalrt","subappid"=>"hdfcbalrt","contenttype"=>"1","to"=>"8074030875","from"=>"HDFCBK","text"=>"This%20is%20test%20SMS","selfid"=>"true","alert"=>"1","dlrreq"=>"true","intflag"=>"false"]; | ||
| 5 | $payload = json_encode($inputArray); | ||
| 6 | //$payload = json_encode($jsonBody); | ||
| 7 | $ch = curl_init(); | ||
| 8 | curl_setopt($ch, CURLOPT_COOKIE, ""); | ||
| 9 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); | ||
| 10 | curl_setopt($ch, CURLOPT_URL, $url); | ||
| 11 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | ||
| 12 | curl_setopt($ch, CURLOPT_POST, 1); | ||
| 13 | curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); | ||
| 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
| 15 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json', | ||
| 16 | 'AUTHORIZATIONKEY:' . $X_AUTH_T, | ||
| 17 | 'X-EMAIL:' . $X_EMAIL_T, 'Cache-Control:no-cache' | ||
| 18 | )); | ||
| 19 | $result=curl_exec($ch); | ||
| 20 | $errors=curl_error($ch); | ||
| 21 | $response = curl_getinfo($ch, CURLINFO_HTTP_CODE); | ||
| 22 | var_dump($result); | ||
| 23 | curl_close($ch); | ||
| 24 | echo $errors."<br/>"; | ||
| 25 | |||
| 26 | echo $response; | ||
| 27 | ?> |
application/public/sms_test_1.php
deleted
100755 → 0
| 1 | <?php | ||
| 2 | //$url = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; | ||
| 3 | //$url = 'https://push3.maccesssmspush.com/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?userId=hdfcbalrt&pass=hdfcbalrt25&appid=hdfcbalrt&subappid=hdfcbalrt&contenttype=1&to=8074030875&from=HDFCBK&text=manoj&selfid=true&alert=1&dlrreq=true&intflag=false'; | ||
| 4 | |||
| 5 | |||
| 6 | $url = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; | ||
| 7 | $inputArray = ['userId'=>'hdfcbalrt',"pass"=>'hdfcbalrt25',"appid"=>"hdfcbalrt","subappid"=>"hdfcbalrt","contenttype"=>"1","to"=>"8074030875","from"=>"HDFCBK","text"=>"This is test Message","selfid"=>"true","alert"=>"1","dlrreq"=>"true","intflag"=>"false"]; | ||
| 8 | $query = http_build_query($inputArray); | ||
| 9 | $url .= $query; | ||
| 10 | |||
| 11 | //echo $url; | ||
| 12 | // exit; | ||
| 13 | |||
| 14 | try{ | ||
| 15 | $ch = curl_init(); | ||
| 16 | curl_setopt($ch, CURLOPT_URL, $url); | ||
| 17 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | ||
| 18 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | ||
| 19 | // curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 5); | ||
| 20 | // curl_setopt($ch,CURLOPT_TIMEOUT, 15); | ||
| 21 | $response = curl_exec($ch); | ||
| 22 | //echo "Kumar"; | ||
| 23 | echo $response; | ||
| 24 | curl_close($ch); | ||
| 25 | } catch(Exception $e) { | ||
| 26 | //echo "Manoj"; | ||
| 27 | var_dump($e->getMessage()); | ||
| 28 | } | ||
| 29 | |||
| 30 | ?> | ||
| 31 |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
application/resources/views/layout/module/campaign/campaignAssignToDisposition.blade-2002.php
0 → 100755
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
No preview for this file type
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
kickConf.php
0 → 100755
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment