BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
140 stars 68 forks source link

flexisip-error-No push notification client available for push notification request #107

Closed willnaoosmith closed 2 years ago

willnaoosmith commented 3 years ago

So, i made followed the documentation for setting up the push gateway, but when i try to send a manual psuh, i got this error:

2020-09-21 16:32:49:837 flexisip-debug-Searching push notification client on dir [/etc/flexisip/apn]
2020-09-21 16:32:49:838 flexisip-debug-Certificate /etc/flexisip/apn/Certificado.prod.pem has a valid expiration: Jul 29 12:07:57 2021 GMT.
2020-09-21 16:32:49:838 flexisip-debug-Adding ios push notification client [Certificado.prod]
2020-09-21 16:32:49:838 flexisip-debug-Certificate /etc/flexisip/apn/Certificado.dev.pem has a valid expiration: Jul 29 12:07:57 2021 GMT.
2020-09-21 16:32:49:838 flexisip-debug-Adding ios push notification client [Certificado.dev]
2020-09-21 16:32:49:838 flexisip-debug-PNR 0x150d450 payload is {
                        "aps": {
                                "sound": "",
                                "loc-key": "IM_MSG",
                                "loc-args": ["Pusher"],
                                "call-id": "",
                                "uuid": "",
                                "send-time": "2020-09-21 19:32:49"
                        },
                        "from-uri": "sip:toto@sip.linphone.org",
                        "display-name": "Pusher",
                        "pn_ttl": 2592000
                }
2020-09-21 16:32:49:838 flexisip-error-No push notification client available for push notification request : 0x150d450

Do anyone already solved this error?

tjfayaz120 commented 3 years ago

I have the same exactly the same problem! How did you solve it?

/opt/belledonne-communications/bin/flexisip_pusher --pntype apple --appid org.myapp.phone --pntok mytok --debug

Writing logs in : /var/opt/belledonne-communications/log/flexisip/flexisip-pusher.log 2021-04-16 22:47:08:470 flexisip-debug-Searching push notification client on dir [/etc/flexisip/apn] 2021-04-16 22:47:08:470 flexisip-debug-Certificate /etc/flexisip/apn/org.myapp.phone.voip.prod.pem has a valid expiration: Apr 16 13:23:26 2022 GMT. 2021-04-16 22:47:08:470 flexisip-debug-AppleClient[0x7e18e0]: constructing AppleClient with TlsConnection[0x7e2640] 2021-04-16 22:47:08:470 flexisip-debug-Adding ios push notification client [org.myapp.phone.voip.prod] 2021-04-16 22:47:08:470 flexisip-debug-Certificate /etc/flexisip/apn/org.myapp.phone.prod.pem has a valid expiration: Mar 8 10:06:12 2022 GMT. 2021-04-16 22:47:08:471 flexisip-debug-AppleClient[0x7e6560]: constructing AppleClient with TlsConnection[0x7e7660] 2021-04-16 22:47:08:471 flexisip-debug-Adding ios push notification client [org.myapp.phone.prod] 2021-04-16 22:47:08:471 flexisip-debug-PNR 0x7e9600 payload is { "aps": { "sound": "", "loc-key": "IM_MSG", "loc-args": ["Pusher"], "call-id": "", "uuid": "", "send-time": "2021-04-16 21:47:08" }, "from-uri": "sip:toto@sip.linphone.org", "display-name": "Pusher", "pn_ttl": 2592000 } 2021-04-16 22:47:08:471 flexisip-error-No push notification client available for push notification request : 0x7e9600 Segmentation fault

sanjayws commented 3 years ago

You need to name your cert (.pem) file according to the app id, e.g. if your app id is com.mysip.phone then the corresponding pem file should be com.mysip.phone.voip.pem. The "client" here is referring to the cert, by default found in /etc/flexisip/apn

nddeshmukh1610 commented 2 years ago

I'm able to send the push to iOS device using com.domain1.domain2.voip.dev.pem via https://pushtry.com

but when I'm trying via flexisip-pusher, I am getting a similar issue reported earlier see the logs below, I tried renaming the file name as suggested by @sanjayws but no luck, any help/advice will be really appreciatable.

2021-07-24 07:57:16:125 flexisip-debug-Searching push notification client on dir [/etc/flexisip/apn] 2021-07-24 07:57:16:126 flexisip-debug-Certificate /etc/flexisip/apn/com.domain1.domain2.voip.dev.pem has a valid expiration: Aug 22 14:16:12 2022 GMT. 2021-07-24 07:57:16:126 flexisip-debug-AppleClient[0x1586910]: constructing AppleClient with TlsConnection[0x15875a0] 2021-07-24 07:57:16:126 flexisip-debug-Adding ios push notification client [com.domain1.domain2.voip.dev] 2021-07-24 07:57:16:126 flexisip-debug-PNR 0x158a380 payload is { "aps": { "sound": "", "loc-key": "IM_MSG", "loc-args": ["Pusher"], "call-id": "", "uuid": "", "send-time": "2021-07-24 11:57:16" }, "from-uri": "sip:toto@sip.linphone.org", "display-name": "Pusher", "pn_ttl": 2592000 } 2021-07-24 07:57:16:126 flexisip-error-No push notification client available for push notification request : 0x158a380 Segmentation fault

If anyone needs help in setting up for Android, please reach me I will be happy to help.

MacKiller2000 commented 2 years ago

@nddeshmukh1610, it would be really great to know how you troubleshoot with Android. For instance, where do you get the device_id, and should it work under the emulator? Thanks!

nddeshmukh1610 commented 2 years ago

@MacKiller2000 Do you mean pn-tok when you say device_id? It will not work with an emulator, only real devices.

MacKiller2000 commented 2 years ago

yes, thank you @nddeshmukh1610! That helps. Is there anything you think may be useful to us as we start on the set up of flexisip notifications for android and ios? Thanks again!

eskov-ea commented 1 year ago

Have problems with FCM service. Accidentaly it stops working. PushNotification module is:

enabled=true firebase=true firebase-projects-api-keys=:

And the given message when a call initiates is:

flexisip-error-Cannot send push: No push notification client available for push notification request

What can cause this behavier? If I call the test push under bin/flexisip_pusher with the very same parameters it works fine. Apple APNS service works fine. Any help.

@sanjayws @willnaoosmith

willnaoosmith commented 1 year ago

I'm not working on a project of my old workplace that had Flexisip, so I can't help you that much. If you want to try opening other issue, since this issue is closed. If not, let me know, because I reopen this one then.

eskov-ea commented 1 year ago

I'm not working on a project of my old workplace that had Flexisip, so I can't help you that much. If you want to try opening other issue, since this issue is closed. If not, let me know, because I reopen this one then.

Thank you! I have opened a new one