[Freeswitch-users] Problem with conditions depending on values generated by dialplan

Anthony Minessale anthony.minessale at gmail.com
Tue Nov 11 06:25:51 PST 2008


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.




On Tue, Nov 11, 2008 at 7:25 AM, Helmut Kuper <helmut.kuper at ewetel.de>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Birgit,
>
> 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 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
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkkZh6MACgkQ4tZeNddg3dxGVwCgllX9/Xz/Dv9Tlisy5OKXXt8N
> AYQAnirOm1w2veyLqaVRYQmcD1IogYa9
> =/pjY
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081111/399322e2/attachment-0002.html 


More information about the FreeSWITCH-users mailing list