2011-02-08 04:54:17     [Asterisk] File not processed

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-02-08 04:54:17     [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 97994   

Hello

 

I'd like to use a callfile to have the Asterisk telephony application make callbacks:

 

www.the-asterisk-book.com/unstable/call-file.html

 

Automated calls only require moving a small text file in a specific directory which Asterisk checks several times a second.

 

For some reason, the callfile works fine in Ubuntu but doesn't trigger any action when used on a uClinux-based appliance, although the required module is loaded.

 

Could there be some feature/limitation in uClinux that would prevent Asterisk from handling callfiles in that environment?

 

 

Thank you.

QuoteReplyEditDelete

 

 

2011-02-08 08:43:00     Re: [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 97997   

 

I notice that a callfile is handled only if I stop Asterisk, move the file to its ./outgoing/ directory, and then start Asterisk. It never works if I move the file while Asterisk is running.

 

I can't tell if it's an Asterisk issue or a uClinux issue.

QuoteReplyEditDelete

 

 

2011-02-08 10:16:10     Re: [Asterisk] File not processed

Mike Frysinger (UNITED STATES)

Message: 97998   

 

we havent done any asterisk development in a very long time.  you'll probably have better luck here:

  blackfin.uclinux.org/gf/project/asterisk/forums

QuoteReplyEditDelete

 

 

2011-02-08 10:33:48     Re: [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 97999   

 

Thanks Myke. I'll read the Makefiles that were used to compile uClinux and Asterisk, and see if I can find something that would explain this issue.

QuoteReplyEditDelete

 

 

2011-02-08 18:35:05     Re: [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 98002   

 

Someone in the uClinux mailing list mentionned the inotify feature. Could be that the uClinux running on the appliance doesn't support this, which would explain why Asterisk doesn't detect when a new file has been moved to the directory where callfiles must be put.

 

  blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=33403

QuoteReplyEditDelete

 

 

2011-02-08 23:06:22     Re: [Asterisk] File not processed

Mike Frysinger (UNITED STATES)

Message: 98003   

 

inotify should work fine on Blackfin systems, but only of course if it has been enabled in the kernel

QuoteReplyEditDelete

 

 

2011-02-09 07:11:56     Re: [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 98024   

 

What's puzzling, is that this option is selected when running "make menuconfig" in the uClinux-dist:

 

 

 

Linux Kernel Configuration

 

File systems

 

[*] Inotify file change notification support

 

[*]   Inotify support for userspace

 

[*] Dnotify support

 

Miscellaneous filesystems

 

<*> YAFFS2 file system support

 

 

 

I guess uClinux is OK and it's an issue with the Yaffs-based root filesystem and/or Asterisk on a uClinux OS.

QuoteReplyEditDelete

 

 

2011-02-09 07:41:30     Re: [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 98025   

 

I should have checked the archives here before going further:

 

  blackfin.uclinux.org/gf/project/asterisk/forum/?_forum_action=ForumMessageBrowse&thread_id=38960&action=ForumBrowse

 

So it looks like Asterisk requires fork() to handle call files, which would explain why nothing happens when moving a file in the outgoing/ directory.

 

I'll see if there's another to trigger a call from within Asterisk.

 

Thank you.

QuoteReplyEditDelete

 

 

2011-02-09 10:13:56     Re: [Asterisk] File not processed

Mike Frysinger (UNITED STATES)

Message: 98031   

 

if the code is simply forking to execute a program to play the sound, then it should be easy to change it to do a vfork/exec instead.  if asterisk is forking a child to play the sound itself, then that'll be a bit more difficult to change ...

QuoteReplyEditDelete

 

 

2011-02-11 06:15:49     Re: [Asterisk] File not processed

Gilles Ganault (FRANCE)

Message: 98091   

It appears that Asterisk's inability to run call files is not due to a use of fork() but rather to a bug in Yaffs2 that has been fixed in a more recente release of uClinux:

 

 

================

Newsgroups: gmane.linux.uclinux.devel

 

 

There was a bug with YAFFS2 not updating the timestamp on parent directories, which made Asterisk fail to pick up changes. It is fixed in yaffs2 CVS, to be exact:

 

 

yaffs2_guts.c (1.83.1.84)

yaffs2_fs.c (1.80)

 

 

This code basically introduces a function called UpdateParent(), to update the parent directory's timestamp, and call it in all appropriate places.

================

 

 

HTH,

Attachments

    Outcomes