Add callback for phone calls, not tested yet

This commit is contained in:
osaajani 2021-03-23 17:39:13 +01:00
parent 52a0302dc2
commit 41c3b3b86e
13 changed files with 378 additions and 57 deletions

View file

@ -19,6 +19,26 @@ namespace models;
const DIRECTION_INBOUND = 'inbound';
const DIRECTION_OUTBOUND = 'outbound';
/**
* Get a call for a user by his phone and uid
*
* @param int $id_user : user id
* @param int $id_phone : phone id
* @param int $uid : call uid
*
* @return array : the call or an empty array
*/
public function get_by_uid_and_phone_for_user($id_user, $id_phone, $uid)
{
$where = [
'id_user' => $id_user,
'id_phone' => $id_phone,
'uid' => $uid,
];
return $this->_select_one($this->get_table_name(), $where);
}
/**
* Return table name.
*/