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

Event Subscriptions #23

Closed
danbarua opened this issue Oct 20, 2015 · 3 comments
Closed

Event Subscriptions #23

danbarua opened this issue Oct 20, 2015 · 3 comments

Comments

@danbarua
Copy link
Owner

Currently an EventSocket subscribes to a few events for convenience:

private readonly HashSet<EventName> subscribedEvents = new HashSet<EventName>()
{
 EventName.ChannelExecuteComplete, 
 EventName.BackgroundJob, 
 EventName.ChannelHangup, 
 EventName.ChannelAnswer, 
 EventName.ChannelProgress, 
 EventName.ChannelProgressMedia, 
 EventName.ChannelBridge, 
 EventName.ChannelUnbridge
};

In high-traffic/high-performance scenarios, users may wish to subscribe to only the minimum events.

Requirement: an EventSocket should subscribe to events lazily as and when they are required, for example, when I do an Originate it should, if necessary, subscribe to the BackgroundJob and ChannelExecuteComplete events if not already done so.

@gregoriusus
Copy link

Maybe this is not necessary. Developer need not to call SubscribeEvents, but can subscribe manually via SendCommand ("event plain xxxxxxxx")

@danbarua
Copy link
Owner Author

There's an experimental branch where this is implemented:
https://github.com/danbarua/NEventSocket/compare/issue-23

@danbarua
Copy link
Owner Author

danbarua commented Mar 2, 2016

Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants