<div dir="ltr">Hello all,<div><br></div><div>I solved it like so:</div><div><br></div><div><font face="monospace">    <action application="answer"/><br>    <action application="sleep" data="1000"/><br>    <action application="playback" data="${audio}"/><br>    <condition field="${record_voicemail}" expression="^true$" break="on-false"><br>        <action application="log" data="CRIT I will be recording!"/><br>        <action application="record" data="${record_filename} 30 3 2"/><br>        <antion application="hangup" date="NORMAL_CLEARING"/><br>        <anti-action application="hangup" date="NORMAL_CLEARING"/><br>    </condition><br></condition></font><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 19, 2020 at 2:47 AM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>why does this:</div><div><br></div><div><font face="monospace"><extension name="catch_simple_message_from_originate"><br>    <condition field="destination_number" expression="^(simple_message)$" require-nested="false"><br>        <action application="ring_ready"/><br>        <action application="answer"/><br>        <action application="sleep" data="1000"/><br>        <action application="playback" data="${audio}"/><br>        <condition field="${record_voicemail}" expression="^true$"><br>            <action application="log" data="CRIT I will be recording!"/><br>            <action application="record_session" data="tmp/${record_filename}.mp3"/><br>        </condition><br>        <action application="hangup" date="NORMAL_CLEARING"/><br>    </condition><br></extension></font><br></div><div><br></div><div>Why when executed is moved around? The hangup should execute AFTER the inner condition</div><div><br></div><div><font face="monospace">Dialplan: sofia/external/<a href="mailto:1234567890@sip.mydomain.com" target="_blank">1234567890@sip.mydomain.com</a> Action sleep(1000)<br>Dialplan: sofia/external/<a href="mailto:1234567890@sip.mydomain.com" target="_blank">1234567890@sip.mydomain.com</a> Action playback(${cdrBucket}/${audio1})<br>Dialplan: sofia/external/<a href="mailto:1234567890@sip.mydomain.com" target="_blank">1234567890@sip.mydomain.com</a> Action hangup()<br>|--- Dialplan: Processing recursive conditions level:1 [catch_simple_message_from_originate_recur_1] require-nested=FALSE<br>|--- Dialplan: sofia/external/<a href="mailto:1234567890@sip.mydomain.com" target="_blank">1234567890@sip.mydomain.com</a> Regex (PASS) [catch_simple_message_from_originate_recur_1] ${record_voicemail}(true) =~ /^true$/ break=on-false<br>|--- Dialplan: sofia/external/<a href="mailto:1234567890@sip.mydomain.com" target="_blank">1234567890@sip.mydomain.com</a> Action log(CRIT I will be recording!)<br>|--- Dialplan: sofia/external/<a href="mailto:1234567890@sip.mydomain.com" target="_blank">1234567890@sip.mydomain.com</a> Action record_session(tmp/${record_filename}.mp3)</font><br></div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div></div></div>
</blockquote></div>