Hi,

FreeSWITCH decides what to execute first, the set application runs later (look a few lines later, you'll see lines beginning with EXECUTE, this is when it runs).

If you need to use variables you've set in the DP, you need to use the transfer application to make it go back into routing state.

Math

On 3-Jun-09, at 2:22 AM, Woody Dickson wrote:

Hello,

I am getting a strange problem in my dialplan.

After doing "SET", I want to use it in the next condition field.  But then the value is not being set properly.  

Could someone please tell me what is wrong?

Thanks,
Woody


Here is the dialplan:
<context name="conf-execution">
<extension name="get-pin" continue="true" >
<condition field="${destination_number}" expression="^(.*)$" break="never">

<action application="set" data="conference_id=111"/>
<action application="set" data="is_moderator=true"/>
<action application="info"/>

</condition>
</extension>
<extension name="conf">
<condition field="${is_moderator}" expression="^true$" break="never">
<action application="conference" data="${conference_id}@default+flags{Moderator}+1234"/>

</condition>
<condition field="${is_moderator}" expression="^false$" break="never">
<action application="conference" data="${conference_id}@default"/>

</condition>
<condition field="${is_moderator}" expression="^$" break="always">
<action application="playback" data="/var/app/prompt/wav/bye.wav"/>
<action application="hangup"/>

</condition>
</extension>

</context>


Here is the FS log.

Dialplan: sofia/internal/1001@192.168.1.101 parsing [conf-execution->get-pin] continue=true
Dialplan: sofia/internal/1001@192.168.1.101 Regex (PASS) [get-pin] ${destination_number}(117) =~ /^(.*)$/ break=never
Dialplan: sofia/internal/1001@192.168.1.101 Action set(conference_id=111)
Dialplan: sofia/internal/1001@192.168.1.101 Action set(is_moderator=true)
Dialplan: sofia/internal/1001@192.168.1.101 Action info()
Dialplan: sofia/internal/1001@192.168.1.101 parsing [conf-execution->conf] continue=false
Dialplan: sofia/internal/1001@192.168.1.101 Regex (FAIL) [conf] ${is_moderator}() =~ /^true$/ break=never
Dialplan: sofia/internal/1001@192.168.1.101 Regex (FAIL) [conf] ${is_moderator}() =~ /^false$/ break=never
Dialplan: sofia/internal/1001@192.168.1.101 Regex (PASS) [conf] ${is_moderator}() =~ /^$/ break=always
Dialplan: sofia/internal/1001@192.168.1.101 Action playback(/var/app/prompt/wav/bye.wav)
Dialplan: sofia/internal/1001@192.168.1.101 Action hangup() _______________________________________________
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