I’m integrating Asterisk 20.8.1 with WhatsApp Cloud API SIP calling.
The call flow and SIP/TLS handshake succeed, Playback(demo-congrats) executes, and RTP packets are sent from Asterisk to Meta IPs.
However, no audio is heard on the WhatsApp side.
pjsip show channelstats shows RTP transmit counts increasing, but receive counts stay at 0.
No SRTP errors are logged.
From WhatsApp’s INVITE SDP:
m=audio 3484 RTP/SAVP 111 126
a=rtpmap:111 opus/48000/2
a=fmtp:111 maxplaybackrate=16000;sprop-maxcapturerate=16000;maxaveragebitrate=20000
jcolp
September 2, 2025, 12:36pm
2
You should actually show the complete SIP trace and Asterisk console output.
Thanks for the reply @jcolp
estvita
September 4, 2025, 9:37am
4
hi, here is a working asterisk config for working with whatsapp
```
pjsip.transports.conf
[0.0.0.0-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
external_media_address=123.123.123.123
external_signaling_address=123.123.123.123
ca_list_file=/etc/ssl/certs/ca-certificates.crt
cert_file=/etc/asterisk/keys/example.com-fullchain.crt
priv_key_file=/etc/asterisk/keys/example.com.key
method=tlsv1_2
verify_client=no
verify_server=no
allow_reload=no
tos=cs3
cos=3
local_net=10.8.0.0/24
pjsip.conf
[wa.meta.vc]
type=aor
qualify_frequency=60
contact=sip:wa.meta.vc
[wa.meta.vc]
type=endpoint
transport=0.0.0.0-tls
context=from-meta
disallow=all
allow=opus
aors=wa.meta.vc
send_connected_line=no
rtp_keepalive=0
language=en
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
media_encryption=sdes
rtp_symmetric=yes
dtmf_mode=auto
[wa.meta.vc]
type=identify
endpoint=wa.meta.vc
match=69.171.224.0/19
```
to get all whatsapp api addresses
whois -h whois.radb.net – ‘-i origin AS32934’ | grep ^route: | awk ‘{print $2}’ | grep -v “:” | sort -u
As whatsapp opus as audio codec you need to enable it in asterisk as well and recompile it
system
Closed
October 9, 2025, 10:21am
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.