[Home]

Summary:ASTERISK-16608: [patch] Call file errors in Asterisk 1.8beta
Reporter:Michael Keuter (mkeuter)Labels:
Date Opened:2010-08-29 07:29:54Date Closed:2010-10-05 15:19:40
Priority:MajorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_spool
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.8-bugid17924.patch
Description:While testing with 1.8beta, I always get the following errors, when I try to use a call file:

Aug 28 14:29:28 alix local0.warn asterisk[18174]: WARNING[18213]: pbx_spool.c:250 in apply_outgoing: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/sample.call

Aug 28 14:29:28 alix local0.warn asterisk[18174]: WARNING[18213]: pbx_spool.c:407 in scan_service: Invalid file contents in /var/spool/asterisk/outgoing/sample.call, deleting

****** ADDITIONAL INFORMATION ******

It doesn't matter, what's in the call file, the errors are always the same (this was only an example with the sample.call). I tried 1.8beta4 and 1.8-svn-r283958.

The same call files work fine on 1.4.35 or 1.6.2.11 (or throw the appropriate errors in case of the sample.call).

Was there a change in using call files in 1.8?
Comments:By: Brett Bryant (bbryant) 2010-08-30 15:35:17

mkeuter, are you moving the call file from the same filesystem as /var/spool/asterisk/outgoing, and using mv and not cp?

By: Michael Keuter (mkeuter) 2010-08-30 16:05:34

Yes exactly, I first copied it to /tmp, then moved it to ../outgoing. Do have the same error?

By: Brett Bryant (bbryant) 2010-09-03 12:16:09

mkeuter, can you post the contents of /etc/mtab ?

By: Tilghman Lesher (tilghman) 2010-09-03 13:06:00

mkeuter:  could you test the patch in related issue ASTERISK-16097 please?

By: Michael Keuter (mkeuter) 2010-09-03 16:46:34

@bbryant: this in on Astlinux (uclibc crosscompiled)

cat /etc/mtab
rootfs / rootfs rw 0 0
/dev/root /oldroot ext2 rw 0 0
/dev/hda2 /oldroot/mnt/asturw ext2 rw,noatime,errors=continue 0 0
none /oldroot/mnt/asturo tmpfs ro,size=131072k 0 0
none / unionfs rw,dirs=/oldroot/mnt/asturw=rw:/oldroot/mnt/asturo=ro 0 0
none /proc proc rw 0 0
none /dev tmpfs rw,size=200k 0 0
none /var tmpfs rw,size=5000k 0 0
none /tmp tmpfs rw,size=10000k 0 0
none /sys sysfs rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /dev/pts devpts rw,mode=600 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda3 /mnt/kd ext2 rw,noatime,errors=continue 0 0
/dev/hda1 /oldroot/cdrom vfat ro,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

By: Michael Keuter (mkeuter) 2010-09-03 17:14:45

@tilghman: yes, the patch from issue 017337 fixes the issue for me. Thanks for the hint.

By: Digium Subversion (svnbot) 2010-09-07 16:20:19

Repository: asterisk
Revision: 285386

U   branches/1.8/pbx/pbx_spool.c

------------------------------------------------------------------------
r285386 | tilghman | 2010-09-07 16:20:17 -0500 (Tue, 07 Sep 2010) | 13 lines

Don't notify on attribute changes, and change how the queuing mechanism works.

Fixes call spools in 1.8.

(closes issue ASTERISK-16097)
Reported by: loloski
Patches:
      20100827__issue17337.diff.txt uploaded by tilghman (license 14)

(closes issue ASTERISK-16608)
Reported by: mkeuter
Tested by: mkeuter

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=285386

By: Digium Subversion (svnbot) 2010-09-07 16:21:02

Repository: asterisk
Revision: 285390

_U  trunk/
U   trunk/pbx/pbx_spool.c

------------------------------------------------------------------------
r285390 | tilghman | 2010-09-07 16:21:01 -0500 (Tue, 07 Sep 2010) | 20 lines

