Unknown opened 3 years ago
|
|
You don't use https://xmpp.org/extensions/xep-0357.html for Push? |
|
@licaon-kter Where XEP-0357 covers VoIP? Siskin users custom extensions for push (including encrypted push notifications) to make VoIP work. @uzairsabir When you receive a call from CallKit your app should be restored and you need to wait until it connects to XMPP server as this is required to establish VoIP connection. |
|
@hantu85 I thought it's that old Apple VOIP push that other apps were abusing before iOS13, ignore my ignorance as needed. :) |
|
@hantu85 "app should be restored and you need to wait until it connects to XMPP server as this is required to establish VoIP connection" How ? I am using the following code. forget the encryption and decryption for now: func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void) { // RTCInitializeSSL(); // AccountSettings.initialize(); // XmppService.instance.initialize(); // CallManager.initializeCallManager();
|
|
@licaon-kter Apple has a few different kinds of pushes. Siskin uses "normal" push with high priority for messages and CallKit for VoIP. XEP-0357 covers only how to send push to the component which will notify device, but does not specify a way to pass other data than sender jid, message body, or unread counter. Custom payload for sending other things (ie. kind of a VoIP call audio or a video) is not covered and required a separate extension. |
|
@uzairsabir When your app will be notified from CallKit that "user accepted to call", you need to "wait" for connection (XMPPClient for this account) to be in a connected state. |
|
i have tried the following code when "cancel call button is pressed from callkit" after receiving VOIP when app is killed. But unable to make connection please suggest something. func reject() { // DispatchQueue.main.async { // // guard XmppService.instance.getClient(for: self.account)?.state == .connected() else { // // return; // } // // if let client = XmppService.instance.getClient(for: self.account) { // // let _session = JingleManager.instance.open(for: client, with: self.jid, sid: self.sid, role: .responder, initiationType: .message); // // self.session = _session // // } // // } // guard let session = self.session else { self.reset(); return; }
|
|
You are not "waiting for reconnection", you just check if it is currently reconnected. |
|
@hantu85 how to reconnect would you like to share the code ? |
|
@hantu85 resolved by adding this code in my callkit delegate, XmppService.instance.reconnect(client: client) Thank you for your support. |
Hi,
First all of thank you for this amazing chat library it is working very fine.
I have implemented VOIP push notification from my own server working fine, but when application removed from running or killed phone start ringing, able to accept or reject call but not connected to xmpp kindly help me i need your guidance.