[Freeswitch-users] JavaScript ApiExecute return values

David Swardstrom dswardstrom at remotelink.com
Fri Jun 11 13:57:47 PDT 2010


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



More information about the FreeSWITCH-users mailing list