-
Notifications
You must be signed in to change notification settings - Fork 32
Sendmsg support #53
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
Merged
Merged
Sendmsg support #53
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The `CHANNEL_DESTROY` event is transmitted after a channel has been fully torn down (Similar to `CHANNEL_HANGUP_COMPLETE`) and includes cdr related stats that are more useful to our `CDR` app. This allows coroutines to wait on post `CHANNEL_HANGUP` events (such as events that are fired when a dialplan app is killed - eg. `PLAYBACK_STOP`) prior to waiting on this final event that indicates teardown. - Move the `CDR` app to use `CHANNEL_DESTROY` for stats collection - Make `CHANNEL_HANGUP` use the `lookup_sess` handler Resolves #23
Deprecate `Session.broadcast()` as the FS core behaviour is unreliable. Add `execute()` support and use throughout the session API for all FS core app commands. Resolves #52
e7721a2
to
19e8c3f
Compare
19e8c3f
to
c24b724
Compare
moises-silva
approved these changes
Dec 5, 2017
Damn, typo in 3ca3abf message. |
There is a bunch of complexity in the `BACKGROUND_JOB` handler to deal with blocking the event loop while job uuids are inserted as well as popping sessions based on failed jobs which might never receive a `CHANNEL_HANGUP`. Since we're now using `CHANNEL_DESTROY` (which should always arrive for every corresponding `CHANNEL_CREATE`) there's no need to worry about any of this crazy session tracking logic in the job handler. Simply create `Job` instances for every received job event and ignore any which don't correspond to locally tracked sessions.
0ddc25a
to
b3acbd5
Compare
39ab0f1
to
022b3f4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This completes #52 and must be landed prior to the tests added in #49 and #51.
I ended up cleaning up a lot of stuff to get this working alongside background jobs (which turn out have the same response event type as
sendmsg
requests) including:CHANNEL_DESTROY
events to trigger session destructionBACKGROUND_JOB
handler which was required because we were previously usingCHANNEL_HANGUP
as the session destroyer