0947adbb by G Manojkumar

Modifications for clientcode

1 parent 61878382
......@@ -656,6 +656,7 @@ if($action=="closecall")
$user=$wakka->getPerson($crmcall->crm_id);
$clientcode=$user['peopledata']['clientcode'];
if($user['peopledata']['id']==$crmcall->crm_id)
{
$user['peopledata']["dialer_status"]=$kstychCall["userstatus"];
......@@ -723,7 +724,7 @@ if($action=="closecall")
$userlog->save();
try{
$smscontroller = new SmsController();
$smscontroller->sendSmsBasedOnSubDisposition($kstychCall);
$smscontroller->sendSmsBasedOnSubDisposition($kstychCall,$clientcode);
} catch(Exception $e) {
Log::info($e->getMessage());
}
......
......@@ -8,7 +8,7 @@ class SmsController extends Controller
{
public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?';
//public $userarray = array("A21568","admin");
public function sendSmsBasedOnSubDisposition($kstychCall)
public function sendSmsBasedOnSubDisposition($kstychCall, $clientcode)
{
//$users = $this->userarray;
//if(in_array(Auth::user()->username , $users)){
......@@ -16,14 +16,14 @@ class SmsController extends Controller
if( !empty($msgText) ) {
$msgText = $this->fillValuesInTemplate($msgText);
//Log::info($msgText);
$this->sendSmsRequest($kstychCall, $msgText);
$this->sendSmsRequest($kstychCall, $msgText, $clientcode);
}
//}
return;
}
public function sendSmsRequest($kstychCall, $msgText)
public function sendSmsRequest($kstychCall, $msgText, $clientcode)
{
$wakka = new KHRMSLib();
//$wakka = new KHRMSLib();
$url = $this->smsUrl;
Log::info($kstychCall['callnumber']);
$inputArray = [
......@@ -56,8 +56,8 @@ class SmsController extends Controller
$agentid=Auth::user()->id;
$agentname=Auth::user()->fullname;
$subdispo=$kstychCall["usersubstatus"];
$user=$wakka->getPerson($crmcall->crm_id);
$clientcode=$user['peopledata']['clientcode'];
//$user=$wakka->getPerson($crmcall->crm_id);
//$clientcode=$user['peopledata']['clientcode'];
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'"));
Log::useFiles(storage_path().'/logs/SMS_Messages'.date("Y-m-d").'.log');
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!