It's also a pretty good abstraction. If the protocol ever changed significantly (highly unlikely) then the change can be implemented in the api/bgapi calls. Thus applications using them would still work with a recompile/restart, while applications using sendRecv/send would break because the underlying command would be different. The protocol is incredibly unlikely to change in such a manner though, so it's a moot point. If anything the higher level functions need to have linger/nolinger etc added. send/sendRecv are lower level functions. If anything you should think of them in terms of private/protected, only to be used for extending the client to add support for commands that aren't supported (yet) at the higher level. -Steve On 19 July 2014 12: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