Record to two places without a conference?

In the log I shared in another thread, the following appears:

028eac32-e628-ccf7-1948-48f7ab87279c |--- Dialplan: verto.rtc/0010_ae52d95e-6a96-4b99-9034-c10469e462c1_v-1 Action record_session({modname=mod_av,vw=640,vh=480}/var/lib/freeswitch/recordings/${mp4_filename}) INLINE
028eac32-e628-ccf7-1948-48f7ab87279c 2022-11-05 08:56:26.699090 97.27% [ERR] mod_dialplan_xml.c:69 This application cannot be executed inline

The dialplan line it’s trying to execute is the 2nd use of record_session in this execution of the dialplan. Notice the following things in the dialplan snippet below:

  1. Line 11 sets var mp4_filename so it should be defined and usable despite what the log says above
  2. Line 33 is the first use of record_session
  3. Line 38 is the second use, resulting in the logged problem. If the problem is instead the directive in {...} then how can we control the dimensions of the recording without using conference.conf.xml?
<extension name="all-callflows">
    <!-- Allow any 3+ alphanums or dashes after digit as extension. Asterisk prefers it start with a digit.
    -->
    <condition regex="all" require-nested="false" break="never">
        <regex field="${extension}" expression="${regexExtension}" />
        <regex field="${idOfClientSession}" expression="${regexIdOfClientSession}" />

        <action application="log" data="INFO Report the start of an FS session to restfuldb."/>
        <action application="set" data="timestamp_of_session_start=${strftime(%Y-%m-%d-%H-%M-%S)}" inline="true"/>
        <action application="set" data="filename_of_session_recording=${timestamp_of_session_start}_${extension}_${idOfClientSession}" inline="true"/>
        <action application="set" data="mp4_filename=${filename_of_session_recording}.mp4" inline="true"/>
        <!-- Adapted from https://freeswitch.org/confluence/display/FREESWITCH/mod_curl?focusedCommentId=13174860#comment-13174860 -->
        <action application="set" data='postBodyForStartedFsSession={ "idOfClientSession":"${idOfClientSession}", "extension":"${extension}", "timestamp":"${strftime(%Y-%m-%dT%H:%M:%S.000Z)}", "nameOfMp4": "${mp4_filename}" }' inline="true"/>
        <action application="curl" data="http://${ipOfRestfuldb}/startedFsSession content-type 'application/json' post '${postBodyForStartedFsSession}'"/>

        <action application="set" data="core_video_blank_image=false" inline="true"/>
        <action application="lua" data="${conf_dir}/dialplan/answer_then_ensure_sip_encryption.lua ${extension}"/>
        <!-- <action application="set" data="record_concat_video=true"/> RND-1459 and https://stackoverflow.com/a/31052600 -->
        <action application="set" data="jitterbuffer_msec=5p:100p" inline="true"/>
        <action application="set" data="RECORD_MIN_SEC=2" inline="true"/>
        <action application="set" data="RECORD_STEREO=true" inline="true"/>
        <action application="set" data="record_sample_rate=48000" inline="true"/>

        <!-- Notify VA that a new stream will arrive soon, and then start streaming. Do so even for audio-only projects. -->
        <action application="set" data="baseUrl_startStreamCapture=http://${ipOfVideoAnalyzer}:8080?Command=startStreamCapture&idOfClientSession=${idOfClientSession}&ext=${extension}" inline="true"/>
        <condition field="${codeForDesiredExperience}" expression="v-1" require-nested="false" break="never">
            <action      application="set" data="url_startStreamCapture=${baseUrl_startStreamCapture}" inline="true"/>
            <anti-action application="set" data="url_startStreamCapture=${baseUrl_startStreamCapture}&audio_only=True" inline="true"/>
        </condition>
        <action application="set" data="maxSecondsToConnectToVA=3" inline="true"/>
        <action application="log" data="INFO Start streaming to video analyzer"/>
        <action application="curl" data="${url_startStreamCapture} connect-timeout ${maxSecondsToConnectToVA} post"/>
        <action application="record_session" data="{modname=mod_av,vw=640,vh=480}rtmp://${ipOfVideoAnalyzer}:5150/viewOfUser/${idOfClientSession}"/>

        <condition break="never">
            <action application="set" data="api_hangup_hook=jsrun ${conf_dir}/dialplan/cleanup.js ${idOfClientSession} ${codeForDesiredExperience} ${ipOfVideoAnalyzer} ${ipOfRestfuldb}" inline="true"/>
            <action application="set" data="session_in_hangup_hook=true" inline="true"/>
            <action application="record_session" data="{modname=mod_av,vw=640,vh=480}$${recordings_dir}/${mp4_filename}" inline="true"/>
            <action application="park"/>
        </condition>
    </condition>
</extension>

I then tried removing the {...} directive from line 38 but I get the same failure:

c09d6998-bbb4-6e22-79ee-e587ff9dc777 |--- Dialplan: verto.rtc/0010_cb52c043-68dd-4f2d-bdf7-9cf986afe492_v-1 Action record_session(/var/lib/freeswitch/recordings/${mp4_filename}) INLINE
c09d6998-bbb4-6e22-79ee-e587ff9dc777 2022-11-28 11:40:15.604676 97.97% [ERR] mod_dialplan_xml.c:69 This application cannot be executed inline