Loop when the call is not answered by the extension

Hi,

I’m experiencing this error with the rc1 release.

When I call from any extension to another one and the called extension does not have voicemail asterisk makes a loop that increase the cpu usage and the /var/log/asterisk/full file (95GB was the last size).

I need to restart asterisk to stop the loop.

This is one portion of the log:

[code][Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – <Local/#@from-internal-cb3d,2> Playing ‘dir-intro’ (language ‘en’)
[Aug 21 13:25:26] VERBOSE[26861] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame
[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame

[/code]

These lines are repeating and repeating until the log reaches the free space of my hd.

ls -alh /var/log/asterisk/full -rw-rw-r-- 1 asterisk asterisk 35G Aug 24 21:22 /var/log/asterisk/full

Any one have the same issue? How can I fix it?

The problem can be reproduced when the called extension does not respond the call and don’t have voicemail enabled.

Any help will be very appreciated.

Regards,

To solve it I hat to use on /etc/asterisk/modules.conf :

noload => app_directory.so

Regards,

Only the good die young

[Aug 21 13:25:26] WARNING[26861] file.c: Failed to write frame

(a lot of these)

maybe some kind of permissions problem?

I don’t know whether my cause is the same, but I am having the EXACT same symptoms. And example of my repeated log lines is:

[Jul 24 09:11:47] VERBOSE[12456] logger.c: – <Local/[email protected],2> Playing ‘dir-intro’ (language ‘en’)
[Jul 24 09:11:47] VERBOSE[12456] logger.c: – Playing ‘dir-nomatch’ (escape_digits=) (sample_offset 0)
[Jul 24 09:11:47] WARNING[12456] file.c: Failed to write frame
[Jul 24 09:11:47] WARNING[12456] file.c: Failed to write frame

This is from the last instance. I’ll have these lines in my log up to 20 times per second. And they never stop until my hard disk is full, or until asterisk gets restarted.

I don’t know exactly what is causing my issue. I just tried to reproduce it using your method of calling an extension that doesn’t have voicemail and not answering the call. This is not bringing the problem back.

I did update many of the FreePBX modules Friday, so it is possible that this issue was resolved by the update. But I can’t say for sure yet. I’ll be setting up some monitoring of my log file size & disk space so that if it happens again, I can crank the debugging & verbosity up all the way to see if it yields more info.

Until then, I hope that if anyone reading this knows the solution that you will post it.

I guess I could disable the app_directory module as shown above, but I’d really like to get to the bottom of the issue.

Thanks,

Doug

Has anyone come up with a solution that doesn’t involve disabling the directory?

I haven’t had the problem return for 4 months now. I do think that it was fixed by running all of the FreePBX updates that were available at the time (other than betas).

:frowning:

Check that /var/www/html/admin/modules/pbdirectory/sounds have the correct permissions, 775 (not 755), then check that /var/www/html/admin/modules/pbdirectory/sounds/pbdirectory also is set to 775.

If those permissions are not correct you will get the loop.

Please check that and report the outcome.

Here’s what I have under /var/www/html/admin/modules:

ls /var/www/html/admin/modules
announcement callforward conferences customappsreg daynight featurecodeadmin framework infoservices languages music parking queues remove.sh status.sh update.sh
_cache callwaiting core dashboard donotdisturb findmefollow import.sh ivr modlist.sh paging printextensions recordings ringgroups timeconditions voicemail

I don’t find anything on the system by the name “pbdirectory”

“locate pbdirectory” returns nothing

Any more advice?

Thanks.

if it’s coming form app_directory I don’t think it can be from FreePBX.

We do not use app_directory in FreePBX anywhere. Have a look at extensions.class.php, there is no extension class that can even create the directory application.

In any event, from the trace provided, this looks clearly like an Asterisk related issue, such an error is at the Asterisk level, not the dialplan level or you would see instructions looping.

OK. Thanks for the info. I’ll submit this to the asterisk-users mailing list and see what they say.

Thanks!