[Freeswitch-users] JavaScript ApiExecute return values

Anthony Minessale anthony.minessale at gmail.com
Fri Jun 11 14:18:03 PDT 2010


all FSAPI interface calls are prototyped the same

string in string out

an easy way to try them is to type it at the cli

 url_encode 'this is a test'



On Fri, Jun 11, 2010 at 3:57 PM, David Swardstrom <
dswardstrom at remotelink.com> wrote:

> One of the problems that I have with the Wiki is that some of the APIs
> return a value.
> In fact, it is possible that many return a Success/Failure if nothing else.
> However, the Wiki does not specify if any data is returned.
>
> The problem sometimes is not with the specified API as listed in the
> JavaScript Wiki page itself but the APIs that can be invoked from
> ApiExecute() or with session.execute().
>
> For example, currently I need to use the url_encode() capability.
> I can find it in mod_commands:
> <quote>
> url_encode
> Url encode a string.
> Usage: url_encode <string>
> </quote>
>
> Normally I would expect that the code would return the encoded string as a
> return
> parameter but this is not stated in the description. I.E., the Wiki entry
> should be:
> <quote>
> url_encode
> Url encode a string.
> Usage: encoded_string = url_encode <string>
> </quote>
> It is possible that the implementation encodes the string and returns it
> in the same parameter (i.e., in place).
>
> I tried looking at the code, but still am too new at looking at the
> FreeSwitch code.
> Of course, I would try it/test it and will do this. But it would be useful
> if
> the Wiki was clearer.
>
> Regards,
> David Swardstrom
> (profile)http://wiki.freeswitch.org/wiki/User:Dswardstrom
>
> _______________________________________________
> 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 <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100611/9157e115/attachment.html 


More information about the FreeSWITCH-users mailing list