[Freeswitch-users] nested dialplan

David Villasmil david.villasmil.work at gmail.com
Fri Jun 19 02:00:23 UTC 2020


Hello all,

I solved it like so:

    <action application="answer"/>
    <action application="sleep" data="1000"/>
    <action application="playback" data="${audio}"/>
    <condition field="${record_voicemail}" expression="^true$"
break="on-false">
        <action application="log" data="CRIT I will be recording!"/>
        <action application="record" data="${record_filename} 30 3 2"/>
        <antion application="hangup" date="NORMAL_CLEARING"/>
        <anti-action application="hangup" date="NORMAL_CLEARING"/>
    </condition>
</condition>

Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337


On Fri, Jun 19, 2020 at 2:47 AM David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Hello all,
>
> why does this:
>
> <extension name="catch_simple_message_from_originate">
>     <condition field="destination_number" expression="^(simple_message)$"
> require-nested="false">
>         <action application="ring_ready"/>
>         <action application="answer"/>
>         <action application="sleep" data="1000"/>
>         <action application="playback" data="${audio}"/>
>         <condition field="${record_voicemail}" expression="^true$">
>             <action application="log" data="CRIT I will be recording!"/>
>             <action application="record_session"
> data="tmp/${record_filename}.mp3"/>
>         </condition>
>         <action application="hangup" date="NORMAL_CLEARING"/>
>     </condition>
> </extension>
>
> Why when executed is moved around? The hangup should execute AFTER the
> inner condition
>
> Dialplan: sofia/external/1234567890 at sip.mydomain.com Action sleep(1000)
> Dialplan: sofia/external/1234567890 at sip.mydomain.com Action
> playback(${cdrBucket}/${audio1})
> Dialplan: sofia/external/1234567890 at sip.mydomain.com Action hangup()
> |--- Dialplan: Processing recursive conditions level:1
> [catch_simple_message_from_originate_recur_1] require-nested=FALSE
> |--- Dialplan: sofia/external/1234567890 at sip.mydomain.com Regex (PASS)
> [catch_simple_message_from_originate_recur_1] ${record_voicemail}(true) =~
> /^true$/ break=on-false
> |--- Dialplan: sofia/external/1234567890 at sip.mydomain.com Action log(CRIT
> I will be recording!)
> |--- Dialplan: sofia/external/1234567890 at sip.mydomain.com Action
> record_session(tmp/${record_filename}.mp3)
>
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200619/ec48bf19/attachment.html>


More information about the FreeSWITCH-users mailing list