Voicemail hanging up after 20 sec

Hello.

I am having an odd issue with the system, specifically the voicemail.

To add some context, this is a freepbx 17 system that has been up and running for about two months now with no big issues, lately one of the users told me that their voicemail only records 20 seconds of message.

This is a virtual extension for a service provided at a church, it’s only for voicemail purposes. The user is not onsite; they check the voicemail remotely.

I have checked their voicemail, and I can see a mix of messages, from 1 sec to more than a minute, but also I can see messages that last exactly 20 seconds and looks like the caller calls, the system picks and send to voicemail, the caller starts recording the message and after 20 seconds the call drops, according to the logs, the user hung up, but on the message you can clearly listen that they were in the middle of saying something when it happens.

I have tried multiple times with different phones/carriers and I can leave messages longer than 20 seconds.

not sure what this could be related to, and any help will be much appreciated

Thank you in advance.

In Settings>Asterisk SIP Settings try adjusting the rtp values to maybe something like this:

RTP Timeout
60
RTP Hold Timeout
300
RTP Keep Alive
15

See if that helps I feel like I experienced this before and this was the fix.

I did change the RTP keep alive to 10 a couple of days ago and still had the problem.

will try again with your suggestion and see what happens.

Thanks

unfortunately, changing the RTP settings did not make any difference, I still receive messages today that are being cut at 20 sec. Any other idea what might be causing this odd behavior?

I know you mentioned, that the user has some voicemails longer than 20 seconds, to confirm are these maybe “internal” calls vs external?

Another thought goes to setting>voicemail admin, then Then settings>limits . what do your settings in there look like?

Also what does your overall setup look like? Is it a physical machine on premise behind a firewall.

its incoming calls only (external calls) and after checking is not related to one specific voicemail, I have checked and a couple of users have been affected the same way, they might have messages in their voicemail boxes and a couple of them are 20 secs and after listening to them they are being cut in the middle of the caller leaving a message.

I have played with the VM settings changing the values and the results were the same, below are the current settings. I have decreased the silence threshold but did not make any difference before

the PBX is a virtual machine on a proxmox host behind a Meraki firewall (MX95), sip provider is crearly ip and ISP is comcast/xfinity.

I’m not terribly familiar with Meraki’s Firewall, but I would recommend making sure you have UDP timeout of 300 second or more, as well as maybe seeing if there is a consistent NAT setting. Also if it has a SIP ALG setting having that off for most routers is best.

Will play with the Meraki settings tonight and check tomorrow…

Thanks

After playing with the Meraki settings which are not much (checking NAT settings, port forwarding traffic shaping) and increasing again the RTP times, I’m still having the problem. As I mention before is not happening for all the callers and it happens at different times and for different extensions/VM’s.

here are some logs from last week for a VM only extension

freepbxvmissue - Pastebin.com

Any help will be much appreciated.

Thanks

That just shows the call traversing the dialplan in Asterisk. It doesn’t show the SIP messages during the call. There could be a re-INVITE that isn’t be responded to or something else happening with the signalling or RTP that is causing this.

We need a proper PCAP of a call that is ending early when leaving voicemails.

Will try to put something in place to capture the packets since is happening for random callers and at random times. I will post it when I have it ready.

Thanks

As root, run a command like this to capture all SIP and RTP:

tcpdump -s 0 -C 100 -W 100 -w rbuf -Z root &

This writes a ring buffer of 100 files of 100MB each (rbuf00, rbuf01, …, rbuf99). (Be sure you have 10 GB available disk space.)

When a false hangup is reported, before the buffer gets overwritten, find the file with the bad call (look at times last modified), copy it to your PC and analyze with Wireshark. (Also save the previous one, in case the call overlapped two files.)

Thanks. Will post again whenever I have the information/file.

I left collecting data and I had an event today. I am collecting UDP traffic, so I have the SIP information as well the RTP information on the dump file. I am not very familiar with Wireshark, but I was able to extract information for 3 events that happened today for the same caller. This particular caller called several times, and every single time was the same problem. This will be an extract of 3 calls, but I have a bigger file with more information if needed.

