Terminating WhatsApp Audio Calls on Siperb Softphone

WhatsApp Business audio calls can be routed to your Siperb softphone using a standard Outbound Trunk connection. Because WhatsApp’s Business API uses the Opus audio codec natively — the same codec used by WebRTC — no transcoding is needed. The audio passes straight through, which means lower latency and no Siperb proxy overhead on the media path.

This guide covers audio call termination only. For WhatsApp messaging integration, see the in-app messaging features in the Siperb app — that is a separate capability handled natively.

What you need before you start

  • A WhatsApp Business API account — either directly through Meta’s Cloud API or via a CPAAS/SIP provider that offers a WhatsApp-to-SIP gateway. Your provider will supply you with a SIP host address, port, and any required credentials.
  • A Siperb account with at least one device registered and a working connection to your PBX (or using Siperb standalone for receiving WhatsApp calls directly).
  • Your WhatsApp gateway provider’s SIP trunk address and TLS port (typically 5061).

Why Outbound Trunk — and why no transcoding?

An Outbound Trunk connection is the right type here because WhatsApp gateway providers typically route calls to a fixed SIP address without requiring a registration handshake. There is no REGISTER loop — the gateway knows where to send calls, and Siperb accepts them.

Transcoding is not needed because both sides of the call already speak the same language:

  • WhatsApp audio uses the Opus codec over SRTP.
  • Siperb (WebRTC) uses Opus over DTLS-SRTP.

Siperb’s proxy can bridge these two encrypted streams at the signalling layer without touching the media — the audio is never decoded and re-encoded. This preserves quality and, critically, maintains the end-to-end encryption of the call.

TLS is required for the SIP signalling leg. WhatsApp gateways will not accept unencrypted SIP. Make sure your connection uses TLS transport (port 5061) — not UDP or TCP.

Setting up the connection

In Siperb, open the Admin Control Panel and navigate to Connections → Add Connection. Select Outbound Trunk as the connection type.

Connection settings

FieldValue
Connection NameSomething recognisable — e.g. WhatsApp Calls
SIP Host / AddressYour gateway provider’s SIP address (e.g. sip.yourprovider.com)
Port5061
TransportTLS
TranscodingDisabled — do not enable this
Dial PatternSee below

Dial pattern for WhatsApp numbers

WhatsApp uses international E.164 format for all numbers — no leading zeros, country code first. A sensible starting pattern is:

^+?[1-9]d{6,14}$

This matches any international number from 7 to 15 digits. Adjust as needed if you want to restrict to specific country codes or number ranges.

If this connection sits alongside other connections (e.g. a connection to your PBX), set a Weight value to control priority. A higher weight means lower priority. Typically your PBX extension ranges have lower weights (higher priority), and a WhatsApp or PSTN trunk has a higher weight (acts as a fallback or catch-all).

Receiving inbound WhatsApp calls

Once the connection is saved, inbound calls from WhatsApp are delivered to your Siperb softphone exactly like any other call. You will see the caller’s WhatsApp number (in E.164 format) in the call display.

For inbound calls to arrive, your gateway provider must be configured to route calls to Siperb’s SBC address. Your provider will ask for a SIP destination — give them your Siperb SBC address and, if required, your Siperb account’s SIP identifier. These are available in the Admin Control Panel under Account → SIP Details.

Troubleshooting

If calls are not connecting, the most common causes are:

  • Wrong transport — confirm the connection is set to TLS, not UDP or TCP. The gateway will reject non-TLS connections silently.
  • Port mismatch — confirm your provider uses port 5061. Some providers use non-standard TLS ports.
  • Dial pattern not matching — if your softphone shows the call arriving but it is not routed through this connection, your dial pattern is too restrictive. Use SIP Trace Logs to inspect the INVITE and check the To/From headers.
  • Transcoding accidentally enabled — if you enabled transcoding, the audio may break or fail entirely. Disable it and re-test.

Use SIP Trace Logs (Admin Control Panel → SIP Trace) to watch the signalling in real time. You will see the INVITE arriving from your WhatsApp gateway and can confirm TLS handshake, codec negotiation, and call flow.

Summary

  • Connection type: Outbound Trunk
  • Transport: TLS on port 5061
  • Transcoding: off — Opus passes through natively
  • Inbound calls land on your Siperb softphone like any other call
  • Use SIP Trace Logs to diagnose any connection issues