# Manage calls in the Console

> Review calls on your Numbers, inspect a call, end live calls, and manage SIP trunks, call settings, call policy and retention in the Console.

Open a project and go to **Calls** to see voice and video calls placed or
received on the project's Numbers. Choose **All projects** to see every
project's calls. The Console reviews and manages calls but does not place or
answer them; to do that from your product, see
[Add calling to a web app](https://docs.polymorfa.com/calls/web) and
[Control calls from your server](https://docs.polymorfa.com/calls/server).

Calls has five tabs: **History**, **Summary**, **Call policy**, **SIP trunks**
and **Data retention**. **SIP trunks** appears when a project is open, to team
owners and admins and to other members when the project has trunks.

## Call summary

The **Summary** tab shows the number of calls, answered, missed,
declined and failed calls, the answer rate, total talk time and the average
call length. Two charts show calls by outcome and talk time for each day, or
for each hour when the date range covers two days or less. A heatmap shows
which days of the week and hours of the day receive the most calls, and the
three busiest hours are listed below it.

Choose a **Number**, a **Direction** and a time range above the summary. It
opens on the last 7 days. The range covers at most 366 days. Days and hours use your browser's time zone. To read the same
figures from your code, use the
[call statistics API](https://docs.polymorfa.com/calls/records#call-analytics-and-call-records).

For pickup delays, median and 95th-percentile lengths, missed-call follow-up,
reported quality and comparisons across numbers, enable
[WhatsApp analytics](https://docs.polymorfa.com/numbers/analytics#calls).

## Find a call

The **History** tab lists calls, newest first. Each row shows the call's
party, state, whether it is live, number, direction, connection, duration and
start time. To open one call, enter its ID in **Find a call by ID** and select
**Open**. The other party appears as a team-specific reference; Polymorfa
does not store who is on the other side of a call.

Select **Filters** to filter by:

- **State**: Ringing, Answered, Declined, Missed, or Ended. An incoming call
  that a participant declined stays **Declined**, and one that rang without an
  answer stays **Missed**, after the call ends. **Ended** covers every other
  finished call, including outgoing calls the recipient did not answer; the
  end reason gives the cause.
- **Direction**: Incoming or Outgoing.
- **Activity**: Live or Finished.
- **Number**.

Each active filter shows as a chip above the list, with a button to remove it.
Beside **Filters**, choose a **From** day, a **To** day, or both; the end day
is included.

While a live call is on screen, the list refreshes every 10 seconds.

## Call details

Select a call to open its details. The strip at the top shows the call's
state, whether it is live, the party, direction, media, duration, start time,
connection, and the **Call ID** and **Number ID** with copy buttons. Use them
to find the call in your webhook handlers and logs. On a phone, select
**Details** to show the connection and IDs.

The tabs below the strip are:

- **Overview**: who answered, whether that participant claimed the call, the
  end reason, connect and end times, the recorded call events, and the
  WhatsApp participants of a group call with their state.
- **Connections**: each browser, app, server, or phone system that joined the
  call, when it joined and left, and why it left. A connection closes when the
  participant leaves, reconnects with a new connection, or another participant
  claims the call, or when the call ends.
- **Call quality**: under **Measured by Polymorfa**, setup and ring time,
  audio codec, jitter, packets lost, round-trip time, and bitrates measured by
  Polymorfa's media service. **Not reported** means the value was not
  measured. Under **Reported by your app**, the quality figures and errors
  your app sent for each of its connections. See
  [App-reported diagnostics](#app-reported-diagnostics).
- **Webhooks**: the delivery status, attempts, and last outcome of each webhook
  event for the call. Delivery records are kept for 30 days after each event.

## App-reported diagnostics

When your app sends [call diagnostics](https://docs.polymorfa.com/calls/records#report-call-diagnostics-from-your-app),
the **Call quality** tab shows one entry per connection that reported:

- **Sent by**: the SDK name, version, and platform the report named.
- **Last quality report**: when the latest quality report arrived, with its
  round-trip time, jitter, packets lost and received, audio and video codecs,
  connection path, and reconnect count. **Not reported** means your app did
  not send that figure.
- **Connection path**: **Direct on the local network**, **Direct**, or
  **Through a relay server**. Relayed media takes a longer route and often
  explains higher round-trip time.
- **Reported errors**: each error with its time and a description, newest
  first. The Console shows up to 50 errors per call.

**Your app has not sent reports for this call** means no report arrived for
the call. Polymorfa keeps up to 200 reports per call; when a call reaches that
limit, the Console says so. If the Console cannot load your app's reports,
it says that they are not available instead of saying that none arrived.

## End a call or remove a connection

Team owners and admins can end a live call with **End call** in the strip at
the top of the call details, or remove one connection with **Remove** on the
**Connections** tab. Ending a call ends it for every participant and for the
other party. Removing a connection disconnects that browser, app, or server;
the call continues for everyone else. Both actions take effect immediately and
are recorded in the [audit history](https://docs.polymorfa.com/teams/audit-history).

The Console refuses the action when the call is no longer live, and reports
when the call service is temporarily unavailable.

## Call settings

Open a number from **Numbers**, select **Settings**, then **Calls**. Every team
member can see these settings; team owners and admins can change them, and
each change is recorded in the [audit history](https://docs.polymorfa.com/teams/audit-history).

**Calls on this number** turns calling on or off. While it is off, placing and
answering calls on the number is refused, incoming calls are declined, and SIP
trunks cannot call through the number. Calls in progress continue. See
[Turn calling off for a Number](https://docs.polymorfa.com/calls/server#turn-calling-off-for-a-number).

On a Cloud API number, **Answer calls with Polymorfa Calls** chooses who
answers incoming calls: your Calls apps when it is on, or your Graph API
integration when it is off (the default). See
[Answer Cloud API calls with Polymorfa Calls](https://docs.polymorfa.com/calls/server#answer-cloud-api-calls-with-polymorfa-calls).

**Conference mode** controls whether the participants you connect to a call
hear each other:

- **On** (default): each participant hears the people on WhatsApp and every
  other participant you connected.
- **Off**: each participant hears only the people on WhatsApp.

In both modes the people on WhatsApp hear all of your participants, and nobody
hears their own voice. A change applies to a call the next time a participant
answers it or connects to it, including calls in progress. See
[Conference mode](https://docs.polymorfa.com/calls/how-calls-work#conference-mode) for examples.

**Simultaneous calls** lets a linked-device number hold any number of calls at
once. It is off by default, and a new call then waits for the current call to
end. Turning it on opens a confirmation:

- The number will hold any number of calls at once.
- WhatsApp's own apps never hold two calls at once, so this is unusual behavior
  for the account.
- [Ban Credit](https://docs.polymorfa.com/safety/ban-insurance#who-it-covers) does not cover a ban
  while the setting is on, or for 30 days after you turn it off.

Select **I understand Ban Credit will not cover this number**, then
**Turn on simultaneous calls**. The button stays unavailable until you select
the checkbox, and **Cancel** leaves the setting off. While the setting is on,
the section repeats the Ban Credit exclusion below the switch. After you
turn it off, the section shows the date and time before which a new ban is
still not covered, until that time passes. Otherwise it shows that Ban
Credit does not cover a ban if the setting was on at any time in the 30
days before it. Turning it off needs no confirmation and does not end calls in
progress.

Cloud API numbers ignore this setting, so the switch is hidden on them unless
it is already on. If a change is refused or does not apply, the reason appears
below the switch. See [Simultaneous calls](https://docs.polymorfa.com/calls/server#simultaneous-calls).

When the project has an enabled SIP trunk that sends calls to your phone
system, the section also shows **Incoming calls**:

- **Incoming calls ring**: **Your apps and browsers**, or **A SIP trunk and
  your apps**. With a trunk, your phone system rings together with your apps,
  and your apps can still answer or join.
- **SIP trunk**: the trunk that receives the calls. Disabled trunks are listed
  but you cannot choose them. A number that already routes to a trunk you
  later disabled keeps that trunk selected.
- **An answer from the phone system claims the call**: when on, your apps stop
  ringing once the phone system answers. It is on by default.

Choose **Save** to apply a routing change. Switches apply as soon as you
change them. If someone else changed the number's call settings after the page
loaded, the Console refuses your change, shows the latest values, and asks you
to try again. Changes reach new calls within about a minute. See [SIP trunks](https://docs.polymorfa.com/calls/sip-trunks)
for how routed calls behave.

## SIP trunks

Open a project, go to **Calls**, and choose the **SIP trunks** tab. Team owners
and admins always see this tab; other members see it when the project has
trunks. The list shows each trunk's name,
direction, status, the SIP URI it sends calls to, and the username and number
it uses for calls from your phone system. Every team member can view trunks:
select a trunk to open its settings. Members see them read-only.

Beside the trunk list, the **SIP address** tab shows the host, the SIP port
for each transport, the audio (RTP) port range, and what to allow in your
firewall. The same address applies to every trunk. When the environment has no
SIP address, the tab says so and shows no host or ports. See
[Find the SIP address](https://docs.polymorfa.com/calls/sip-trunks#find-the-sip-address).

Team owners and admins can:

- **Add** a trunk. Choose its direction: **To your phone system**, **From your
  phone system**, or **Both ways**, and fill in the matching section.
- **Edit** a trunk. Leave **Password** empty to keep the saved password. If
  someone else changed the trunk first, the Console refuses the change; reopen
  the trunk and try again. Closing the form or leaving the page with unsaved
  changes asks before it discards them. The fields are locked while a save is
  in progress.
- **Enable or disable** a trunk from its menu in the list. A disabled trunk takes no new
  calls; calls in progress continue.
- Create a **New password** for a trunk that receives calls from your phone
  system. The previous password stops working within about a minute.
- **Delete** a trunk. A trunk that a number still routes calls to cannot be
  deleted; route that number back to your apps first.

> **Warning**
>
> When you add a trunk that receives calls from your phone system, or create a
> new password, the Console shows the username, password, and realm once,
> together with the SIP server and ports. Enter them in your phone system before
> you close the dialog; the password cannot be shown again.

Changes are recorded in the [audit history](https://docs.polymorfa.com/teams/audit-history) and reach call
routing within about a minute.

## Call data retention

The **Data retention** tab of Calls shows how long
Polymorfa keeps your team's call data: call history, each call's participant and
connection history, and the diagnostics your apps report. The setting applies
to every project in the team. Teams that never changed it keep call data for 90
days.

Every team member can see the period. Team owners and admins can change it:

1. Choose a **Retention period**: Short (7 days), Standard (30 days), Extended
   (90 days), Compliance (365 days), or Custom.
2. For **Custom**, enter a whole number of days from 1 to 2,555.
3. Select **Save retention**.

Deletion of call data older than the period starts on a date announced in the
[changelog](https://docs.polymorfa.com/changelog). Until then, saving a period records your choice and
deletes nothing. Once deletion runs, call data is deleted within 24 hours after
it becomes older than the period (a large backlog can take longer), and a
shorter period also applies to call data already stored. If you choose a shorter period, the Console asks you to
confirm first, because deleted call data cannot be recovered. A longer period
does not restore deleted data. If someone else
changed the setting after you opened the page, the Console refuses the change
and shows the current value; review it and save again.

You can also read and change the period with the
[Platform API](https://docs.polymorfa.com/calls/records#call-data-retention).

## Call policy

Choose the **Call policy** tab to manage your team's do-not-call list and
blocked country codes, each on its own tab: **Do-not-call list** and
**Blocked country codes**. Every team member can see them; team owners and
admins change them. See [Call permissions and opt-outs](https://docs.polymorfa.com/calls/permissions).

On a narrow screen, choose **Details** in an entry's menu to see its note, how
it was added, and when. Your do-not-call search and an unsaved change to the
blocked country codes stay while you switch tabs. If someone else saved the codes after you started, the
Console keeps your text, shows the saved codes, and lets you save again.

## See also

- [Call records and retention](https://docs.polymorfa.com/calls/records)
- [Connect a SIP trunk](https://docs.polymorfa.com/calls/sip-trunks)
- [How calls work](https://docs.polymorfa.com/calls/how-calls-work)
