Yes, you seem to understand it perfectly. (one man's problem description is another man's documentation)
The dialplan is a state of the call (ROUTING) that comes before EXECUTE.
The reason you are having problems is you are confusing the dialplan with asterisk that treats its dialplan as
a scripting language. The FS dialplan is like a pre-processor for the call that scans the entire thing and compiles it
into a single list of instructions before changing to EXECUTE and actually executing the instructions.
The best way to fix the problem is to shift the paradigm in your head to match the one in reality.
The best way to do what you want is to set the variable as you do now then transfer the call to another extension.
Since that action will put the call back into ROUTING the next extension will see the variable.
Also you can use the execute_extension application in a similar manner to transfer without actually transferring.
-----BEGIN PGP SIGNED MESSAGE-----Hi Birgit,
Hash: SHA1
well of course the condition is THE condition, but I espected the whole
dialplan is executed sequentially, so that this fictive dialplan works:
<condition field="xyz" expression".*" break="never">
<action application="set" data="MYVAR=abc"/>
</condition>
<condition field="MYVAR" expression="abc">
<action application="bridge" data="....."/>
<anti-action application .... />
</condition>
but unfortunately all conditions are parsed befor executing the actions,
so MYVAR is nearly worthless in dialplan (except within applications).
regards
Helmut
Birgit Arkesteijn schrieb:
> Hi Helmut,
>
> As far as I know, the <condition> at the top of the dialplan is indeed
> THE condition.
>
> We've used two mechanism for 'dynamic' dialplan:
> - xml_curl: freeswitch posts parameters to a URL and the URL returns a
> dynamic dialplan. This works well with a webserver connected to a database
> - javascript (spidermonkey)
>
> Hope the above helps,
> Birgit
>
>
> On 11/11/08 12:51, Helmut Kuper wrote:
> Hi,
>
>
> I want a dialplan setting a channel variable with a certain value. After
> that I want to do some action depending of that variable/value. But it
> looks like that FS parses the regular expressions of dialplan conditions
> only at the beginning of dialplan_hunt, so that conditions based on
> channel variables are only possible with the variable values at the time
> of starting dialplan_hunt.
>
>
> Is that true or is there a way to do what I like to do ?
>
>
> regards
> helmut
>
>
>>
_______________________________________________
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
-----BEGIN PGP SIGNATURE-----iEYEARECAAYFAkkZh6MACgkQ4tZeNddg3dxGVwCgllX9/Xz/Dv9Tlisy5OKXXt8N
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
AYQAnirOm1w2veyLqaVRYQmcD1IogYa9
=/pjY
-----END PGP SIGNATURE-----
_______________________________________________
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