0947adbb by G Manojkumar

Modifications for clientcode

1 parent 61878382
...@@ -656,6 +656,7 @@ if($action=="closecall") ...@@ -656,6 +656,7 @@ if($action=="closecall")
656 656
657 657
658 $user=$wakka->getPerson($crmcall->crm_id); 658 $user=$wakka->getPerson($crmcall->crm_id);
659 $clientcode=$user['peopledata']['clientcode'];
659 if($user['peopledata']['id']==$crmcall->crm_id) 660 if($user['peopledata']['id']==$crmcall->crm_id)
660 { 661 {
661 $user['peopledata']["dialer_status"]=$kstychCall["userstatus"]; 662 $user['peopledata']["dialer_status"]=$kstychCall["userstatus"];
...@@ -723,7 +724,7 @@ if($action=="closecall") ...@@ -723,7 +724,7 @@ if($action=="closecall")
723 $userlog->save(); 724 $userlog->save();
724 try{ 725 try{
725 $smscontroller = new SmsController(); 726 $smscontroller = new SmsController();
726 $smscontroller->sendSmsBasedOnSubDisposition($kstychCall); 727 $smscontroller->sendSmsBasedOnSubDisposition($kstychCall,$clientcode);
727 } catch(Exception $e) { 728 } catch(Exception $e) {
728 Log::info($e->getMessage()); 729 Log::info($e->getMessage());
729 } 730 }
......
...@@ -8,7 +8,7 @@ class SmsController extends Controller ...@@ -8,7 +8,7 @@ class SmsController extends Controller
8 { 8 {
9 public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; 9 public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?';
10 //public $userarray = array("A21568","admin"); 10 //public $userarray = array("A21568","admin");
11 public function sendSmsBasedOnSubDisposition($kstychCall) 11 public function sendSmsBasedOnSubDisposition($kstychCall, $clientcode)
12 { 12 {
13 //$users = $this->userarray; 13 //$users = $this->userarray;
14 //if(in_array(Auth::user()->username , $users)){ 14 //if(in_array(Auth::user()->username , $users)){
...@@ -16,14 +16,14 @@ class SmsController extends Controller ...@@ -16,14 +16,14 @@ class SmsController extends Controller
16 if( !empty($msgText) ) { 16 if( !empty($msgText) ) {
17 $msgText = $this->fillValuesInTemplate($msgText); 17 $msgText = $this->fillValuesInTemplate($msgText);
18 //Log::info($msgText); 18 //Log::info($msgText);
19 $this->sendSmsRequest($kstychCall, $msgText); 19 $this->sendSmsRequest($kstychCall, $msgText, $clientcode);
20 } 20 }
21 //} 21 //}
22 return; 22 return;
23 } 23 }
24 public function sendSmsRequest($kstychCall, $msgText) 24 public function sendSmsRequest($kstychCall, $msgText, $clientcode)
25 { 25 {
26 $wakka = new KHRMSLib(); 26 //$wakka = new KHRMSLib();
27 $url = $this->smsUrl; 27 $url = $this->smsUrl;
28 Log::info($kstychCall['callnumber']); 28 Log::info($kstychCall['callnumber']);
29 $inputArray = [ 29 $inputArray = [
...@@ -56,8 +56,8 @@ class SmsController extends Controller ...@@ -56,8 +56,8 @@ class SmsController extends Controller
56 $agentid=Auth::user()->id; 56 $agentid=Auth::user()->id;
57 $agentname=Auth::user()->fullname; 57 $agentname=Auth::user()->fullname;
58 $subdispo=$kstychCall["usersubstatus"]; 58 $subdispo=$kstychCall["usersubstatus"];
59 $user=$wakka->getPerson($crmcall->crm_id); 59 //$user=$wakka->getPerson($crmcall->crm_id);
60 $clientcode=$user['peopledata']['clientcode']; 60 //$clientcode=$user['peopledata']['clientcode'];
61 DB::insert(DB::raw("insert into sms_log set server_ip='$serverip',call_id='$callid',call_date='$crmcall->created_at',agent_name='$agentname',agent_id='$agentid',subdispo='$subdispo',number='$number',message='$msgText',response='$response',clientcode='$clientcode'")); 61 DB::insert(DB::raw("insert into sms_log set server_ip='$serverip',call_id='$callid',call_date='$crmcall->created_at',agent_name='$agentname',agent_id='$agentid',subdispo='$subdispo',number='$number',message='$msgText',response='$response',clientcode='$clientcode'"));
62 Log::useFiles(storage_path().'/logs/SMS_Messages'.date("Y-m-d").'.log'); 62 Log::useFiles(storage_path().'/logs/SMS_Messages'.date("Y-m-d").'.log');
63 Log::info("|".date('Y-m-d H:i:s', strtotime('+5 hours 30 minutes'))."|".Auth::user()->fullname."|".$kstychCall['callnumber']."|".$msgText."|".$response); 63 Log::info("|".date('Y-m-d H:i:s', strtotime('+5 hours 30 minutes'))."|".Auth::user()->fullname."|".$kstychCall['callnumber']."|".$msgText."|".$response);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!