Skip to content

Conversation

@rlsutton1
Copy link
Contributor

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

Timer(Duration(milliseconds: 100), () {
_handleCallState('stream', null, e.stream, e.originator, null, null);
_notifyCallStateListeners(
CallState(CallStateEnum.STREAM, stream: e.stream));
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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);

_handleCallState(
'failed', event.response, null, event.originator, null, null);
_notifyCallStateListeners(
CallState(CallStateEnum.FAILED, originator: event.originator));
Copy link
Member

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.

Copy link
Contributor Author

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

_handleCallState(
'failed', event.response, null, event.originator, null, null);
_notifyCallStateListeners(
CallState(CallStateEnum.FAILED, originator: event.originator));
Copy link
Member

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.

@rlsutton1
Copy link
Contributor Author

I've made changes and updated the PR

@cloudwebrtc
Copy link
Member

LGTM

@cloudwebrtc cloudwebrtc merged commit 16a075d into flutter-webrtc:master Oct 22, 2019
@rlsutton1 rlsutton1 deleted the move-sipua-and-hide-internals-pr branch October 22, 2019 02:36
@rlsutton1
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants