-
- Notifications
You must be signed in to change notification settings - Fork 314
Move sip_ua and hide internals #29
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
Move sip_ua and hide internals #29
Conversation
lib/src/sip_ua_helper.dart Outdated
| Timer(Duration(milliseconds: 100), () { | ||
| _handleCallState('stream', null, e.stream, e.originator, null, null); | ||
| _notifyCallStateListeners( | ||
| CallState(CallStateEnum.STREAM, stream: e.stream)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we need to pass the originator parameter, you can know that stream is local or remote for proper display.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding originator
| this._ua.on(EventRegistrationFailed(), (EventRegistrationFailed event) { | ||
| logger.debug('registrationFailed => ' + (event.cause)); | ||
| _registerState = 'registrationFailed[${event.cause}]'; | ||
| _registerState = RegistrationStateEnum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a way to send code and cause to the UI, telling why the registration failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code is not available, and as only cause is available I'll just add an extra parameter to the listener like this...
void registrationStateChanged(RegistrationStateEnum state, String cause);
lib/src/sip_ua_helper.dart Outdated
| _handleCallState( | ||
| 'failed', event.response, null, event.originator, null, null); | ||
| _notifyCallStateListeners( | ||
| CallState(CallStateEnum.FAILED, originator: event.originator)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as registration, Need a way to send code and cause to the UI, telling why the call failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding cause, but it appears that code is not passed and not available in the EventFailed
lib/src/sip_ua_helper.dart Outdated
| _handleCallState( | ||
| 'failed', event.response, null, event.originator, null, null); | ||
| _notifyCallStateListeners( | ||
| CallState(CallStateEnum.FAILED, originator: event.originator)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as registration, Need a way to send code and cause to the UI, telling why the call failed.
| I've made changes and updated the PR |
| LGTM |
| thanks |
I've divided this PR into 2 commits. Although neither commit is viable without the other, it helps to separate the simple and complex parts of this PR.
The first commit acdba14 simply changes paths and imports
The second commit e0c474c is concerned with changing the listener mechanism between example and sip_ua_helper