Introducing a new way to review your PRs.

Read the announcement

frappe / helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / telephony-and-call-logs

Telephony and call logs

Telephony connects the agent desk to supported calling services so agents can make and receive calls while they work on tickets. The same system keeps call records linked to tickets and presents them as a call history that agents can review, edit, and use to open recordings.

See Integrations and telephony for the wider integration model. Related ticket, ERP, and desk flows are described in ERPNext integration, Ticket management, and Agent desk platform.

Telephony state

The telephony state is the shared view of whether calling is available and which calling medium the desk should use. The desk checks the service status when the main or mobile header loads. It then exposes calling actions only when at least one supported medium is ready.

The shared state also holds the ticket or record linked to the current call. This link lets a call start from a ticket and lets the calling service associate the resulting record with that ticket. The desk can use Twilio or Exotel, and it can store one of them as the default when both are available.

References: desk/…/telephony.ts• L15-58 desk/…/AppHeader.vue• L10-22 desk/…/MobileAppHeader.vue• L13-26 desk/…/CallUI.vue• L49-120

Call controls

The call control is the common entry point for outgoing calls. It accepts a phone number and a related record, selects the default medium when one exists, and asks the agent to choose a medium when the choice is not clear. A missing number opens the phone-number flow instead of starting a call.

The active call appears in the agent header as a movable full panel or a small collapsed panel. Twilio exposes controls to accept or reject an incoming call, cancel a pending outgoing call, mute a connected call, and end an active call. Exotel presents provider status and duration in the call panel. Contact lookup by phone number adds the known contact to the call view when possible.

The two calling services use different event paths but present the same high-level lifecycle to the desk: setup, incoming or outgoing activity, connection progress, completion, failure, and cleanup. Twilio reports state through its call session, while Exotel reports state through telephony events. When a call ends, the ticket page reloads its activity data so the new or updated call record can appear.

This diagram shows how a ticket action becomes a provider call and how the ended call returns to ticket activity.

flowchart LR
    A[Ticket contact or Calls menu] --> B[Shared call control]
    B --> C{Calling medium}
    C --> D[Twilio call panel]
    C --> E[Exotel call panel]
    D --> F[Call state and controls]
    E --> F
    F --> G[Call record linked to ticket]
    G --> H[Ticket activities reload]

References: desk/…/CallUI.vue• L69-142 desk/…/TwilioCallUI.vue• L2-170 desk/…/TwilioCallUI.vue• L292-458 desk/…/ExotelCallUI.vue• L1-89 desk/…/ExotelCallUI.vue• L159-290 desk/…/TicketAgent.vue• L133-150 desk/…/TicketContact.vue• L81-91

Call-log retrieval

Call-log retrieval joins a ticket to the call records linked to it. The ticket activity service returns calls with the caller, receiver, direction, status, duration, numbers, recording URL, and creation time. It also resolves phone numbers to contact details and user details so the desk can show people instead of only numbers.

The call-log page retrieves records from the TP Call Log data set and shows them in a list. Its main columns identify the caller and receiver, call direction, status, and duration. Caller and receiver rows use the resolved people when available. Selecting a row opens the detail view, while the page also supports a separate flow for creating a new manual log and refreshes the list after that log is saved.

Agents can also create a manual call log or edit an existing record. The form requires the call direction, both phone numbers, status, and duration. A log can link to an HD Ticket, which makes it part of that ticket's activity history.

References: helpdesk/…/api.py• L279-309 helpdesk/utils.py• L397-482 desk/…/CallLogs.vue• L17-35 desk/…/CallLogs.vue• L56-143 desk/…/CallLogModal.vue• L21-107 desk/…/CallLogModal.vue• L261-350

Call-log presentation

The call-log detail view turns a selected record into a short call summary. It loads the record when the view opens, then shows the direction, the people on each side, creation time, duration, status, and any recording. If the record links to a ticket, the view provides a direct path back to that ticket. Managers can open the edit form from this view.

The call-log list and detail view use a shared status label and color model. For example, a completed call is shown as completed, while a no-answer call is shown as a missed call. This keeps the list, detail view, and ticket activity cards consistent.

References: desk/…/CallLogDetailModal.vue• L11-89 desk/…/CallLogDetailModal.vue• L93-209 desk/…/CallLogDetailModal.vue• L212-262 desk/…/utils.ts• L1-23

Agent desk pages

The agent desk offers two related ways to work with calls. The /call-logs page is the broad call history for browsing and manual entry. A ticket's Calls tab is the focused history for one ticket. The router exposes the page to the portal, while the ticket page adds the Calls tab only when calling is enabled.

The ticket Calls tab uses the same call-log detail and edit views as the main call-log page. A call card shows who called, direction, time, duration when complete, recording availability, and status. The Calls tab also provides actions to make a call or log a call manually.

Ticket calls are part of the wider activity stream rather than a separate conversation. The ticket activity service adds linked calls to the same data returned for comments, email, history, and views. This lets an agent review phone work beside the other work on the ticket.

References: desk/…/index.ts• L125-133 desk/…/TicketActivityPanel.vue• L81-115 desk/…/CallArea.vue• L1-95 desk/…/ActivityHeader.vue• L8-71 helpdesk/…/api.py• L737-747 desk/…/TicketAgentActivities.vue• L7-97

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the shared calling-enabled state aligned with the header setup and with the condition that adds the ticket Calls tab.
  • Keep the ticket link fields passed into both provider call paths aligned with the link used by ticket activity retrieval.
  • Keep call direction, status labels, and status colors consistent across the list, detail modal, and ticket call card.
  • Preserve the call-record fields needed by both the detail view and ticket activity loading, especially duration, recording URL, and ticket links.
  • Keep manual log field names mapped to the call-log service names when the form or call-log contract changes.

Important failure modes

TriggerConsequenceGuard
Neither calling service is enabledThe desk cannot start or receive calls and the ticket Calls tab is hiddenThe shared telephony state gates the call controls and tab on the provider status check
Both services are enabled without a default mediumAn outgoing call needs an explicit medium choiceThe call dialog asks the agent to choose Twilio or Exotel
A ticket has no phone numberThe call cannot start from the ticket contactThe desk opens the phone-number update flow before calling
A call is not linked to the ticketThe call record does not appear in that ticket's activity streamProvider and manual-call paths pass the ticket link into the call record
A call ends without an activity refreshThe agent can miss the new or changed call in the open ticketCall-end handling reloads the ticket activity data
A phone number cannot be matched to a contactThe call still displays, but the person is shown as unknown or by numberCall-log parsing falls back to the phone number when contact lookup fails

Key files

FileWhy to read it
desk/…/telephony.tsDefines the shared calling state and the common call entry point.
desk/…/CallUI.vueShows how the desk chooses a calling medium and routes calls to a provider.
desk/…/TwilioCallUI.vueShows the agent-facing call lifecycle and controls for Twilio.
desk/…/ExotelCallUI.vueShows the event-driven call lifecycle for Exotel.
desk/…/CallLogs.vueDefines the main call-log page, its list presentation, and its row actions.
desk/…/CallLogModal.vueDefines manual call-log creation and editing.
desk/…/CallLogDetailModal.vueDefines call detail loading, ticket links, recording playback, and manager editing.
desk/…/CallArea.vueDefines how a call appears inside a ticket activity stream.
desk/…/TicketActivityPanel.vueAdds the Calls tab to the ticket agent desk when telephony is available.
helpdesk/…/api.pyConnects linked call records to ticket activity retrieval.
helpdesk/utils.pyNormalizes call records and resolves people for presentation.
desk/…/index.tsDefines the agent call-log page route.