# Troubleshooting

What to check when pop-ups, call logging, the Call button, recordings or texts don't work.

> [!TIP]
> First check the [license](https://docs.sapiensandmachines.com/en/espocrm-voip/license-and-trial): without an active license, sending texts, the Call button, the
> browser phone and the pop-ups are off (incoming calls and texts are still saved).

## Nothing pops up and no Calls list

- Your User needs a **SIP Username** (Twilio) or a **3CX Extension** (3CX).
- With 3CX, the ringing pop-up needs the 3CX API client with your extension under Call Control
  ([Connect 3CX](https://docs.sapiensandmachines.com/en/espocrm-voip/connect-3cx#recordings-and-the-ringing-pop-up-optional)).

## Twilio

In the Twilio console, open **Monitor → Logs → Errors**:

- A **403** from the CRM means the request wasn't accepted: *Bad Twilio signature* (the Auth Token in EspoCRM or the
  address in Twilio doesn't match; use the exact `https://` addresses from [Connect Twilio](https://docs.sapiensandmachines.com/en/espocrm-voip/connect-twilio)) or
  *Twilio integration is not enabled*.
- The softphone shows **403 Forbidden**: turn on *SIP Registration* on the Twilio SIP domain.
- Calls go straight to voicemail on a mobile phone: the softphone app was asleep; use one with push notifications.

## 3CX

- **TEST** in 3CX says "not found": open **Administration → S+M EspoCRM VOIP → 3CX Lookup Test**. It shows whether
  3CX is enabled, how the number was read, which record matches, and 3CX's last requests with their results
  (*refused: 3CX not enabled in EspoCRM*, *no secret sent*, *wrong secret*).
- *Bad 3CX secret*: download the template again and upload it in 3CX.
- No recordings: the 3CX API client is missing or its role isn't **Owner**; use **Test the 3CX API** on the Lookup
  Test page.

## The Call button

| Message | What to do |
|---|---|
| *Your user has no valid SIP Username.* | An administrator sets it on your User. |
| *The Call button is not set up* | Fill in **SIP domain** and **Caller ID** in the Twilio settings. |
| *That number is not on this record.* | Use a number saved on the record. |
| *Twilio could not place the call: …* | Check Twilio's error log. |

## Texts

| Message | What to do |
|---|---|
| *Texting is not set up* | Connect Twilio and add a Twilio Number. |
| *You may not send texts from this number* | An administrator adds you to the number under **Twilio Numbers**. |
| *This number replied STOP* | They opted out; they must text START first. |
| *Text is too long (max 1600 characters).* | Shorten it. |
| *Picture is too large (max 5 MB).* / *Only JPEG, PNG or GIF pictures can be texted.* | Use a smaller JPEG, PNG or GIF. |

Texts that couldn't be sent or pictures that couldn't be copied are also noted in EspoCRM's log, starting with
"S+M EspoCRM VOIP:".

## Recordings

*No recording.* or *Recording not available.*: the call wasn't recorded, or Twilio or 3CX no longer keeps it.
