In some cases, when doing on demand one-touch recording, the recording file does not get saved. This appears to be an Asterisk bug:
- Enable on-demand recording on an extension but no record always settings
- Make a call
- press the *1 'start recording' button and confirm it started (check the CLI)
- now check the channel contents - 'core show channel SIP/702-xxxxxx' to confirm that CDR(recordingfile) was set properly.
- now hangup, check the DB and no value is set
in further analysis with additional debugging, it is confirmed that the CDR(recordingfile) is being set to the value that was there prior to the call being answered, which in the above example is blank but if set to something else, then that is what get's written in the database. This can be viewed with debug statements in the hangup macro showing the value has been reverted back.
This feature uses DYNAMIC_FEATURES that FreePBX creates. It also been confirmed that if another variable is set at the time the feature macro is executed, and then in the hangup macro CDR(recordingfile) is set to the value of that variable, then it works. This strongly appears to be an Asterisk bug and an Asterisk ticket will be linked to this.