[asterisk-users] Inconsistent Behavior in SYSTEMSTATUS After System() Call

Sean Elble selble at higherone.com
Mon Jul 12 11:58:20 CDT 2010


Hi all,

I'm running into a easily replicated problem at the moment, with Asterisk 1.6.0.28 (built from source, no special configure parameters, other than a path) running on top of a fully up-to-date CentOS 5.5, and I'm looking for suggestions as to why this is occurring.  I've spent some time looking into the issue, and really haven't been able to come up with much.  We have the following setup in extensions.conf:

[Extreme_Overflow_Local_Check]
exten => s,1,Verbose(EXTENSION is: ${EXTEN})
exten => s,n,Verbose(DAVEDNIS is: ${DAVEDNIS})
exten => s,n,Set(OVERFLOW_PATH=/opt/FIVR/Overflow_Sounds/)
exten => s,n,System(test -e ${OVERFLOW_PATH}${DAVEDNIS}.*)
exten => s,n,Verbose(System call result was: ${SYSTEMSTATUS})
exten => s,n,ExecIf($[${SYSTEMSTATUS} = SUCCESS]?Playback(${OVERFLOW_PATH}${DAVEDNIS}))
exten => s,n,ExecIf($[${SYSTEMSTATUS} = SUCCESS]?HangUp())
exten => s,n,Goto(FrontEnd_ASL_English,s,1)

exten => h,1,HangUp

We have a series of contexts that ultimately lead to this one (all of which are identical to this, save for a difference in file paths).  A good deal of extensions reach these contexts.  Our base case is that Asterisk should check for the existence of the file in question, and if it exists, play a message and hangup.  Otherwise, go on to Frontend_ASL_English, which is pretty clear in the provided context.  When Asterisk first starts, this works as expected: Asterisk checks to see if the file exists, the file does not, APPERROR is returned, and we go on to FrontEnd_ASL_English.  On subsequent calls, SUCCESS is returned, despite no files being added to the directories in question.  Restarting Asterisk fixes the problem for one phone call to any of the extensions being used, but all subsequent calls return SUCCESS on these tests when APPERROR should be returned, based upon the exit code from test on the command line.

I tried using the replacement "test" script provided here [http://www.voip-info.org/wiki/view/Asterisk+tips+fileexistance] without any change in response.  I'm a little stumped by this one, and though I admit to being an Asterisk newbie, I fail to understand why it works correctly and exactly once upon Asterisk startup, but no time thereafter.  For what it's worth, the latest version of Asterisk (1.6.2.9) does seem to work OK here, and I'm trying to identify any changes that would have caused a change here (apps/app_system.c and main/asterisk.c have been dead ends so far), but it's unlikely we'll be able to upgrade to fix the issue (backporting a fix is a more likely scenario).  If anyone has any suggestions, I'd appreciate them.  Thanks, in advance.

-Sean

--
Sean Elble
Linux Systems Administrator
Higher One, Inc.
selble at higherone.com
http://www.higherone.com/




More information about the asterisk-users mailing list