61878382 by G Manojkumar

added clientcode, calltime, agent_id

1 parent 8f391294
......@@ -23,6 +23,7 @@ class SmsController extends Controller
}
public function sendSmsRequest($kstychCall, $msgText)
{
$wakka = new KHRMSLib();
$url = $this->smsUrl;
Log::info($kstychCall['callnumber']);
$inputArray = [
......@@ -48,6 +49,16 @@ class SmsController extends Controller
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,3);
$response = curl_exec($ch);
$number=$kstychCall['callnumber'];
$callid=intval($kstychCall['callid'])+0;
$crmcall=CRMCall::find($callid);
$serverip=env(app_ip);
$agentid=Auth::user()->id;
$agentname=Auth::user()->fullname;
$subdispo=$kstychCall["usersubstatus"];
$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);
//Log::info($response);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!