Sound delay receiving call sipml5

I have this system:
(1) Pjsip phone
(2) Sipml5 phone running on windows and linux
(3) Sipml5 phone running on android
(4) Asterisk server

(4) is on an AWS machine. All clients are connected to (4) via vpn. All clients are registered: (1) transport udp, (2) and (3) transport ws. Instant answer is a requeriment.

The problem is when i make a call from (1) or (2) to (3) it has ~2-3 seconds sound delay, but when i make a call from (1) to (2) it seems all ok. PJSIP.conf is the same for (2) and (3).

I have checked RTP protocol, STUN and SDP trace. RTP debug shows, until ICE completition, sound go to wrong address (SDP c=IPV4 wrong address).

I have tried this recommendations
SIP and RTP Routing - From Asterisk
Forum post: Delay in receiving the call
Forum post: WEBRTC 1 to 4 seconds delay

but none works for me. Any advice?

Thanks in advance.

Probably it’s not related to Asterisk Itself.
Collect SIP transactions and check if Android are responding INVITE in ms time.Normally apps watch for pushed transactions at time frames but we desires that to be on realtime. One thing you can check at Android are view app battery permission to enable “Allow background activity” but even with that enabled you can not solve your issue.

1 Like

Sorry for my late reply. I have done more tests. Maybe you can figure out what it is happening because i couldn´t:
Same scenario call from (2) to (3). (2) and (3) are in the same network. (4) is outside.

PJSIP History:

00	<==	INVITE
01	==>	401 Unauthorized
02	<==	ACK
03	<==	INVITE
04	==>	100 Trying
05	==>	INVITE sips:3@my-network-public-ip:port
06	<==	100 Trying (sent from the Transaction Layer)
07	<==	180 Ringing
08	==>	200 OK
09	<==	ACK sips:my-server-private-ip:websocket-port
10	<==	200 OK
11	==>	ACK sips:3@my-network-public-ip:port
12	<==	BYE sips:my-server-private-ip:websocket-port
13	==>	200 OK
14	==>	BYE sips:3@my-network-public-ip:port
15	<==	200 OK

Why is Trying from transaction layer? I think the reason is rtcp_mux but then: Why is it sent 100 “normal” trying if it is websocket since beginning?

Another question that is playing around my mind: Could it be that i have the same problem on pc but i have more resources and it is undetectable? How can i be sure about it?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.