Skip to content

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 16 commits into from
Dec 5, 2017
Merged

Sendmsg support #53

merged 16 commits into from
Dec 5, 2017

Conversation

goodboy
Copy link
Member

@goodboy goodboy commented Dec 3, 2017

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:

  • using CHANNEL_DESTROY events to trigger session destruction
  • removing a bunch of insane logic from the BACKGROUND_JOB handler which was required because we were previously using CHANNEL_HANGUP as the session destroyer

Tyler Goodlet added 3 commits December 3, 2017 12:31
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
@goodboy goodboy self-assigned this Dec 3, 2017
@goodboy goodboy requested review from vodik and moises-silva December 3, 2017 19:57
Tyler Goodlet added 3 commits December 3, 2017 21:52
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
@goodboy goodboy force-pushed the sendmsg_support branch 2 times, most recently from e7721a2 to 19e8c3f Compare December 4, 2017 03:31
@goodboy
Copy link
Member Author

goodboy commented Dec 5, 2017

Damn, typo in 3ca3abf message.

Tyler Goodlet added 7 commits December 5, 2017 12:26
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.
@goodboy goodboy merged commit b4cd5cb into master Dec 5, 2017
@goodboy goodboy deleted the sendmsg_support branch December 6, 2017 17:57
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

Successfully merging this pull request may close these issues.

2 participants