9103ffcc by Nitesh

Added incall status in newcall function

1 parent 8c8c5014
......@@ -226,7 +226,7 @@ class DialerController extends Controller
else if ($kstychCall['callnumber'] != "") $users = $wakka->getPersons("mobile='" . $kstychCall['callnumber'] . "' $roclientstr limit 1");
else $users = $this->getCallSequencing(1, $client);
}
$wakka->setPersonKey($users[0]['id'], "status", "Incall");
$searchresult = '<div style="clear:both"></div><div id=divworking></div><div style="clear:both"></div>';
if (!empty($users)) {
if (sizeof($users) >= 1) {
......@@ -376,7 +376,7 @@ class DialerController extends Controller
} else {
return Response::make($searchresult . "<script>kstychCall['crmid']=0;kSetDData('C','previewcrmid','');simpleNotification('error','topRight','Multiple Records Found!');createSearchRecordDiv('dialersearchbox');</script>");
}
} else return Response::make($searchresult . "<script>kstychCall['crmid']=0;kSetDData('C','previewcrmid','');simpleNotification('error','topRight','No Records Found!');createSearchRecordDiv('dialersearchbox');</script>");
} else return Response::make($searchresult .= "<div id=internalid_matchlist></div><script>createSearchRecordDiv('internalid_matchlist');</script>");
}
if ($action == "dialcall") {
$sipid = Input::get("sipid");
......@@ -1360,7 +1360,7 @@ class DialerController extends Controller
if ($limit > 0) {
$tusers = $wakka->getPersons("status IN ('Called','Incall') and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit");
$tusers = $wakka->getPersons("status='New' and mobile!='' and $roclientstr order by dialer_lastcall asc limit $limit");
foreach ($tusers as $tuser) if (!isset($users[$tuser['id']])) $users[$tuser['id']] = $tuser;
$limit = $limit - sizeof($tusers);
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!