Outgoing call, 9 second delay

Hey,

I work in IT and wanted to do a project at home where I convert my analogue landline to VOIP. I have successfully managed to get most of this working but currently have two issues. One issue I have already created a topic about, but the other issue is where there is some strange delay on outgoing calls.

I have a Grandstream HT813, that is connected to my PSTN line on the FXO port. I then have a trunk and an outbound route on FreePBX that routes outgoing calls to the HT813. This works quite well but there is a strange delay with audio. If I place a VOIP call, say I call 91471. The FXO port opens on the HT813, but it takes 9 seconds before audio is heard from the IP phone. So, the call is in progress, but it takes 9 seconds for audio to be picked up, so the first 9 seconds of outgoing calls are missed.

I am not sure if this is a routing issue. If I use an analogue phone on the FXS port, I do not get this strange delay, so I am assuming something is not set correctly on my install of FreePBX.

I would appreciate any advice that could be given!

Cheers,
Richie

My guess would be that you have a DNS request timing out, but really, without logs, of the SIP and probably the RTP, this can only be a guess.

I have tried setting everything to IP addresses, assuming that this would rule out any DNS resolution issues, but the problem is still occurring. I have captured the log from when I placed a call to 91471 from an IP phone, to where I ended the call.

Line “6835 [2022-12-26 17:06:19] VERBOSE[20588][C-0000034f] bridge_channel.c: Channel PJSIP/0001-00000d2f left ‘simple_bridge’ basic-bridge ” is when I could first hear audio from the IP phone.






That’s when the audio should have ceased!

Reverse lookups may still be made.

You need to turn on protocol debugging (CLI: pjsip set logger on). Also it is much easier to work with plain text (post to pastebin.freepbx.org and post the unique part of the URI, if you are not allowed to paste it all.

Thank you again for all of your help, I really appreciate it. I have enabled pjsip logging and copied the log over to pastebin - https://pastebin.freepbx.org/view/e4079f21.

The delay in getting back RINGING is outside Asterisk, as the Trying came back quickly and would be subject to similar delays in Asterisk. Up to 8 seconds at this point.

The caller is a bit sluggish responding. They see and OK and its retransmission before sending ACK (duplicated for the retransmission). That suggests possible network issues. However, we are only 9 seconds in at this point, so the extra delay is small.

The caller ends the call 14 seconds after that.

The HT813 is going to have to wait for dial tone (either enough to detect, or a fixed amount of time, actually send the digits, wait for enough ringback tone to detect it (unless everything else is being faked), and wait for a long enough lack of ringback tone to recognize the call has been answered (unless it can use line reversal supervision, there seems to be an option to support this, but as it says in the admin guide, the other side must do so as well). I’m assuming it isn’t set to pulse dial, which will take even longer.

I’m not sure if the HT813 dialplan is used, but it may need to be told that 1471 is short.

If 1471 is who called me, there may not actually be any ring back or answer supervision, so these may be being faked (it may all be done as early media).

Thank you so much, again, for your help! Going by your advice, I have managed to resolve this delay issue, although I am not entirely sure what setting actually fixed it. I tried changing different values on the HT813 and ended up just changing all of the ones in the screenshot to the lowest supported value and that somehow resolved the problem. I already had wait for dial-tone enabled but I tried disabling this but it made no difference.

image

IMO, none of the Channel Dialing parameters were responsible for your long delay; you likely changed something else to fix the problem.

However, IMO you should change both DTMF from 40 to 60; otherwise any noise on the analogue line will cause a digit to not be heard.

Also, set the digit timeouts back to their default values. They only affect the FXS port and determine how long it waits for the user to press another key.

Then, once you fix the pjsip settings as outlined in your other thread, with luck both FXS and FXO should work properly.

Hi Stewart,

Thank you for getting back to me. It’s really strange, I changed the settings back but the call delay returned. I then changed each setting one by one and it turned out that “DTMF Dial Pause (ms)” is the setting that is causing the delay. If I set this to 40, there is no delay but if I change it to 60, the delay returns.

This is what I have now:
image

Cheers,
Richie

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