[Freeswitch-users] Best way to mimic nested conditions?

Jan Riedinger riedinger at sns.eu
Wed Sep 29 15:54:15 PDT 2010


  Hi Mario,

try to use on-true instead of on_true :-).

BR
    Jan

Am 30.09.2010 00:27, schrieb Mario:
> I am struggling with the extension below which is a snippet of a larger
> one that simply says "Hi" followed by a name based on the caller id. I
> have looked at the book/wiki but the samples didn't work for me. I tried
> various options but this is as close as I can get. What is happening is
> that the first action (hi) does not play, and then only extension 100
> will work. As if the break=true is not honored. BTW I looked at macros
> but wanted to keep the numbers and file names close together. I thought
> this was easier. Thanks!
>
>     <extension name="mvhi">
>        <condition field="destination_number" expression="^2921$"/>
>          <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/hi.wav"/>
>          <condition field="${caller_id_number}" expression="^100"
> break="on_true">
>            <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/danny.wav"/>
>          </condition>
>          <condition field="${caller_id_number}" expression="^200">
>            <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/pam.wav break="on_true""/>
>          </condition>
>          <condition field="${caller_id_number}" expression="^300">
>            <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/jerry.wav break="on_true""/>
>          </condition>
>     </extension>
>
> I also tried this which plays the "hi" but will not go beyond ext 100.
>     <extension name="mvhi">
>        <condition field="destination_number" expression="^2921$">
>          <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/hi.wav"/>
>       </condition>
>          <condition field="${caller_id_number}" expression="^100"
> break="on_true">
>            <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/danny.wav"/>
>          </condition>
>          <condition field="${caller_id_number}" expression="^200"
> break="on_true">
>            <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/pam.wav"/>
>          </condition>
>          <condition field="${caller_id_number}" expression="^300">
>            <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/jerry.wav"/>
>          </condition>
>     </extension>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-- 
Jan Riedinger                           Phone :  +49-30-39 73 19 66
Dipl.-Inf. | Managing Director          Fax   :  +49-30-39 73 19 64
                                         E-Mail:  riedinger at sns.eu
SNS Consult GmbH                        ICQ   :  163-237-041
Südwestkorso 49a                        MSN   :  jan at sns-consult.de
14197 Berlin GERMANY                    Skype :  Jan Riedinger

AG Charlottenburg - HRB 71973




More information about the FreeSWITCH-users mailing list