[Freeswitch-users] Best way to mimic nested conditions?
Mario
mario_fs at mgtech.com
Wed Sep 29 17:06:56 PDT 2010
Another poster found the problem - my eyes are old and did not notice
on_true instead of on-true. The line works now, thanks! BTW, I tried
using macros but can't get them to work no matter where I place them.
On 09/29/10 16:37, Michael Collins wrote:
> Can you paste these dialplan snippets into pastebin? I don't know if my
> mail reader is messing them up, but I'm seeing what appear to be really
> weird lines, like this:
>
> <action application="playback"
> data="/usr/local/freeswitch/conf/mvsounds/jerry.wav break="on_true""/>
>
> That line doesn't look valid to me and I want to make sure that it is
> (or isn't) what you are actually using.
>
> Thanks,
> MC
>
> On Wed, Sep 29, 2010 at 3:27 PM, Mario <mario_fs at mgtech.com
> <mailto:mario_fs at mgtech.com>> wrote:
>
> 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
> <mailto: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
>
>
>
>
> _______________________________________________
> 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
More information about the FreeSWITCH-users
mailing list