Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add resetEslCustomEvent to recover the endpoint after conference #99

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,15 @@ class Endpoint extends Emitter {
* @returns {Promise} a promise is returned if no callback is supplied
*/
export(param, value, callback) { return setOrExport('export', this, param, value, callback); }
/**
* When the endpoint is used for conference, the esl::event::CUSTOM::<uuid> will be overide to conference
* listener. This API allow top application reset the esl::event::CUSTOM event to recover the endpoint functionality
*/

resetEslCustomEvent() {
this.conn.removeAllListeners('esl::event::CUSTOM::*');
this.conn.on(`esl::event::CUSTOM::${this.uuid}`, this._onCustomEvent.bind(this));
}

/**
* subscribe for custom events
Expand Down