So, just had to review the source code.
Finally sorted a little workaround using extension "alias" configured in Extension properties and modified the SQL query in xml_cdr_extension_summary.php
For those who needs here is the SQL
$sql = "SELECT \n";
$sql .= "e.domain_uuid, \n";
$sql .= "d.domain_name, \n";
$sql .= "e.extension, \n";
$sql .= "e.number_alias, \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER( \n";
$sql .= " WHERE c.domain_uuid = e.domain_uuid \n";
$sql .= " AND ((\n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL and ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
$sql .= " AND (\n";
$sql .= " c.answer_stamp IS NOT NULL \n";
$sql .= " and \n";
$sql .= " c.bridge_uuid IS NOT NULL) \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
}
else {
$sql .= "AND direction = 'inbound') \n";
}
$sql .= "AS answered, \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR (\n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
$sql .= " AND ( \n";
$sql .= " c.answer_stamp IS NULL \n";
$sql .= " AND \n";
$sql .= " c.bridge_uuid IS NULL) \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'outbound'))";
} else {
$sql .= " AND direction = 'inbound')";
}
$sql .= "AS missed, \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
$sql .= " AND c.hangup_cause = 'NO_ANSWER' \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'local') \n";
}
else {
$sql .= "AND direction = 'inbound' \n";
}
$sql .= ") AS no_answer, \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
$sql .= " AND \n";
$sql .= " c.hangup_cause = 'USER_BUSY' \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
}
else {
$sql .= " AND direction = 'inbound') \n";
}
$sql .= "AS busy, \n";
$sql .= "SUM(c.billsec) \n";
$sql .= "FILTER ( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'outbound') \n";
}
$sql .= " ) / \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER ( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'outbound') \n";
}
$sql .= " ) AS aloc, \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER ( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
}
else {
$sql .= " AND direction = 'inbound') \n";
}
$sql .= "AS inbound_calls, \n";
$sql .= "SUM(c.billsec) \n";
$sql .= "FILTER ( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
if ($this->include_internal) {
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
}
else {
$sql .= " AND direction = 'inbound') \n";
}
$sql .= "AS inbound_duration, \n";
$sql .= "COUNT(*) \n";
$sql .= "FILTER ( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
$sql .= " AND \n";
$sql .= " c.direction = 'outbound') \n";
$sql .= "AS outbound_calls, \n";
$sql .= "SUM(c.billsec) \n";
$sql .= "FILTER ( \n";
$sql .= " WHERE (( \n";
$sql .= " c.caller_id_name = e.extension \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.extension) \n";
$sql .= " OR ( \n";
$sql .= " e.number_alias IS NOT NULL \n";
$sql .= " AND ( \n";
$sql .= " c.caller_id_name = e.number_alias \n";
$sql .= " OR \n";
$sql .= " c.destination_number = e.number_alias))) \n";
$sql .= " AND ( \n";
$sql .= " c.direction = 'outbound')) \n";
$sql .= "AS outbound_duration, \n";
$sql .= "e.description \n";
$sql .= "FROM v_extensions AS e, v_domains AS d, \n";
$sql .= "( SELECT \n";
$sql .= " domain_uuid, \n";
$sql .= " caller_id_name, \n";
$sql .= " destination_number, \n";
$sql .= " answer_stamp, \n";
$sql .= " bridge_uuid, \n";
$sql .= " direction, \n";
$sql .= " start_stamp, \n";
$sql .= " hangup_cause, \n";
$sql .= " billsec \n";
$sql .= " FROM v_xml_cdr \n";
$sql .= " WHERE domain_uuid = '".$this->domain_uuid."' \n";
$sql .= $sql_date_range;
$sql .= ") AS c \n";
$sql .= "WHERE \n";
$sql .= "d.domain_uuid = e.domain_uuid \n";
if (!($_GET['showall'] && permission_exists('xml_cdr_all'))) {
$sql .= "AND e.domain_uuid = '".$this->domain_uuid."' \n";
}
$sql .= "GROUP BY e.extension, e.domain_uuid, d.domain_uuid, e.number_alias, e.description \n";
$sql .= "ORDER BY extension ASC \n";
$prep_statement = $this->db->prepare(check_sql($sql));
print_r($prep_statement);
$prep_statement->execute();
$summary = $prep_statement->fetchAll(PDO::FETCH_NAMED);
Next step is to fix xml_cdr_statistics.php page because its also empty..