Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Expression in dialplan


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





PostPosted: Thu Oct 22, 2009 4:58 am    Post subject: [Freeswitch-users] Expression in dialplan Reply with quote

Thanks for reply. Actually I want to match values and strings. Like IP_CALL=="true" or IP_CALL != "true" or Date >= "22/10/09" and vice versa. Last thing I forgot to mention, how can I implement condition in dial plan xml when using operation and/or  i.e. IP_CALL == "false" and PST_CALL == "false" / IP_CALL == "false" or PST_CALL == "false".

Note: I only want to implement it in dial plan not in any script.


Kindly advise the solution.

---------- Forwarded message ----------
From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Date: Wed, 21 Oct 2009 21:36:31 -0700
Subject: Re: [Freeswitch-users] FreeSWITCH-users Digest, Vol 40, Issue 179


On Wed, Oct 21, 2009 at 9:28 PM, Mark Campbell-Smith <mcampbellsmith@gmail.com (mcampbellsmith@gmail.com)> wrote:
Quote:
Can't you use the inline statement to set a variable so that it can be
used directly in a condition?

http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions




Yes you can. Just don't abuse it like Tony said. If you find yourself doing it a lot then it's a sure sign that you're taking the wrong approach.
-MC





---------- Forwarded message ----------
From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Date: Wed, 21 Oct 2009 21:41:31 -0700
Subject: Re: [Freeswitch-users] FreeSWITCH-users Digest, Vol 40, Issue 179


On Wed, Oct 21, 2009 at 9:08 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
Hi,

Thanks for reply, it really helped me. One more thing to ask, how can we make decision against >,<, >=, <= in condition header? Like we use == for action and != for anti-action.

Kindly highlight it.




You can only do greater than and less than in the date/time matching. See the date/time example in the default.xml dialplan file.

You can also use regular expressions if you're in a pinch. For example, if you need to match numbers >= 1100 and <= 1500 you could just use this regex:

^(1[1234]\d\d|1500)$

The real question, though, is this: what types of values do you need to match for GT or LT? Date/time? Money? Other? That will determine if you need to use a script or just the dialplan.
-MC
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