I run an Asterisk 16 installation and a WebPhone based on SIP.js. Unfortunately, I often don't hear the first few seconds when I call someone. But everything is fine with incoming calls.
The Asterisk is in a data center, the browser / client is behind NAT.
Log (see the delay between seconds 11 to 13)
[Nov 2 17:58:11] VERBOSE[15217][C-00000002] app_dial.c: PJSIP/hativ-voip-00000003 answered PJSIP/hativ-00000002
[Nov 2 17:58:11] VERBOSE[15226][C-00000002] bridge_channel.c: Channel PJSIP/hativ-voip-00000003 joined 'simple_bridge' basic-bridge <80f71862-7910-4363-97e4-8d8a9e98765f>
[Nov 2 17:58:11] VERBOSE[15217][C-00000002] bridge_channel.c: Channel PJSIP/hativ-00000002 joined 'simple_bridge' basic-bridge <80f71862-7910-4363-97e4-8d8a9e98765f>
[Nov 2 17:58:13] VERBOSE[15217][C-00000002] res_rtp_asterisk.c: 0x7f05cc0773a0 -- Strict RTP qualifying stream type: audio
[Nov 2 17:58:13] VERBOSE[15217][C-00000002] res_rtp_asterisk.c: 0x7f05cc0773a0 -- Strict RTP switching source address to 91.67.195.16:58920
[Nov 2 17:58:13] VERBOSE[15217][C-00000002] res_rtp_asterisk.c: 0x7f05cc0773a0 -- Strict RTP learning complete - Locking on source address 91.67.195.16:58920
[Nov 2 17:58:13] VERBOSE[15226][C-00000002] res_rtp_asterisk.c: 0x7f05cc0860d0 -- Strict RTP switching to RTP target address 212.117.203.158:32406 as source
[Nov 2 17:58:13] VERBOSE[15226][C-00000002] res_rtp_asterisk.c: 0x7f05cc0860d0 -- Strict RTP learning complete - Locking on source address 212.117.203.158:32406
Endpoint configuration for Asterisk account (used to connect to Asterisk):
type=endpoint
dtls_ca_file=/etc/asterisk/certificates/chain.pem
dtls_cert_file=/etc/asterisk/certificates/cert.pem
dtls_private_key=/etc/asterisk/certificates/privkey.pem
direct_media=no
force_rport=yes
rtp_ipv6=yes
rtp_symmetric=yes
; Sets dtls_setup=actpass, dtls_verify=fingerprint, ice_support=yes, media_encryption=dtls, media_use_received_transport=yes, rtcp_mux=yes, use_avpf=yes
webrtc=yes
disallow=all
allow=opus
allow=alaw
allow=ulaw
Endpoint configuration for SIP-Account (used to connect to SIP provider):
type=endpoint
context=incoming
dtmf_mode=rfc4733
force_rport=yes
language=de
rewrite_contact=yes
rtp_symmetric=yes
timers=yes
from_domain=example.com
disallow=all
allow=alaw
Does anyone have a idea what could be causing the delay?