Closed hasanr68 closed 1 year ago
Hi,
Can you show me an example of the PN parameters which it sends out?
Sure:
pn-prid=long token; pn-provider=fcm; pn-param=our firebase ID; pn-silent=1; pn-timeout=0;
I can email actual parameters if you like.
Ok I will add support for the platform name.
But what do you send to the push server, pn-provider, or pn-platform?
What i mean is, do you put pn-provider in platform for the wake up request?
We would use the default script for opensips.cfg. (And push_tokens table). That would autopopulate the table with (firebase in platform column).
Applications.ini had firebase as platform, so we did not have to chose pn-provider/platform manually. Does that help or did I misunderstand the question?
If you use the default, that means that Linphone sends pn-provider=fcm to OpenSIPS, then in in your OpenSIPS script you would map pn-provider to pn-platform? So:
Linphone [REGISTER] -----------------> OpenSIPS store it in the database
pn-provider=fcm map pn-provider to pn-platform
no pn-platform
Is this correct?
Then on an INVITE you would send out:
OpenSIPS (pn-plaform=fcm...) ---> Pushserver
Is that correct?
If so the only thing that need changing in the pushserver is allowing the platform name 'fcm' and point it to 'firebase'
Hi there.
Thanks a lot for the detailed explanation. I would have thought the same from my limited understanding of the system. Just enable platform name to be fcm and maybe send push to both firebase + fcm?
Thanks again for updating the system.
If I map fcm-> firebase in the platform name there is no need to send two requests to the push server. I will commit a fix that does exactly this.
If you send platform='fcm' in the wake up request, it will use application=firebase
Wow - it seems to be done already?
Please test if it works and if this can be closed
Will do and close if all is good.
Just to confirm, apt-get install isn't working. Do I reinstall everything? Or some easy way of updating please?
I did not make any new package.
Just fetch this:
wget https://github.com/AGProjects/sylk-pushserver/commit/029eceaf383a8b2114d0232fd2dce65190449f45.patch
Then apply it:
cd /usr/lib/python3/dist-packages/sylk-pushserver/lib/python3.7/site-packages/pushserver
sudo patch -p2 < /PLACE_OFF_PATCH/029eceaf383a8b2114d0232fd2dce65190449f45.patch
It could be that your path is slightly different, depending on distro
Ok - thanks a lot..
Hi there. Done as you said, updated platform column (push_tokens) to be fcm, following is the error: push rejected: platform must be 'apple', 'android' or 'firebase'
If you apply https://github.com/AGProjects/sylk-pushserver/commit/ae61721911ac498bfe1793841c43803893e186ca.patch it should fix it.
Great - that worked. Out of curiousity, do you think a new package might help? Manually pulling all the patches might be error-prone. Thanks again.
Hi again. Wanted to pull all the updates - is there an easy way of doing that (outside of doing manually) please?
Hi all. It seems the newer Linphone sends out "fcm" as the platform. I think the same platform (fcm vs. firebase) needs to be stated in the applications.ini file. Would it make sense to add fcm as an accepted platform too? Or did I miss something?