5s Delays Before Executing The Dialplan

Home » Asterisk Users » 5s Delays Before Executing The Dialplan
Asterisk Users 3 Comments

Hi,

We’ve recently hit an issue with Asterisk 18.8.0 where a call comes in via SIP (using pjsip) but it can take 5 seconds before starting to execute the dialplan.

This was intermittent, but frequent (eg approx half of the calls).

We have verbose logging on, but I didn’t see any errors.

Running asterisk -r -vvvv and then watching SIP traffic in another window showed the INVITE coming in, then a good 5 seconds before dialplan execution started showing within the Asterisk console.

We’ve never seen this before, but it affected 6 our of 8 of our Asterisk servers. They’re running in debian 11 VMS, with the VMs running under KVM on the host OS which is also debian 11.

Any suggestions where to look next? We’ve been running Asterisk for years but never seen this issue before.

FWIW, the match= lines for the SIP proxies sending to Asterisk are configured by IPv4 address, not host name.

Cheers, Kingsley.

3 thoughts on - 5s Delays Before Executing The Dialplan

  • Is the local hostname configured in /etc/hosts and not reliant on an outside DNS server? Are you using ICE or STUN at all?

  • Hi,

    thanks for responding.

    No ICE or STUN.

    Some of the servers have entries for themselves in /etc/hosts and some rely on external DNS. That is not by design, it’s just how it happened and I shall sort that out.

    I can’t figure out how whether the delays were on only the ones without
    /etc/hosts entries, but I can be sure that some without those entries definitely did experience those delays.

    Does 5 seconds match some sort of DNS timeout within Asterisk that could have been the cause?

    Cheers, Kingsley.

  • Within Asterisk, no. It uses system level stuff to do the DNS resolution, that has its own timeouts that Asterisk doesn’t control.