[Home]

Summary:ASTERISK-07586: PlaybackStatus() does not set $PLAYBACKSTATUS
Reporter:Douglas Garstang (dgarstang)Labels:
Date Opened:2007-03-20 15:31:43Date Closed:2007-03-20 15:55:38
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_playback
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The $PLAYBACKSTATUS dialplan variable is not being set to FAILED when unable to find the file it is trying to play. See below. Asterisk 1.4.1.

Dialplan:
  exten => s,n,Background(${VMAIL-FILES}/${UID}/${PRO}-greet)
  exten => s,n,NoOp(${PLAYBACKSTATUS})
  exten => s,n,GotoIf($["${PLAYBACKSTATUS}" = "FAILED"]?generic-greet:return)

Console output:

   -- Executing [s@VMDepositIntro:2] BackGround("SIP/xx.yy.91.220-00884b60", "/usr/local/vm/1867/1893-greet") in new stack
[Mar 20 20:27:36] WARNING[27161]: file.c:553 ast_openstream_full: File /usr/local/vm/1867/1893-greet does not exist in any format
[Mar 20 20:27:36] WARNING[27161]: file.c:804 ast_streamfile: Unable to open /usr/local/vm/1867/1893-greet (format 0x4 (ulaw)): No such file or directory
[Mar 20 20:27:36] WARNING[27161]: pbx.c:5668 pbx_builtin_background: ast_streamfile failed on SIP/75.24.91.220-00884b60 for /usr/local/vm/1867/1893-greet
   -- Executing [s@VMDepositIntro:3] NoOp("SIP/xx.yy.91.220-00884b60", "") in new stack

Playback() could not find the file, yet the NoOp() shows that $PLAYBACKSTATUS was not set to FAILED.

Comments:By: Douglas Garstang (dgarstang) 2007-03-20 15:34:58

Oops. got the title wrong. Of course it's not the PlaybackStatus() command, it's the Playback() command.

By: Serge Vecher (serge-v) 2007-03-20 15:48:55

you mean Background()? ;)

By: Serge Vecher (serge-v) 2007-03-20 15:55:20

Background() does not set PLAYBACKSTATUS, Playback() does. In trunk (not in 1.4), Background sets a BACKGROUNDSTATUS variable -> see related bug.