[Freeswitch-users] Define Condition in FreeSwitch

Michael Collins msc at freeswitch.org
Thu Aug 27 00:01:41 PDT 2009


On Wed, Aug 26, 2009 at 8:57 PM, Ahmed Munir <ahmedmunir007 at gmail.com>wrote:

> Hi,
>
>    I'm newbie. How can we translate the asterisk's condition in freeswitch
> as listed below;
>
>    1. NoOp ("Remote Conference Call")
>    2. GotoIf ($[${LEN(${DIALSTR})}=0]?3:4)
>    3. Hangup()
>    4. NoOp(Finish if-CONFERENCE-430)
>
>    Kindly reply soon.


Before I answer this question I just want you to know that there's probably
a more elegant way of doing whatever it is you're trying to do. This
dialplan snippet is pretty short. My first question would be: how does a
call get to this point? Also, what is the big picture, that is, what's the
application you're creating? Remember the golden rule: Anything that you do
in Asterisk is easier to do in FreeSWITCH, but you need to learn the ropes a
bit.

The answer to your question is, of course, "It depends." :P Give us the
background on what you're doing so that we can give you an educated answer.
You could use the <condition> tags with actions and anti-actions. You could
also call a Lua/JavaScript/Perl/Python/etc. script to handle the logic but
that's probably overkill.

Tell us more and we'll tell you more. ;)

Thanks!
-Michael Collins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090827/bcdeb99e/attachment-0002.html 


More information about the FreeSWITCH-users mailing list