Call logs: describe destination that was called
Description
Zendesk Ticket IDs
Activity

Aniss Chohra July 23, 2022 at 5:44 PM
Proposed Solution:
In order to solve this problem, we have decided to implement these steps:
1 - Add a new event in Asterisk Dialplan (
xivo-config
) at theuser
,conference
, andmeeting
extensions configurations files. This new event has the following properties:called
WAZO_REMOTE_PARTY
,contains for now the type of
remote_party
(destination) that we want to reach:user
,meeting
,conference
, orunknwon
by default/missing,conatins the
id
of theremote_party
(eitherdestination_user_uuid
,conference_id
, ormeeting_uuid
),contains also the
name
of theremote_party
that we want to describe.
2 - Add an interpretation function for the aforementioned event in order to extract the above three properties correctly,
3 - Created a new field called
remote_party
which contains the following two sub-fields:kind
: contains the type of destination extracted from the newly created event,description
: varies depending on thekind
field; containsuser_uuid
anduser_name
in case it is auser
,conference_id
andconference_name
in case it is aconference
call, andmeeting_uuid
andmeeting_name
in case it is a meeting call.
4 - This new field has been implemented as the following:
Low-level (SQL database): as a new table called
RemoteParty
with the fielddescription
of typehstore
; the field is then add toCallLog
table by defining aOne-to-One
relationship between the two tables,High-Level (Marshmallow Schema): as a
fields.Nested
field which contains the two fields mentionned above:kind
as afields.String
type, anddescription
as afields.Dict
format.
5 - Finally, the required integration tests (
test_call_logs_generation.py
andtest_cdr.py
) have been implemented to make sure that this new field is updated correctly for each test scenario.

Sébastien Duthil July 18, 2022 at 2:30 PM
Work to do:
make sure to understand the “why”. If not, ask for clarification.
design the new API fields and request for comments
implement the new API fields
Details
Priority
MediumAssignee
Aniss ChohraAniss ChohraReporter
Sébastien DuthilSébastien DuthilApprovers
Sébastien DuthilFix versions
Sprint
None
Details
Details
Priority
Assignee

Reporter

Approvers

Fix versions
Sprint
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

In the call logs API, we need to know what kind of destination was reached: user, conference, meeting, etc. so that apps can display different UI for different destinations to redial from call logs.
API proposition for
GET /cdr
:Database proposition:
CEL UserEvent proposition:
name:
WAZO_CALL_LOG_DESTINATION
Remarks/constraints:
the word “remote_party” is valid only from the point of view of a user. CDR do not have a point of view and must be direction-agnostic. We should use “destination” or “source” instead.
hstore is hard to use for filtering lists. Use a new table instead.
Don’t use enums in PostgreSQL because they are harder to modify than a simple value constraint.
Destination type
unknown
must not be stored in the database.unknown
is only given by the API when there is no destination details.