Merged revisions 285386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r285386 | tilghman | 2010-09-07 16:20:16 -0500 (Tue, 07 Sep 2010) | 13 lines
 
 Don't notify on attribute changes, and change how the queuing mechanism works.
 
 Fixes call spools in 1.8.
 
 (closes issue ASTERISK-16097)
  Reported by: loloski
  Patches:
        20100827__issue17337.diff.txt uploaded by tilghman (license 14)
 
 (closes issue ASTERISK-16608)
  Reported by: mkeuter
  Tested by: mkeuter
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=285390

By: Michael Keuter (mkeuter) 2010-09-09 03:58:16

Sorry to say, but it doesn't work for me with r285386, where the fix is included. I get the same errors as before (only one line number is different).

The last version that worked was r284702 (plus the patch from 17337):

Connected to Asterisk SVN-trunk-r284702 currently running on alix (pid = 1687)
Verbosity was 0 and is now 3
   -- Attempting call on SIP/24 for 7000@diverses:1 (Retry 1)
 == Using UDPTL CoS mark 5
 == Using SIP RTP CoS mark 5
   -- Executing [7000@diverses:1] VoiceMailMain("SIP/24-00000000", "") in new stack
   -- <SIP/24-00000000> Playing 'vm-login.gsm' (language 'de')
[Sep  8 16:54:56] NOTICE[1820]: pbx_spool.c:357 attempt_thread: Call completed to SIP/24
[Sep  8 16:55:50] WARNING[1763]: pbx_spool.c:405 scan_service: Unable to open /var/spool/asterisk/outgoing/test.call: No such file or directory, deleting
[Sep  8 16:56:50] WARNING[1763]: pbx_spool.c:405 scan_service: Unable to open /var/spool/asterisk/outgoing/test.call: No such file or directory, deleting


What's interesting is, that nearly 1 minute after the call was completed, another warning is shown. I didn't waited that long at first.

By: Tilghman Lesher (tilghman) 2010-09-11 20:35:30

I'm confused.  How is it that the patch worked for you, yet when that patch was committed, you report that it does not work?  Are you sure you're using a revision that includes the patch?

By: Michael Keuter (mkeuter) 2010-09-15 10:37:55

I'm also confused, the patch worked only in the enviroment I described above.
I cannot test at the moment cause I'm in holidays now (for 2 weeks).

Maybe something else (not pbx_spool) changed in the meantime, or it's a more complicated issue.

By: abelbeck (abelbeck) 2010-10-03 14:15:20

I was having the same problem as mkeuter, using a 500MHz embedded platform.

I have attached a patch that solves this call-file issue for me in my testing.

Basically, in the inotify_add_watch() call replace the IN_CREATE mask with IN_CLOSE_WRITE .  On slower machines, the IN_CREATE was caught before the file was completely written and causing the call-file to fail.  By waiting for IN_CLOSE_WRITE the file is ready to be processed.

By: Digium Subversion (svnbot) 2010-10-03 15:02:30

Repository: asterisk
Revision: 290066

U   branches/1.8/pbx/pbx_spool.c

------------------------------------------------------------------------
r290066 | tilghman | 2010-10-03 15:02:30 -0500 (Sun, 03 Oct 2010) | 8 lines

Get notification only when file is closed, not when created.

(closes issue ASTERISK-16608)
Reported by: mkeuter
Patches:
      asterisk-1.8-bugid17924.patch uploaded by abelbeck (license 946)
Tested by: abelbeck

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=290066

By: Digium Subversion (svnbot) 2010-10-03 15:04:58

Repository: asterisk
Revision: 290067

_U  trunk/
U   trunk/pbx/pbx_spool.c

------------------------------------------------------------------------
r290067 | tilghman | 2010-10-03 15:04:58 -0500 (Sun, 03 Oct 2010) | 15 lines

Merged revisions 290066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r290066 | tilghman | 2010-10-03 15:02:29 -0500 (Sun, 03 Oct 2010) | 8 lines
 
 Get notification only when file is closed, not when created.
 
 (closes issue ASTERISK-16608)
  Reported by: mkeuter
  Patches:
        asterisk-1.8-bugid17924.patch uploaded by abelbeck (license 946)
  Tested by: abelbeck
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=290067