Voice call not ringing when device is locked (#547)
Closed
Unknown opened 3 years ago

Hello, thanks for making Siskin!

Describe the bug

Trying to make a voice call to an iPhone with siskin does not ring when the iPhone is locked. Instead, the user only get a notification as if it had been a text message.

To Reproduce Steps to reproduce the behavior:

  1. Lock iPhone, possibly wait a bit if backgrounding is not immediate (I only tried after a few minutes of inactivity)
  2. Get someone else to call (in my case using conversation. The server is prosody 0.11.12)
  3. See iPhone screen briefly lit up with a "New message!" popup on lock screen, a discrete message buzz and no ringing. This is the same popup one gets when sending a normal text message through xmpp.

Expected behavior push obviously does work since the screen lit up with a message, but it'd be appreciable to get a real call incoming notification and ability to answer if possible.

Details (please complete the following information):

  • Siskin Version: 7.1
  • iOS version: 14.7.1
  • iPhone model: iPhone SE

Additional context On server side (prosody 0.11.12) I can see in logs that a call notification has been sent (I'm censoring user names but I left the real push ID if you can check on servers)

Mar 02 21:05:50 xxx prosody[2447550]: xmpp.xxx.org:cloud_notify: Urgent push for xxx (jingle call)
Mar 02 21:05:50 xxx prosody[2447550]: xmpp.xxx.org:cloud_notify: Sending important push notification for xxx@xmpp.xxx.org to push.tigase.im (01#0A01D769C751A5D0E09F8F2BD8A8F73C9351C6497C42F8C7DE095A9DAE33CD17)
Mar 02 21:05:50 xxx prosody[2447550]: s2sout15b6370: Sending[s2sout]: <iq id='95e030c25544b59f4f9a499222c30fb4a5daf9045594331330f4ad3e3a817163' to='push.tigase.im' type='set' from='xmpp.xxx.org'>
Mar 02 21:05:50 xxx prosody[2447550]: c2s1789550: Sending[c2s]: <message to='xxx@xmpp.xxx.org' type='chat' id='jm-propose-n46Csw0OObHXT/OuN9uVLw' from='yyy@xmpp.xxx.org/Conversations.Gt27'>

This differs from text messages push notification like below, that don't get the "Urgent push (jingle call)" message:

Mar 02 21:19:29 xxx prosody[2447550]: xmpp.xxx.org:cloud_notify: Invoking cloud handle_notify_request() for offline stanza
Mar 02 21:19:29 xxx prosody[2447550]: xmpp.xxx.org:cloud_notify: Sending important push notification for xxx@xmpp.xxx.org to push.tigase.im (01#0A01D769C751A5D0E09F8F2BD8A8F73C9351C6497C42F8C7DE095A9DAE33CD17)
Mar 02 21:19:29 xxx prosody[2447550]: s2sout15b6370: Sending[s2sout]: <iq id='60af9d97e9bcc16f2b33ec36d85eb51c2c61e74db5f50fd13fbb1e21895a837c' to='push.tigase.im' type='set' from='xmpp.xxx.org'>

(the server also sends unimportant push notification for what I assume is state change, which I don't care about, but don't seem to wake up the iphone either anyway so that's not important)

Also, not 100% related but a bonus question: is it possible to make the notification display text preview instead of the generic "New message" popup in lock screen? For myself I appreciate the benefits of not displaying contents privacy-wise, but this particular user does not care much.

Happy to test anything or provide more server logs if required!

Unknown commented 3 years ago

is it possible to make the notification display text preview instead of the generic "New message" popup in lock screen?

Depends, it might be possible once encrypted push is developed. Else you'd send all your messages to Google/Apple.

Unknown commented 3 years ago

Depends, it might be possible once encrypted push is developed. Else you'd send all your messages to Google/Apple.

I was assuming the push notification would wake up the phone, at which point siskin could take over and check with the server -- but from this answer I take it siskin isn't actually woken up and it's purely infos from the push server? :/ In that case I agree it's best not to send content, right...

The server should have the info that it's a call and not a text message though?

Unknown commented 3 years ago

Push notifications for calls are in SiskinIM only supported if encrypted push notifications are used. In other cases, the XMPP server has no way to inform the push component which forwards notifications to APNS that it actually received a voice call (not a message).

AFAIK, prosody has support for encrypted notification (including those for voice calls), so please verify that you are using a recent version of prosody (with mod_cloud_notify_encrypted enabled - if I correctly remember the name of that module).

Unknown commented 3 years ago

AFAIK, prosody has support for encrypted notification (including those for voice calls), so please verify that you are using a recent version of prosody (with mod_cloud_notify_encrypted enabled - if I correctly remember the name of that module).

Thanks! I don't have this module enabled, I'll give it a try and reopen if required.

Unknown commented 3 years ago

Hm, bit of a mixed result here: I've updated prosody to the latest 0.11.13 (from 0.11.12) and enabled mod_cloud_notify_encrypted. my bonus I-don't-really-care question thus got fixed: text messages content now displays along with sender name (but not all the time? sometimes we still get the usual New message! popup instead, I can't see a pattern in how to reproduce) ... but calls still show as "New message!", without any hint that it's a call nor ringing.

Anything else to try? For what it's worth here are the modules I have enabled right now:

modules_enabled = {

  "admin_adhoc";

  "announce";
  "blocklist";
  "bookmarks";

  "carbons";
  "cloud_notify";
  "cloud_notify_encrypted";
  "csi";
  "dialback";
  "disco";
  "groups";
  "http_files";


  "mam";
  "motd";
  "pep";
  "ping";
  "private";
  "proxy65";
  "register";
  "roster";
  "saslauth";
  "server_contact_info";
  "smacks";
  "time";
  "tls";
  "uptime";

  "vcard_legacy";
  "version";
  "watchregistrations";

  "welcome";
  "turncredentials";
  "turncredentials";
"external_services";
};
Unknown commented 3 years ago

It is possible that "New message!" is displayed for ie. OMEMO encrypted messages or other types of message for which notification is sent but without a body.

As for calls showing as "New message!", I suppose you would need to reach out to Prosody to clarify what is being sent and what is not in their notifications.

Unknown commented 3 years ago

Thanks for the reply!

I've added traces to the mod_cloud_notify module to check what prosody was sending -- I didn't realize that "New message!" came from prosody itself, and I've confirmed it indeed does send just that...

In particular, I can see there's an urn:xmpp:jingle-message:0 notification that goes to the notify module but never makes it to the request sent to server... So I'll go get digging on their side first, it looks like siskin does what's it's being asked to do :)

I'm closing this (again) until I've got that bit working and might reopen it if I need further assistance with siskin at this point, you've been of great help!

Unknown commented 3 years ago

For follow up if anyone else stumbles upon this thread: I was right on track, and your advice about mod_cloud_notify_encrypted was the most helpful, it does everything required since last year.

The problem was that siskin does not recheck the discovery informations ( https://xeps.tigase.net//docs/push-notifications/encrypt/issue #421-discovering-support ) when reconnecting on server restart, the account had to be disabled/re-enabled on the device. This can be confirmed by checking for encryption settings in the cloud_notify config of the user in prosody's libdir as I was suggested here: https://groups.google.com/g/prosody-users/c/sSPALD-1Q9k

I have another qualm now that missed calls don't leave any log for the user, but I'll open a different issue for that. Thank you both for the help!

issue 1 of 1
Type
Bug
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/siskin-im#547
Please wait...
Page is in error, reload to recover