Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Problem with conditions depending on valu


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
helmut.kuper at ewetel.de
Guest





PostPosted: Tue Nov 11, 2008 7:55 am    Post subject: [Freeswitch-users] Problem with conditions depending on valu Reply with quote

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkZf78ACgkQ4tZeNddg3dzW7gCffmFMZrR9h1eDPZrXXAxrkJ5/
z/cAnjxmYAvHqdxAGJ8iIlrV+h5fv+1Q
=F9QJ
-----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
Back to top
birgit at westhawk.co.uk
Guest





PostPosted: Tue Nov 11, 2008 8:07 am    Post subject: [Freeswitch-users] Problem with conditions depending on valu Reply with quote

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:
Quote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkZf78ACgkQ4tZeNddg3dzW7gCffmFMZrR9h1eDPZrXXAxrkJ5/
z/cAnjxmYAvHqdxAGJ8iIlrV+h5fv+1Q
=F9QJ
-----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

--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>

_______________________________________________
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
Back to top
helmut.kuper at ewetel.de
Guest





PostPosted: Tue Nov 11, 2008 8:27 am    Post subject: [Freeswitch-users] Problem with conditions depending on valu Reply with quote

-----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:
Quote:
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-----
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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
anthony.minessale at g...
Guest





PostPosted: Tue Nov 11, 2008 9:26 am    Post subject: [Freeswitch-users] Problem with conditions depending on valu Reply with quote

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@ewetel.de (helmut.kuper@ewetel.de)> wrote:
Quote:
-----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:
Quote:
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:

Quote:
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 (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-----
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@lists.freeswitch.org (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





--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services