[Freeswitch-users] what can I have in ${} construction

Steven Ayre steveayre at gmail.com
Wed Nov 12 00:12:04 MSK 2014


https://freeswitch.org/confluence/display/FREESWITCH/mod_commands#mod_commands-FromtheDialplan
https://wiki.freeswitch.org/wiki/Mod_commands#From_the_Dialplan

There are also examples scattered throughout the wiki/confluence

It is tucked away somewhere obscure (after all not all api commands are in
mod_commands so it's more generic). Do you have an suggestions for a better
location?

Seeing Italo's comment it'll be documented in the XML dialplan too which I
completely agree is appropriate, but that's still not the only place where
it may be used (can also be used via ESL for example) so it may need
mentioning elsewhere too. Perhaps a page dedicated to the ${} syntax in all
its forms?




On 11 November 2014 13:31, Avi Marcus <avi at avimarcus.net> wrote:

> Hi - where on confluence is this useful information documented? When
> searching, I couldn't find even find it on the wiki.
> -Avi
>
> On Thu, Dec 13, 2012 at 7:45 PM, Anthony Minessale <
> anthony.minessale at gmail.com> wrote:
>
>> It supports the substring with positive and negative vals so:
>>
>> ${foo:3:4} would start at char 3 in the string and eval to the next 4
>> chars
>> ${foo:-3:2} would start at the end and go back 3 chars then print the
>> next 2 chars
>>
>> If the var name is followed by a ( or a space, it will pass the values to
>> the FSAPI and expand the result inline.
>>
>> ${sofia_contact 1004}
>>
>> equiv of...
>>
>> ${sofia_contact(1004)}
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 13, 2012 at 8:53 AM, <covici at ccs.covici.com> wrote:
>>
>>> Hi.  I was experimenting with ${variable} and was wondering what could
>>> be in there before the }?  I can do a substring if I say variable:2, but
>>> I wonder what else you can do?  The bash manual has all kinds of things
>>> you can have, but how much of this will fs do?
>>>
>>> Thanks in advance for any suggestions.
>>>
>>> --
>>> Your life is like a penny.  You're going to lose it.  The question is:
>>> How do
>>> you spend it?
>>>
>>>          John Covici
>>>          covici at ccs.covici.com
>>>
>>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141111/c4ddbd11/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list