c286f211 by Manish Mihsra

Changed hangup logic as per the record table design

1 parent 167db9a5
......@@ -664,33 +664,7 @@ class KPAMIListen implements IEventListener
foreach ($userslist as $ulist) {
$crmcall->user_id=$ulist->id;
}
// if($crmcall->client==".")
// {
// $wakka = new KHRMSLib();
// $users=$wakka->searchPhone("mobile",$crmcall->number);
// if(!empty($users))
// {
// $ppldata=unserialize($users[0]['peopledata']);
// $crmcall->crm_id=$users[0]['id'];
// $crmcall->number=$users[0]['mobile'];
// $crmcall->client=($ppldata['client']?$ppldata['client']:"");
// $crmcall->department=($ppldata['department']?$ppldata['department']:"");
// $wakka->setPersonKey($crmcall->crm_id,"dialer_lastcall",date("Y-m-d H:i:s"));
// echo $users[0]['id']." -- ID Found\n";
// }
// else
// {
// $crmcall->crm_id=0;
// $crmcall->client="";
// $crmcall->department="";
// echo "User Not Found!!\n";
// }
// $crmcall->save();
// }
$crmcall->userstatus="InboundDROP";
$crmcall->usersubstatus="InboundDROP";
$crmcall->call_flag="Z";
......@@ -699,12 +673,13 @@ class KPAMIListen implements IEventListener
if($crmcall->crm_id>0)
{
$wakka = new KHRMSLib();
$record=$wakka->getPerson($crmcall->crm_id);
$record=$wakka->getPerson($crmcall->crm_id,$crmcall->client);
if($record)
{
$record["peopledata"]["dialer_status"]="InboundDROP";
$record["peopledata"]["dialer_substatus"]="InboundDROP";
$wakka->setPerson($crmcall->crm_id,$record);
$wakka->setPerson($crmcall->crm_id,$record,$crmcall->client);
$wakka->setPerson($crmcall->crm_id,$record,"");
}
}
}
......@@ -1521,6 +1496,11 @@ class KPAMIListen implements IEventListener
$this->connectToAvailableSip($sipid, $dialline, $crmcall, $mode);
}
else if($mode == "Incoming")
{
$newqueue=new Kqueue();
$newqueue->sipNotify($sipid,"popupalert"," Incoming Calls",$crmcall->number."|".$crmcall->client,$crmcall->did);
}
}
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!