What your platform provides
What your platform receives
Each call arrives as a SIP INVITE with an SDP offer.What your platform must do
1
Answer the call
Reply with 180 Ringing if you like, then 200 OK with an SDP answer that picks one of your accepted codecs.
2
Send audio first
Start sending audio as soon as you answer: a greeting, music, or silence. WhatsApp waits for the
business side to send first. A platform that only listens produces a silent call.
3
Send and receive on the addresses in the SDP
Use the audio address and port in the gateway’s SDP. Send your audio from the same address and port
you advertise.
4
End the call with BYE
Either side may send BYE. The gateway closes both legs.
Routing options
Choose how the gateway addresses your trunk. This is set per trunk.Failover and fallback
You can attach more than one trunk to a number, for example your main platform, then a backup agent or a human queue. The gateway tries them in priority order and moves to the next trunk when:- the trunk gives no response within the failover time,
- the trunk answers with a server error (5xx),
- the trunk rings but does not answer within its ring limit, or
- the trunk rejects the call as busy, unavailable or declined (480, 486, 600 or 603), if you turned on try the next trunk for that trunk.
The ring limit starts when your platform replies Ringing. Until then, the failover time applies. When the limit
passes, the gateway cancels the call to that trunk and sends it to the next one, so your platform sees a normal
CANCEL.
During the call
- Re-INVITE (for example hold and resume) is passed through.
- Transfers should be done inside your platform. The gateway does not transfer calls on to other WhatsApp numbers.
- Keypad tones (DTMF) arrive as standard RFC 4733 telephone-events. See Protocols and media.

