[Home]

Summary:ASTERISK-10207: wrong error logged
Reporter:Dmitry Andrianov (dimas)Labels:
Date Opened:2007-08-30 16:24:08Date Closed:2007-08-30 16:50:40
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) q.patch
Description:Looking through recent issues I found ASTERISK-10142 and took a look how it was fixed. The 81120 revision fixes the issue itself but there is still another minor problem - it is the fact that any nonzero result from play_file will be reported as missing file. It is not correct because positive result from play_file just means digit was pressed.

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

The simple fix is to correct checking of play_file result from nonzero to <0 in the try_calling function but I would suggest just removing the "if" completely leaving play_file without checking its result (see the attached patch). This will work because ast_streamfile will log warning if there are problems with file anyway and Asterisk logs warning:

[Aug 31 01:37:44] WARNING[8467]: file.c:563 ast_openstream_full: File no-such-file does not exist in any format
[Aug 31 01:37:44] WARNING[8467]: file.c:813 ast_streamfile: Unable to open no-such-file (format 0x4 (ulaw)): No such file or directory
Comments:By: Digium Subversion (svnbot) 2007-08-30 16:47:41

Repository: asterisk
Revision: 81397

------------------------------------------------------------------------
r81397 | mmichelson | 2007-08-30 16:47:41 -0500 (Thu, 30 Aug 2007) | 7 lines

Removing an extraneous (and possibly misleading) log message. Firstly, if the announce file isn't found, the
streaming functions will report it. Secondly, not all non-zero returns from play_file mean that the announce file
wasn't found. Positive return values simply mean that a digit was pressed (most likely to skip through the announcement).

(closes issue ASTERISK-10207, reported and patched by dimas)


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

By: Digium Subversion (svnbot) 2007-08-30 16:50:40

Repository: asterisk
Revision: 81398

------------------------------------------------------------------------
r81398 | mmichelson | 2007-08-30 16:50:37 -0500 (Thu, 30 Aug 2007) | 15 lines

Merged revisions 81397 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81397 | mmichelson | 2007-08-30 17:05:56 -0500 (Thu, 30 Aug 2007) | 7 lines

Removing an extraneous (and possibly misleading) log message. Firstly, if the announce file isn't found, the
streaming functions will report it. Secondly, not all non-zero returns from play_file mean that the announce file
wasn't found. Positive return values simply mean that a digit was pressed (most likely to skip through the announcement).

(closes issue ASTERISK-10207, reported and patched by dimas)


........

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