Originate to client 1(channel 1) outside Stasis (app => nameApp).
If client answer:
Create a bridge ( 'type' => 'mixing')
Ring to channel 1
Create channel 2 (client 2)
Add both channels to the bridge
Dial to channel 2
If client 2 answer - start recording bridge (format ogg)
Both clients use mobile phones. The asterisk serves as a connector for clients. The endpoint for both calls is the same trunk.
But when the second client answers the call and traffic is being transmitted, a voice delay of 1-2 seconds is noticed.
If you call outside of Stasis, then there will be no voice delay. Help me find the reason please. Sorry for the bad translation. Asterisk.txt (666.9 KB)
From what I can tell media is forwarding as soon as it is received. Have you done a packet capture to actually look at what is being received and sent?
tcpdump or wireshark (I think most people use tcpdump on Linux and run wireshark on the result on Windows, but wireshark can be installed on Linux, if you have X, although generally it is a bad idea to run X on a real time system, like Asterisk.
People also seem to use sngrep, which appears to come with standard FreePBX installations, so is often used by FreePBX users. However, I haven’t used it myself, so cannot say whether it is the right tool here.
More generally though, you may need to make captures at other points in the network, and that will depend on the capabilities of the various network components. It is, however, something that any network administrator needs to learn.
If you’re using VoIP, you should learn how to analyze this yourself. In wireshark if you open a capture you can listen to the audio and see if there actually is a delay introduced by Asterisk.
We do not use VoIP. But why is there no delay in the dialplan, but in stasis there is a delay of 1-2 seconds? The configurations are applied to all parameters.