Skip to content

Audio not received from WhatsApp WebRTC INVITE via external profile #2904

@vnQ-coder

Description

@vnQ-coder

Description
When receiving a SIP/SDES WebRTC INVITE from WhatsApp, FreeSWITCH answers the call, but no audio is audible. Softphone calls work correctly with the same IVR, codecs, and dialplan.

Steps to Reproduce

Configure FreeSWITCH external profile with a public IP.

Receive SIP INVITE from WhatsApp WebRTC endpoint.

Call is answered, but audio from WhatsApp → FreeSWITCH is silent.

Logs show STUN role warnings:

switch_rtp.c:1047 sofia/external/[email protected] got audio stun binding response 487
switch_rtp.c:1055 audio STUN Changing role to CONTROLLING

Current Profile Configuration

SDP Offer from WhatsApp

v=0
o=- 1756796996455 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS 615fc575-4123-4434-8cd2-af31a2ecf0e7
a=ice-lite
m=audio 3484 UDP/TLS/RTP/SAVPF 111 126
c=IN IP4 157.240.227.51
a=rtpmap:111 opus/48000/2
a=fmtp:111 maxaveragebitrate=20000;maxplaybackrate=16000;minptime=20;sprop-maxcapturerate=16000;useinbandfec=1
a=rtpmap:126 telephone-event/8000
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1071287312 1 udp 2122260223 157.240.227.51 3484 typ host generation 0 network-cost 50
a=ice-ufrag:xvHbQrdjBJChfCKq
a=ice-pwd:w76mjojNhCCjdeNRVlrTpQ==
a=fingerprint:sha-256 9A:AF:2D:81:E9:25:B7:68:21:29:F1:52:DA:37:1F:89:68:82:BD:DA:0A:EC:81:14:6A:30:C2:40:47:5B:13:DC
a=setup:actpass
a=mid:audio
a=msid:615fc575-4123-4434-8cd2-af31a2ecf0e7 WhatsAppTrack1
a=rtcp-mux
a=rtcp-fb:111 transport-cc
a=maxptime:20
a=ptime:20
a=ssrc:1185525788 cname:WhatsAppAudioStream1

FreeSWITCH SDP Answer

v=0
o=FreeSWITCH 1756790003 1756790004 IN IP4 15.185.161.128
s=FreeSWITCH
c=IN IP4 15.185.161.128
t=0 0
a=msid-semantic: WMS r43lYlc596dUlFhtQQhYhPg75IaRm7qb
m=audio 17354 UDP/TLS/RTP/SAVPF 111 126
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1; minptime=20
a=rtpmap:126 telephone-event/8000
a=ptime:20
a=sendrecv
a=fingerprint:sha-256 D7:AB:09:CE:ED:14:F2:14:1B:0C:1E:51:E6:56:6A:F7:7A:98:6C:E0:24:C9:44:01:29:85:23:51:7D:44:EB:6C
a=setup:active
a=rtcp-mux
a=rtcp:17354 IN IP4 15.185.161.128
a=ice-ufrag:y8Zdc15BPvQQUiRG
a=ice-pwd:fTYey9Tx5VBkZFwWpXaz8h1K
a=candidate:3655409713 1 udp 2130706431 15.185.161.128 17354 typ host generation 0
a=end-of-candidates

Observations

Softphone calls work perfectly with the same IVR.

WhatsApp WebRTC calls: FreeSWITCH answers, but audio is silent.

Logs indicate STUN role conflict (487 binding response).

UDP connectivity tested; ports are reachable.

Expected Behavior

FreeSWITCH should complete ICE/DTLS negotiation and audio should flow from WhatsApp to FreeSWITCH.

Environment

FreeSWITCH version: <YOUR_VERSION>

OS: <YOUR_OS>

Public IP: 15.185.161.128

WebRTC client: WhatsApp Web / WhatsApp API SIP INVITE

Attachments / Logs

SDP offer & answer included above.

STUN logs:

switch_rtp.c:1047 sofia/external/[email protected] got audio stun binding response 487
switch_rtp.c:1055 audio STUN Changing role to CONTROLLING

Additional Notes

Tried both ice-lite=true and without; no change.

Public IP is used directly; firewall allows RTP ports.

Opus codec loaded.

Request

Guidance on FreeSWITCH configuration to correctly handle WhatsApp WebRTC / SDES audio.

Possible bug in handling ICE-lite / DTLS / SDES from WhatsApp.

Labels: bug, WebRTC, ice-lite, external profile, audio

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions