Reputation: 21
I've developed a VoIP app. I'm integrating now with callkit framework. Everything works well except conference.
The situation is the following:
1.) I make a call.
2.) Put first call on hold and make another.
3.) I click Conference button to merge both calls.
If I manually remove hold for first call, automatically second call is on hold.
I've read about CXSetGroupCallAction, but there is no match documentation.
Can someone help me?
Thanks.
Upvotes: 1
Views: 2145
Reputation: 921
Call perform merge call action
let call1UUID = UUID(uuidString: call1.callUUID)!
let call2UUID = UUID(uuidString: call2.callUUID)!
let mergeCallAction = CXSetGroupCallAction(call: call1UUID, callUUIDToGroupWith: call2UUID)
let transaction = CXTransaction()
transaction.addAction(mergeCallAction)
callController.request(transaction) { (_) in
}
This will call provider delegate:
func provider(_ provider: CXProvider, perform action: CXSetGroupCallAction) {
// perform merge call here where you merge ports of two call audio i/o
action.fulfill()
}
Upvotes: 2