Hi, I have a chatplan like this: <?xml version="1.0" encoding="utf-8"?> <include> <context name="default"> <extension name="testnumber"> <condition field="to" expression="^testnumber"/> <condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$"> <action application="reply" data="OK"/> </condition> </extension> <extension name="demo"> <condition field="to" expression="^(.*)$"> <action application="send" /> </condition> </extension> </context> </include> No matter what result the {cond(${_body} is, I don't want the plan flow go down to demo extension. What should I do? Thanks. Jimmy
Hi, 2013/4/16 Jimmy Chang <chang33.tw@gmail.com>
Hi,
I have a chatplan like this:
<?xml version="1.0" encoding="utf-8"?> <include> <context name="default">
<extension name="testnumber"> <condition field="to" expression="^testnumber"/> <condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$"> <action application="reply" data="OK"/> </condition> </extension>
<extension name="demo"> <condition field="to" expression="^(.*)$"> <action application="send" /> </condition> </extension>
</context> </include>
No matter what result the {cond(${_body} is, I don't want the plan flow go down to demo extension. What should I do?
What about an 'anti-action' for the case the condition is not satisfied?
Thanks. Jimmy
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- José Luis Millán
I'd say you want break="always" in that condition: <condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$" break="always"> Try that and let us know if it works. -MC On Tue, Apr 16, 2013 at 4:51 AM, José Luis Millán <jmillan@aliax.net> wrote:
Hi,
2013/4/16 Jimmy Chang <chang33.tw@gmail.com>
Hi,
I have a chatplan like this:
<?xml version="1.0" encoding="utf-8"?> <include> <context name="default">
<extension name="testnumber"> <condition field="to" expression="^testnumber"/> <condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$"> <action application="reply" data="OK"/> </condition> </extension>
<extension name="demo"> <condition field="to" expression="^(.*)$"> <action application="send" /> </condition> </extension>
</context> </include>
No matter what result the {cond(${_body} is, I don't want the plan flow go down to demo extension. What should I do?
What about an 'anti-action' for the case the condition is not satisfied?
Thanks. Jimmy
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- José Luis Millán
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Hi, I added this in the condition, it didn't work. I have solved this problem by adding anti-action <anti-action application="stop" data=""/> Thanks. Jimmy ? 2013/4/16 ?? 11:56, Michael Collins ??:
I'd say you want break="always" in that condition:
<condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$" break="always">
Try that and let us know if it works. -MC
On Tue, Apr 16, 2013 at 4:51 AM, José Luis Millán <jmillan@aliax.net <mailto:jmillan@aliax.net>> wrote:
Hi,
2013/4/16 Jimmy Chang <chang33.tw@gmail.com <mailto:chang33.tw@gmail.com>>
Hi,
I have a chatplan like this:
<?xml version="1.0" encoding="utf-8"?> <include> <context name="default">
<extension name="testnumber"> <condition field="to" expression="^testnumber"/> <condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$"> <action application="reply" data="OK"/> </condition> </extension>
<extension name="demo"> <condition field="to" expression="^(.*)$"> <action application="send" /> </condition> </extension>
</context> </include>
No matter what result the {cond(${_body} is, I don't want the plan flow go down to demo extension. What should I do?
What about an 'anti-action' for the case the condition is not satisfied?
Thanks. Jimmy
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- José Luis Millán
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
It is what I want. Thanks. Jimmy ? 2013/4/16 ?? 07:51, José Luis Millán ??:
Hi,
2013/4/16 Jimmy Chang <chang33.tw@gmail.com <mailto:chang33.tw@gmail.com>>
Hi,
I have a chatplan like this:
<?xml version="1.0" encoding="utf-8"?> <include> <context name="default">
<extension name="testnumber"> <condition field="to" expression="^testnumber"/> <condition field="${cond(${_body} < 10 ? YES : NO)}" expression="^YES$"> <action application="reply" data="OK"/> </condition> </extension>
<extension name="demo"> <condition field="to" expression="^(.*)$"> <action application="send" /> </condition> </extension>
</context> </include>
No matter what result the {cond(${_body} is, I don't want the plan flow go down to demo extension. What should I do?
What about an 'anti-action' for the case the condition is not satisfied?
Thanks. Jimmy
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- José Luis Millán
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Jimmy Chang
-
José Luis Millán
-
Michael Collins