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

session.mediaHandler.on('getDescription', ...) doesn't apply to early dialogs #275

Closed
josephfrazier opened this issue Jan 20, 2016 · 4 comments

Comments

@josephfrazier
Copy link
Contributor

Here's a demo. Comment out the inviteWithoutSdp: true line to see it working as expected.

This is because each early dialog uses its own MediaHandler (see #7), but it's still counter-intuitive.

EDIT: This applies to the 'setDescription' event as well, of course

@josephfrazier
Copy link
Contributor Author

Here's one potential workaround:

session.mediaHandler.on('getDescription', handleGet);
session.mediaHandler.on('setDescription', handleSet);

// Early dialogs have their own media handlers, so listen for their events too.
// See https://github.com/onsip/SIP.js/issues/275
session.on('dialog', function (dialog) {
  dialog.mediaHandler.on('getDescription', handleGet);
  dialog.mediaHandler.on('setDescription', handleSet);
});

@josephfrazier
Copy link
Contributor Author

So, one way to fix this would be to add the above workaround into sip.js (with analogous behavior for event handler removal, of course). This would mean that 'getDescription' and 'setDescription' can be emitted multiple times during session establishment, but that seems to be more in line with the purpose and documentation of the events in the first place. This would also reduce the need for adding Dialog to the publicly documented API (see onsip/sipjs.com#23 (comment)).

Thoughts?

@egreenmachine
Copy link
Collaborator

We believe that this issue may be resolved in the latest tagged version 0.8.0. Can you please retest with that version and let us know if this is still an issue. We will close this issue on 11/1/17 if we do not hear back. Thanks.

@egreenmachine
Copy link
Collaborator

As stated in previous post, closing due to inactivity and proposed solution in 0.8.X. If this turns out to still be an issue, please re-open.

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