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

BACKGROUND_JOB event received before action execution #95

Open njalmeida opened 3 years ago

njalmeida commented 3 years ago

Hi. I’m using “bgapi” to send commands to Freeswitch and I was expecting to receive the BACKGROUND_JOB event with the command’s response after the action was effectively executed, which is not the case.

I noticed that this happens with commands such as uuid_bridge, uuid_park, uuid_transfer, etc. but it does not happen when executing an “originate”, where the BACKGROUND_JOB event is fired only after the call establishment or rejection.

This leads to the execution of subsequent commands assuming that the call is in a given state that might not be true.

I understand that this is the Freeswitch behavior but I was wondering if someone faced this issue at some point and what should be the proper way to address it.

Thanks in advance!