[Home]

Summary:ASTERISK-16097: [patch] [regression] flooding /var/spool/asterisk/outgoing/xxxxx.call: No such file or directory
Reporter:Ronald Chan (loloski)Labels:
Date Opened:2010-05-14 00:01:58Date Closed:2010-10-05 15:19:56
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:PBX/pbx_spool
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100827__issue17337.diff.txt
( 1) debug.txt
( 2) messages.txt
Description:I'm trying to create a basic autodialer using a call files, i don't know if this is a feature request or simply a minor annoyance bug, when i disconnect the call on my apps using channel request hangup SIP/1XX-XXXXXXX asterisk doesn't aware that there was a request and flood the screen. I know i can't turn the warning on logger.conf, but i think that was not a proper solution.

     

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

This is only a test call to an internal extension Local/100@internal no actual call was send to gw.

May 14 12:00:28] NOTICE[12644]: pbx_spool.c:357 attempt_thread: Call completed                                                                                                                                to Local/100@internal
[May 14 12:00:28] NOTICE[10778]: chan_sip.c:20902 handle_request_invite: Unable                                                                                                                                to create/find SIP channel for this INVITE
[May 14 12:00:34] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/13029852634beccac41e15d1.27865269.call: No such file                                                                                                                                or directory, deleting
[May 14 12:00:34] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/13029852634beccac41e15d1.27865269.call: No such file                                                                                                                                or directory, deleting
[May 14 12:00:34] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/13029852634beccac41e15d1.27865269.call: No such file                                                                                                                                or directory, deleting
[May 14 12:00:37] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/457604564beccaa98521d3.96463209.call: No such file o                                                                                                                               r directory, deleting
[May 14 12:00:37] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/457604564beccaa98521d3.96463209.call: No such file o                                                                                                                               r directory, deleting
[May 14 12:00:37] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/457604564beccaa98521d3.96463209.call: No such file o                                                                                                                               r directory, deleting
[May 14 12:00:37] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/457604564beccaa98521d3.96463209.call: No such file o                                                                                                                               r directory, deleting
[May 14 12:00:37] WARNING[10779]: pbx_spool.c:399 scan_service: Unable to open /                                                                                                                               var/spool/asterisk/outgoing/457604564beccaa98521d3.96463209.call: No such file o    
Comments:By: Ronald Chan (loloski) 2010-05-14 00:04:04

I know i can't turn it off the warning on logger.conf, but i think that was not a proper solution.

By: Ronald Chan (loloski) 2010-05-14 00:13:21

If the description of the bug was a bit way off, please change it :), english is not my native tongue :)

By: Paul Belanger (pabelanger) 2010-05-14 09:59:39

Post your .call file, dialplan and debug log (see below).  Does the files actually exist?
---
We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

http://svn.digium.com/svn/asterisk/trun/doc/HOWTO_collect_debug_information.txt

By: Ronald Chan (loloski) 2010-05-14 12:15:07

All right, i might re-phrase my sentence, because it might be a bit odd, well first i'm really sorry if I didn't state the problem clearly. I'm in the process of Creating a simple Autodialer which is running good for my purpose. the call file of course exist on /var/spool/asterisk/outgoing directory.

one of the feature of my dialer is that, in the application program i have a small disconnect button which send channel request hangup on asterisk console, to disconnect the phone, it works great no problem.

but the situation is whenever i send the hangup request, the asterisk console flood the message simply because the call file has been remove due to channel hang request hangup and that's the correct behavior right?.

now my question why pbx_spool is not aware of the hangup request, then complain and display the warning that the .call files is no longer there. but if you don't send the hangup request and call is finish normally it doesn't display the warning of the .call files is not there already.

this is really easy to reproduce, create a call files then move to outgoing spool directory, then send channel request hangup SIP/XXXXX, then you will see that it will display a warning that the .call file is not there. I think the right behavior is it doesn't display warning message.

I hope i made my self clear on this.

By: Paul Belanger (pabelanger) 2010-05-15 18:53:28

See my post above, we need debug logs.

By: Ronald Chan (loloski) 2010-05-16 04:31:12

as per your request, please check the attached files

By: Ronald Chan (loloski) 2010-05-16 04:46:52

i stand corrected, even it process the call right, still it display the warning.

By: Ronald Chan (loloski) 2010-05-16 04:48:15

Sorry to post this as it is, this is too short script that i used to generate the call files.

<?php

header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );


       if ( isset($_REQUEST['phone']) && isset($_REQUEST['agent']) ) {

               $phone = htmlentities($_REQUEST['phone']);
               $agent = htmlentities($_REQUEST['agent']);
               $c = uniqid (rand (),true);
               $filename = $c .".call";
               $callfiles = "/var/spool/asterisk/tmpdir/$filename";
               $destfiles = "/var/spool/asterisk/outgoing/$filename";
               $fh = fopen($callfiles, 'w') or die("can't open file");
               $stringData = "Channel: Local/$phone@outgoing/nj\n";
               fwrite($fh, $stringData);
               $stringData = "MaxRetries: 0\n";
               fwrite($fh, $stringData);
               $stringData = "WaitTime: 30\n";
               fwrite($fh, $stringData);
               $stringData = "RetryTime: 15\n";
               fwrite($fh, $stringData);
               $stringData = "Context: confroom\n";
               fwrite($fh, $stringData);
               $stringData = "Extension: $agent\n";
               fwrite($fh, $stringData);
               $stringData = "Priority: 1\n";
               fwrite($fh, $stringData);
               fclose($fh);
               rename($callfiles,$destfiles) or die("can't move the call files");

       } else {

                       print "You are not allowed to visit this page directly\n";

                  }


?>

By: Paul Belanger (pabelanger) 2010-05-16 09:55:38

@loloski: CLI output != debug information.  You'll need to read this document below and follow it:

http://svn.digium.com/svn/asterisk/trun/doc/HOWTO_collect_debug_information.txt

By: Leif Madsen (lmadsen) 2010-05-17 13:25:14

Just waiting for some additional debug information, but there may be enough to go on here. I think the WARNING log message may not be appropriate here.

By: Ronald Chan (loloski) 2010-05-17 14:08:00

ok, please see attached files for details thanks

By: Ronald Chan (loloski) 2010-05-27 15:35:38

any news here?


edit: just say thank you!!



By: Paul Belanger (pabelanger) 2010-05-28 08:40:28

@loloski: This is marked as acknowledged; until a resource become available.

By: savag3 (savag3) 2010-06-06 08:10:55

I am experiencing this issue as well. I have traced this to a regression related to the addition of inotify support into pbx_spool.c in r255117. Reverting just pbx_spool.c to r227580 resolved this bug for me. On my system the pbx_spool.c:399 warning appears at exactly 5 minute intervals from when the spool file was processed.

By: savag3 (savag3) 2010-06-06 08:31:42

The problem is that scan_service via queue_file is being called by scan_thread for files that have already been deleted from the filesystem. This happens twice at 5 minute intervals for each file that is processed from the spool directory.



By: Ronald Chan (loloski) 2010-06-07 01:10:10

savag3,

I agree with you, i already read the source my C is just too weak to fix this by myself. for now i just remove the function ast_verbose on the code in question just to workaround the problem.

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

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:01

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