[Freeswitch-users] Global variable in dialplan
Anthony Minessale
anthony.minessale at gmail.com
Tue Nov 26 01:05:22 MSK 2013
${cond ${variable} == 0 ? a : b}
There was a minor issue with this that has been fixed today so you would
need latest HEAD.
Also with regular extension stuff you just use the regex ^$ for undefined
val.
On Mon, Nov 25, 2013 at 3:01 PM, Ali Pey <alipey at gmail.com> wrote:
> Thank you Anthony.
>
> Is there anything similar to "defined" condition in dialplan? I want to
> examine if a global variable exists or not.
>
> Right now, it always gives me an error if the variable doesn't exist.
>
> Is there anyway that I can add a condition in my dialplan to check if a
> global variable actually exists or not?
>
> Regards,
> Ali Pey
>
>
>
> On Fri, Nov 22, 2013 at 3:33 PM, Anthony Minessale <
> anthony.minessale at gmail.com> wrote:
>
>> All global variables are always accessible from your channel so you just
>> look for it like any channel variable. If you set a var with the same name
>> on the channel, it will mask the global.
>>
>> You can also use ${global_getvar <varname} but really there is little
>> point when you can use ${<varname>} as usual.
>>
>>
>>
>>
>>
>>
>> On Fri, Nov 22, 2013 at 12:14 AM, Avi Marcus <avi at avimarcus.net> wrote:
>>
>>> Perhaps you want limit, hash, or DB. Those are accessible by name from
>>> everywhere.
>>>
>>> Although, I think there are globals too somewhere.
>>>
>>> -Avi
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>>
>>>
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> 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/
>> Twitter: http://twitter.com/FreeSWITCH_wire
>>
>> AIM: anthm
>> MSN:anthony_minessale at hotmail.com
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+19193869900
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>>
>>
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> 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
>>
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131125/4943b0c3/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list