Skip to content

Bring in Sangoma Fork Changes #64

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 21 commits into from
Aug 14, 2019
Merged

Conversation

kylekurz
Copy link
Contributor

@kylekurz kylekurz commented Jul 17, 2019

We've completed our initial pass of updated the react-native-callkeep dependency to provide a more consistent API across the JS between Android and iOS. We've also extended the Android code to support multiple calls. We don't claim this is perfect, but it's been solid for us for the last month and @danjenkins has been utilizing our fork for some of his projects, so we think it's stable enough to bring into consideration for mainline and just work on feature requests moving forward.

Edit: Thanks to @bhuangy for his help on this too, that got squashed down in my PR.

kylekurz and others added 4 commits April 17, 2019 12:59
This is the culmination of the Sangoma fork work to update
react-native-callkeep to support more consistent SDK features across
both iOS and Android. Specifically, adding multi-call tracking to
Android and a more consistent JS interface. This is a major version
bump, as updating to this will break existing applications. We've
attempted to keep the README updated with the proper instructions,
although we did *not* write a transition guide. Happy to help contribute
additional work if desired prior to merging, or to be a contributor on
the community project to help maintain moving forward and avoid our own
fork.
@@ -0,0 +1,44 @@
package io.wazo.callkeep;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, we started implementing conference, but it was removed from our GA requirements, so this isn't finished yet. This file is the framework for where further implementation will happen.

@@ -94,132 +139,81 @@ private Boolean canMakeOutgoingCall() {
}

private Connection createConnection(ConnectionRequest request) {
connection = new Connection() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved and updated to VoiceConnection.java instead of being inline in the service.

@danjenkins
Copy link
Collaborator

I can confirm I've been using this fork for a month or so and seems good from a functionality perspective now

@kylekurz
Copy link
Contributor Author

#poorsport over here forgot to thank @danjenkins for his contributions too. ;)

@sboily
Copy link
Member

sboily commented Jul 17, 2019

Hello, thank you for this contribution! We'll check as soon as possible.

Kyle Kurz and others added 4 commits July 22, 2019 12:22
Kyle Kurz added 2 commits July 24, 2019 08:06
Brandon Huang and others added 2 commits July 25, 2019 10:28
@danjenkins
Copy link
Collaborator

@kylekurz just noticed you guys enabled multiple calls on android but havent updated endAllCalls to kill them all

endAllCalls = () => {

@manuquentin
Copy link
Contributor

Hi !
We're integrating these changes in our product, that's a great work !
I've an issue with multi calls on Android, when I'm on call with a number A, I click on Add a call in the native interface, then didReceiveStartCallAction is triggered to call B.

When B answer, I call setCurrentCallActive with the UUID of the B call, but when doing it, that's the first call (A) that is displayed as active.

I'm double checked the uuid (is JS and Java code) they correspond to the B call.

Do you have this issue too ?
Thanks !

@danjenkins
Copy link
Collaborator

danjenkins commented Aug 2, 2019 via email

@kylekurz
Copy link
Contributor Author

kylekurz commented Aug 2, 2019

@manuquentin I'm on vacation, but @bhuangy is going to take a look.

}
}

RCT_EXPORT_METHOD(updateDisplay:(NSString *)uuidString :(NSString *)displayName :(NSString *)uri)
Copy link
Contributor

@chevonc chevonc Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method looks like a good candidate to merge with
RCT_EXPORT_METHOD(reportUpdatedCall:(NSString *)uuidString...) on line 503 in this file, we can keep the api back-compat by adding the extra arg.

Additionally, I was thinking to make this api would be more flexible we can change uri => handle and allow the caller/client application to also pass handleType, as the owner of the call session. When we displayIncomingCall we specify handleType, which may not always be of type CXHandleTypePhoneNumber.

-displayIncomingCall
  CXCallUpdate *callUpdate = [[CXCallUpdate alloc] init];
    callUpdate.remoteHandle = [[CXHandle alloc] initWithType:_handleType value:handle];

}

@ReactMethod
public void setMutedCall(String uuid, boolean shouldMute) {
Copy link
Contributor

@manuquentin manuquentin Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When calling this method. I don't see the mute button updated on the native UI.
Have you ever succeeded to change it ?

Screenshot_20190807-132335_Phone

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Emmanuel, the native UI should update to correspond to the correct mute state, and does on our project. Can you please confirm you have this basic flow for each of your callkeep functions?
Call setMutedCall in RN app -> callkeep tells the native sdk to update audio state -> sends a didPerformSetMutedCallAction event to the RN app -> In event callback perform the actual mute action.

Copy link
Contributor

@manuquentin manuquentin Aug 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bhuangy !
Yes I receive the didPerformSetMutedCallAction. You can check it in the example branch I've created.

In this example, you can start a call and mute it in the app (not in the native UI). Then you will seen that the mute button on the native UI is not in the muted state.
It's works well on iOS but not on Android (on my Samsung J3).

Tell me if you want more details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuquentin I see the issue you're describing in your example app. I'm looking at it today. Everything looks reasonable at a glance...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, what's the status of this PR? Thank you :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuquentin I'm stumped on this. Your code looks right enough, but it's definitely not matching up properly. I've been pulled into other things, so I'm not actively looking at this right this second.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sboily Overall, I still think the PR is a serious improvement to the previous CallKeep release. @manuquentin has pointed out one place where he's seeing an issue that I've not been able to resolve yet and @danjenkins pointed out two small changes that should be addressed today or tomorrow by us.

I think the real decision is "is this better", not "is this perfect", but I'm not the maintainer, I'm the one asking for the merge, ha. If we can get to a point where everyone is happy enough to merge, we can continue pushing additional, smaller, fixes upstream during development or join as contributors (your choice) to keep pushing this forward.

Copy link
Member

@sboily sboily Aug 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @kylekurz, this is my previous discussion with @manuquentin and that exactly my point. I'm agree, i think we need to merge to master, give example (#77) for people to test this new feature, and release a new version on few weeks. It give chance to another people to contribute on small bug instead a big branch. So if there is no objection, i'm agree to merge it. Thank you for your contribution to enhance callkeep :)

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 think we should wait until @bhuangy fixes Dan's issues (he's working on that now, should be done today) before merging.

@kylekurz
Copy link
Contributor Author

As of now, the only known outstanding issue I'm aware of is @manuquentin's problem with mute matching the app's state.

@manuquentin
Copy link
Contributor

Thanks @kylekurz, @bhuangy, @danjenkins @chevonc and @sboily for your implication in this PR !
I'm merging it and we'll dig into this minor behaviour later.

@manuquentin manuquentin merged commit 724104d into react-native-webrtc:master Aug 14, 2019
manuquentin added a commit that referenced this pull request Aug 14, 2019
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.

7 participants