[Freeswitch-dev] multiple actions in an extension with different condition executing each after possible???
rentmycoder rentmycoder
rentmycoder at gmail.com
Sat Dec 19 09:09:00 PST 2009
Hi pals,
I would like to convert the following dialplan int fs xml dialplan, is
this possible???
;----- check for ivr vars -----
exten => s,16,GotoIf($["${IvrID}" = ""]?17:18)
exten => s,17,Set(IvrID=0)
exten => s,18,GotoIf($["${IvrActionID}" = ""]?19:20)
exten => s,19,Set(IvrActionID=0)
exten => s,20,GotoIf($["${QueeID}" = ""]?21:22)
exten => s,21,Set(QueeID=0)
exten => s,22,GotoIf($["${ChannelID}" = ""]?23:24)
exten => s,23,Set(ChannelID=${CHANNEL_INNER})
exten => s,24,Set(CallStateID=${CALLSTATE_DIALING})
It would be easy if we could use nested conditions...
<extension name="test">
<condition field="destination_number" expression="^9999$">
<condition field="${IvrID}" expression="^$">
<action application="set" data="IvrID=1"/>
</condition>
<condition field="${QueeID}" expression="^$">
<action application="set" data="QueeID=1"/>
</condition>
</condition>
</extension>
But we can't:(
<extension name="test">
<condition field="destination_number" expression="^9999$" break="never"/>
<condition field="${IvrID}" expression="^$">
<action application="set" data="IvrID=1"/>
</condition>
<condition field="${QueeID}" expression="^$">
<action application="set" data="QueeID=1"/>
</condition>
</extension>
I'we tried this trick also, but second and third condition get's never
executed...
As a workaround I could define different extensions and use transfer
to jump to the next
but I have a lot of thing to check resulting a lot of extensions...
There should be a more elegant way... isn't it?
More information about the FreeSWITCH-dev
mailing list