BelledonneCommunications / liblinphone

Linphone.org mirror for liblinphone (git://git.linphone.org/liblinphone.git)
http://linphone.org
GNU Affero General Public License v3.0
378 stars 219 forks source link

Legacy PUSH notitfications on latest release #229

Closed mentax007 closed 1 year ago

mentax007 commented 1 year ago

Hello,

I'm trying to configure and use PUSH notification with linphone-android. I register app with firebase, download google-servies.json file and replace existing one. The source which I use is the latest from master branch https://gitlab.linphone.org/BC/public/linphone-android After first compile was done, I realize that pn-tok did not been pushed to the phone, so I include an option:

[net]
use_legacy_push_notification_params=1

However I still receiving registration with the following string:

sip:sk@100.77.XX.XX:7000;pn-prid=cHcBIOv0RkSga4m2XnxbhT:APA91bHqUXZxaqtzgXLWl2v5XGR6THzBFaEC6Rv8meJjqMWmCQpDsbgXXU0X1rgzyrXX_ihz4VCas_m4SQhpE0jPMbtqT6y3KhCX20x1CLiKia19IDunC9gCe1e-oC8qUbXXGpXXgvZd;pn-provider=fcm;pn-param=30390XX02XXX;pn-silent=1;pn-timeout=0;transport=udp;+sip.instance="urn:uuid:e57bb893-5474-0061-86ff-397a0d212XXX";+org.linphone.specs="ephemeral/1.1,groupchat/1.2,lime"

Any idea what could be wrong?

Viish commented 1 year ago

Hi,

Yes, it seems legacy push format support was dropped on October 28th, 2021 in our SDK, in commit ef31804524f406cf025fde00359fa5e87887c4a2.

Cheers,

mentax007 commented 1 year ago

According to WIKI this should work - https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Push%20notifications/

mentax007 commented 1 year ago

Is there any specific reason why it was dropped from linphone-android?

Viish commented 1 year ago

It wasn't specifically removed for Android, it was removed in our SDK (but I don't know why, Quentin who did the removal doesn't remember why), sorry.

I'll update the wiki accordingly.

mentax007 commented 1 year ago

What is the latest version I of linphone-android I could use which has this legacy support?

Viish commented 1 year ago

What is the latest version I of linphone-android I could use which has this legacy support?

4.6.14

mentax007 commented 1 year ago

Thanks Viish,

I recompile Linphone-Android from 4.6.14 release, but having same issue. Do I need to add anything else to make legacy mode working?


Linphone Android 4.6.14 (, debug)
Linphone SDK 5.1.73 (tags/5.1.73^0, release)
Viish commented 1 year ago

My bad, I thought it was removed in 5.2 SDK release but it was actually 5.1 SDK release. Latest Android app with 5.0 SDK should be 4.5.6.

mentax007 commented 1 year ago

Unfortunately 4.5.6 is too old and I having an issue to compile it in current version off android studio =( is there any way to backport this SDK or implement this legacy feature to latest SDK version? Browsing around but can't find any manual how I can update SDK in linphone-android package. I understand that this legacy push notification is outdated, but I can't do anything about my current switch to make it compatible with new push notification protocol.

Viish commented 1 year ago

You can try to build the 5.2 SDK yourself after revert the previous commit using git revert ef31804524f406cf025fde00359fa5e87887c4a2 Then build the latest android app (5.0 or 5.1) using that SDK.