This pattern of abstraction is very common, useful for keeping consumer code clean, is not generally confusing (sorry that you thought it was, but to many people it would be obvious) and absolutely should not be removed for the reason stated.
On 19 July 2014 08:54, Peter Olsson <peter@olssononline.se> wrote:
I don't fully understand the confusion here. api/bgapi are just there to simplify how to send commands (since they are the mosy commonly used I guess).
I'm pretty sure it would cause huge problems for everyone using ESL today, if we'd just remove those functions.
/Peter
2014-07-19 0:18 GMT+02:00 Normando Hall <nhall@unixlan.com.ar>:
_________________________________________________________________________Hi guys
After 2 days I understand some issues with ESL and the NodeJS ESL wrapper (modesl).
Learning to use event socket I read that has commands like: api - bgapi - linger, nolinger etc.
Then, when reading the ESL wrapper for NodeJS I can't found those sockets commands. Only found api and bgapi, but not linger, nolinger, etc. So, the wrapper has the same methods as ESL has. But why I can't found those linger and nolinger methods? Here is the answer from the ESL wiki:
api($command, $args) is identical to sendRecv("api $command $args")
and
bgapi($command, $args) is identical to sendRecv("bgapi $command $args")
So... I can figured that "linger" or other commands should send into the "send" or "sendRecv" methods. This cause me a confussion.
So, all ESL commands must be send through "send" or "sendRecv" methods, and "api" or "bgapi" are shorthands of "send" method for api/bgapi.
I think these methods (api-bgapi) should be remove from ESL, to avoid future confussion.
Regards
Normando
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@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@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org