export.tgz (1.8 MB)

Thanks in advance

For the first one, the call is ended by the caller; the caller is using different SIP and RTP addresses (possibly reselling a higher level service and passing RTP directly to them); and the capture contains no RTCP.

They report an RTP Timeout as the reason for ending the call.

Reason: SIP;cause=200;text=“RTP Timeout”
Reason protocols: SIP
Cause: OK (200)
Text: RTP Timeout

It looks like you have sent about 20 seconds less RTP than they have, so the problem might be that nothing is being sent whilst the message is being captured.

I’m not sure how Asterisk handles the reverse direction whilst capturing voice mail. I would have hoped that it, at least, sent RTCP.

You stop sending RTP and 16:29:20, and they kill the call about 21 seconds later. What happened in the 50 seconds, between their DTMF digit and the start of the 20 second timeout?

Confirm that in /etc/asterisk/asterisk.conf, under options, you have

transmit_silence_during_record=yes

That’s been the default for ages, but it may have been turned off to solve another issue.

The call comes to an IVR they press a number and goes to an announcement which is around 47 seconds after that goes straight to voicemail with no voicemail message.

This is a specific case for this extension voicemail, but I have had the same behavior for different extensions that are actual phones. Like I mentioned before, it does not happen all the time, the same extension showing this behavior had messages longer than a minute and it only happens for voicemail.

well…. looks like is commented on this version, actually all the options are commented.

They used to be active by default on previous versions and is called different now

;transmit_silence = yes	

will change and report.

Thanks.

From an Asterisk perspective it has never been default enabled, due to requiring transcoding to occur in order to provide silence.

The “transmit_silence_during_record” name does still work, as does “transmit_silence”.

First just want to clarify that this isn’t a voicemail problem, this is a call handling problem. You think it’s only happening with voicemail but that is baloney since you said the line is only for voicemail and the user is not onsite - so without onsite users you can’t say the problem is voicemail. If you were to spend a couple days at the church office answering calls on a real phone I would bet this would happen a lot, there.

Secondly none of the transmit silence stuff applies since you said some voicemails indicate the caller was cut off in the middle of saying something.

I had EXACTLY the same issue just recently.

FreePBX 17 system setup with around 80 deskphones and several trunks registered into it.

Latest FreePBX17 loaded from updates.

Calls from deskphone to deskphone or deskphone to trunk worked no problem.

Calls from both the Linphone and MicroSIP softphones either outgoing to other deskphones or PSTN or incoming from deskphones or PSTN to the softphone - disconnected after 20 seconds.

Tried all kinds of nonsense with Settings→Asterisk SIP settings with rtp timeout values - no fix.

Finally discovered blanking out the IP address in Settings→Asterisk SIP Settings →External Address, fixed the problem.

This problem DOES NOT happen on my test FreePBX system that’s running an un-updated version of Asterisk.

It’s clearly a bug introduced in the latest Asterisk update. What is going on here is the softphones are basically establishing a call with turning on some sort of config in SIP that helps with SIP going through a NAT. Your SIP trunk/trunks are likely doing the same. With the deskphones, there’s a knob in the configuration (I’m running Cisco 3PCC and Cisco Enterprise desk phones) to turn off NAT - with the softphones, there is not and you probably don’t have much control over what your trunk provider does, either. The PBX is smart enough to look at the source IP from the softphone, see that it’s in the list of local networks, and know the softphone is not behind a translator. The free Linphone and Microsip phones are KISS software so you don’t get this - KISS stuff often makes wrong assumptions - and it is screwing something up.

I can’t be producing packet traces and filing bug reports by breaking my production system to make them so I have not put time into investigating this yet.

My suggestion is you try the following:

apt-update everything at the commandline

test and see if it is still breaking

If still breaking, backrev to an older Asterisk version at the command line and test again.

asterisk-version-switch