[asterisk-users] Asterisk 13.22.0 - "stat" dialplan function clears channel vars?

Stefan Viljoen viljoens at verishare.co.za
Thu Jul 26 03:08:29 CDT 2018

Hi Guys

I have the following dialplan code that I use to play back recordings, the filename being provided in an originate statement to the AMI (AJAM) interface:

Action: Originate
ActionID: test
Channel: SIP/3015
Exten: 7777
Context: local
Priority: 1
CallerID: 3015
Account: recordinglisten
ChannelID: abc
OtherChannelID: def
Variable: CallLimit=3600,recfile=/var/spool/asterisk/monitor/1807/25/2507180836591192526,altfile=/var/spool/asterisk/monitor/archive/1807/25/2507180836591192526
Async: true

Extension 7777 is:

;listen to recording
exten=>7777,n,NoOp(Requesting File ${recfile})
exten=>7777,n,NoOp(Rec file set to ${recfile})
exten=>7777,n,NoOp(Alt file set to ${altfile})
exten=>7777,n,NoOp(Requesting Alt File ${altfile})
exten=>7777,n,NoOp(Original File Exist ${haveFile})
exten=>7777,n,GotoIf($["${haveFile}" = "1"]?play)
exten=>7777,n,NoOp(rec File not found using alt file)

However, if the above originate is done, when this line is executed in the dialplan Asterisk 13.22.0


it clears the variables recfile and altfile - if you NoOp them out below this line they are blank.

Why would the "STAT" dialplan function in 13.22.0 apparently clear all variables set on the channel, instead of checking if the given file exists (as it did in previous Asterisk versions) and leaving the channel variables alone...

Additionally, not only "recfile" which is passed as a STAT parameter is clear, "altfile" is -also- cleared to blank.

Can anybody assist?

Thank you


More information about the asterisk-users mailing list