Outgoing calls: delay in 1-2 seconds before the other side can hear the caller

Hello, everybody.
When I make outbound calls, subscribers can hear me in 1-2 seconds, although I hear them immediately at the start of the call. How can I correct this?
I call from softphone, which is on the corporate network, but the asterisk is connected to PSTN with another network interface.

You might need to play around with the “Early Media” options on the outbound leg.

Where are these options?

In your outbound trunk settings.

IIn trunk’s advanced settings in the FreePBX interface? I am sorry, cannot find anything related to outbound early media. What are the names of the options? If I print pjsip show endpoint … from the console, I do not see any options specifically related to outbound early media setting.

I don’t use PJ-SIP very often and once I get it set up, I’m usually happy with it. From the sound of your description, it appears that your RTP session going out isn’t getting set early. This could a problem at the remote end (if it’s only happening in one place) or it could be a firewall setting on your end, where (for example) the path through your NAT router doesn’t get established until there’s something to send.

There are a few that pop out. Here’s the full list of PJ-SIP options in Asterisk 16 - most of them probably apply to other versions as well:


Look at “notify_early_inuse_ringing” (which will get the RTP session from your end going a little earlier.
“follow_early_media_fork” might do some interesting things as well.

One of these (or some of the other RTP options) might trigger the proper path through the RTP session and get the link establishes earlier. It could also be a problem with your NAT router not forwarding packets until the outbound path is otherwise established.

Another trick you could try would be to send a ring tone with your call. That could fake the NAT out enough that the path gets established early and your delay is gone.

On other words, there is no single setting that’s going to solve this for you. Let me say that different - there is a single setting, but no one knows which one it will be.

If you want to try to debug the problem, you can use the debugging syntax in “asterisk -vr” (log in on the console or through SSH) for PJ-SIP - “PJSIP DEBUG ON” maybe? - like I said, I don’t really delve deep into PJ-SIP a lot, and when I do, I just look everything up.

I have turned off call recording, and delays became insignificant (or gone completele, I do not know exactly). But the question is, how to eliminate these lags and retain recording.

Are you using WebRTC softphone with ICE servers?

I am using Phoner Lite on my PC. I have turned off WebRTC support.

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