englercj / node-esl

FreeSWITCH ESL implementation for Node.js; implements the full Event Socket Library specified in: http://wiki.freeswitch.org/wiki/Esl
http://englercj.github.com/node-esl/
MIT License
170 stars 111 forks source link

Connection.bgapi doesn't seem to work - callback not called #46

Closed lafar6502 closed 9 years ago

lafar6502 commented 9 years ago

Hi, I'm trying to use bgapi call but it never executes (I mean, the callback function is not called). This also means Connection.show function doesn't work as well because it relies on bgapi

examples of not working code

conn.show('status', 'json', function(res) {
         //this never gets called
         console.log('show', arguments);

    });
conn.bgapi('show status as json', [], '123123123123123', function(res) {
        console.log('show api', arguments); //never called as well
    });

conn.connected() is true and conn.api() call works OK What's wrong?

lafar6502 commented 9 years ago

Update: discovered that it's necessary to add job uuid to bgapi() call. Without job-uuid the callback will never be called. But show() function doesn't specify the job-uuid and so it never gets the result.

pepedocs commented 9 years ago

Hi,

AFAIK there's no 'status' report for mod command show. But there's a standalone mod c9mmand called 'status'.

Please double-check if there's such report here - https://wiki.freeswitch.org/wiki/Mod_commands#show

cheers

englercj commented 9 years ago

Should be fixed in v1.1.5 after merging #47.