Notifications doesnt arrive on iOS after app goes to Background

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

German Cancio-2
Yuvi,

it seems you haven’t configured push notifications - have you read 

<a href="https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting started/iOS/#HGuidelinesforintegratingwithpushnotifications" class="">https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications ?

cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula

Hi German

We have integrated all however still not receiving the push.

Regards

yuvi

German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):

Yuvi,
 
it seems you haven’t configured push notifications - have you read 
 
 
cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

German Cancio-2
Yuvi, 

unfortunately there might be many reasons why push notifications are not received and you need to dive into each of the components to understand where the problem comes from. You may have problems with your server-side setup (are you using flexisip?) for issuing the push, or with your VoIP certificates used. Then, you may want to check whether VoIP push notification are presented to your device at all.

Germán


On 2 Dec 2020, at 08:57, [hidden email] wrote:

Hi German

We have integrated all however still not receiving the push.

Regards

yuvi

German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):

Yuvi,
 
it seems you haven’t configured push notifications - have you read 
 
 
cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula

Hi German

Yes we are using flexisip

Regards

Yuvi

German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):

Yuvi, 
 
unfortunately there might be many reasons why push notifications are not received and you need to dive into each of the components to understand where the problem comes from. You may have problems with your server-side setup (are you using flexisip?) for issuing the push, or with your VoIP certificates used. Then, you may want to check whether VoIP push notification are presented to your device at all.
 
Germán


On 2 Dec 2020, at 08:57, [hidden email] wrote:

Hi German

We have integrated all however still not receiving the push.

Regards

yuvi

 

German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):

Yuvi,
 
it seems you haven’t configured push notifications - have you read 
 
 
cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula
In reply to this post by German Cancio-2

Hi German

See this is the payload data we get from server 

2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]: sending PNR 0x1fafd80:
:method = POST
:scheme = https
:path = /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
host = api.development.push.apple.com
apns-expiration = 0
apns-topic = com.diseo.circles.voip

{
"aps": {
"sound": "",
"loc-key": "IM_MSG",
"loc-args": ["Pusher"],
"call-id": "",
"uuid": "",
"send-time": "2020-12-03 11:51:11"
},
"from-uri": "sip:[hidden email]",
"display-name": "Pusher",
"pn_ttl": 2592000
}
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: receiving HTTP2 header [:status = 200]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR 0x1fafd80 succeeded
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: stream closed with error code [0]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end of PNR 0x1fafd80
1 push notification(s) sent, 1 successfully and 0 failed.
job is done, thanks for using ./flexisip_pusher. Bye!

 

Still we do not receive push on iPhone

Any suggestions.

Regards

Yuvi

 

German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):

Yuvi, 
 
unfortunately there might be many reasons why push notifications are not received and you need to dive into each of the components to understand where the problem comes from. You may have problems with your server-side setup (are you using flexisip?) for issuing the push, or with your VoIP certificates used. Then, you may want to check whether VoIP push notification are presented to your device at all.
 
Germán


On 2 Dec 2020, at 08:57, [hidden email] wrote:

Hi German

We have integrated all however still not receiving the push.

Regards

yuvi

 

German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):

Yuvi,
 
it seems you haven’t configured push notifications - have you read 
 
 
cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

German Cancio-2
Juvi,

we don’t use flexisip at our site for issuing PN’s so I can’t tell whether there is something wrong from your logs. Are you sure api.development.push.apple.com is the right APNS server to use (see also this link)? Another potential problem (we ran into) is to use a wrong VoIP certificate - and APNS doesn’t provide any negative feedback...

Germán


On 3 Dec 2020, at 19:17, [hidden email] wrote:

Hi German

See this is the payload data we get from server 

2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]: sending PNR 0x1fafd80:
:method = POST
:scheme = https
:path = /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
host = api.development.push.apple.com
apns-expiration = 0
apns-topic = com.diseo.circles.voip

{
"aps": {
"sound": "",
"loc-key": "IM_MSG",
"loc-args": ["Pusher"],
"call-id": "",
"uuid": "",
"send-time": "2020-12-03 11:51:11"
},
"from-uri": "<a href="sip:toto@sip.linphone.org" class="">sip:toto@...",
"display-name": "Pusher",
"pn_ttl": 2592000
}
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: receiving HTTP2 header [:status = 200]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR 0x1fafd80 succeeded
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: stream closed with error code [0]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end of PNR 0x1fafd80
1 push notification(s) sent, 1 successfully and 0 failed.
job is done, thanks for using ./flexisip_pusher. Bye!

 

Still we do not receive push on iPhone

Any suggestions.

Regards

Yuvi

 

German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):

Yuvi, 
 
unfortunately there might be many reasons why push notifications are not received and you need to dive into each of the components to understand where the problem comes from. You may have problems with your server-side setup (are you using flexisip?) for issuing the push, or with your VoIP certificates used. Then, you may want to check whether VoIP push notification are presented to your device at all.
 
Germán


On 2 Dec 2020, at 08:57, [hidden email]wrote:

Hi German

We have integrated all however still not receiving the push.

Regards

yuvi

 

German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):

Yuvi,
 
it seems you haven’t configured push notifications - have you read 
 
 
cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

ios developer
Hi ,
I am also facing same issue , downloaded the latest code form GitHub and compile it successfully on real device with add certificate xcode automatic option.
Still it not working in background or terminated mode


On Fri, Dec 4, 2020 at 12:47 AM German Cancio <[hidden email]> wrote:
Juvi,

we don’t use flexisip at our site for issuing PN’s so I can’t tell whether there is something wrong from your logs. Are you sure api.development.push.apple.com is the right APNS server to use (see also this link)? Another potential problem (we ran into) is to use a wrong VoIP certificate - and APNS doesn’t provide any negative feedback...

Germán


On 3 Dec 2020, at 19:17, [hidden email] wrote:

Hi German

See this is the payload data we get from server 

2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]: sending PNR 0x1fafd80:
:method = POST
:scheme = https
:path = /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
host = api.development.push.apple.com
apns-expiration = 0
apns-topic = com.diseo.circles.voip

{
"aps": {
"sound": "",
"loc-key": "IM_MSG",
"loc-args": ["Pusher"],
"call-id": "",
"uuid": "",
"send-time": "2020-12-03 11:51:11"
},
"from-uri": "sip:[hidden email]",
"display-name": "Pusher",
"pn_ttl": 2592000
}
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: receiving HTTP2 header [:status = 200]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR 0x1fafd80 succeeded
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: stream closed with error code [0]
2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end of PNR 0x1fafd80
1 push notification(s) sent, 1 successfully and 0 failed.
job is done, thanks for using ./flexisip_pusher. Bye!

 

Still we do not receive push on iPhone

Any suggestions.

Regards

Yuvi

 

German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):

Yuvi, 
 
unfortunately there might be many reasons why push notifications are not received and you need to dive into each of the components to understand where the problem comes from. You may have problems with your server-side setup (are you using flexisip?) for issuing the push, or with your VoIP certificates used. Then, you may want to check whether VoIP push notification are presented to your device at all.
 
Germán


On 2 Dec 2020, at 08:57, [hidden email]wrote:

Hi German

We have integrated all however still not receiving the push.

Regards

yuvi

 

German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):

Yuvi,
 
it seems you haven’t configured push notifications - have you read 
 
 
cheers, Germán


On 1 Dec 2020, at 08:50, [hidden email] wrote:

Hi Team

We have installed Linphone iOS sdk in our app.

As soon as app goes to background , upto 1 minute notification arrives for the call but not after that.

I think app goes to Inactive mode, but what can we do that notification should arrive even if the app is killed or on inactive mode?

Regards

Yuvi

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula
We managed to get the notifications however call doenst get established. It just open the app.

When the app at background, notifications arrives but call doesnt get established.

Any suggestions.

ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):

> Hi ,
> I am also facing same issue , downloaded the latest code form GitHub and
> compile it successfully on real device with add certificate xcode
> automatic
> option.
> Still it not working in background or terminated mode
>
>
> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
> <[hidden email]>
> wrote:
>
>> Juvi,
>>
>> we don’t use flexisip at our site for issuing PN’s so I can’t tell
>> whether
>> there is something wrong from your logs. Are you sure
>> api.development.push.apple.com is the right APNS server to use (see also
>> this
>> link
>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>> Another potential problem (we ran into) is to use a wrong VoIP
>> certificate
>> - and APNS doesn’t provide any negative feedback...
>>
>> Germán
>>
>>
>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>
>> Hi German
>>
>> See this is the payload data we get from server
>>
>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]: sending
>> PNR 0x1fafd80:
>> :method = POST
>> :scheme = https
>> :path =
>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>> host = api.development.push.apple.com
>> apns-expiration = 0
>> apns-topic = com.diseo.circles.voip
>>
>> {
>> "aps": {
>> "sound": "",
>> "loc-key": "IM_MSG",
>> "loc-args": ["Pusher"],
>> "call-id": "",
>> "uuid": "",
>> "send-time": "2020-12-03 11:51:11"
>> },
>> "from-uri": "sip:[hidden email]",
>> "display-name": "Pusher",
>> "pn_ttl": 2592000
>> }
>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>> receiving HTTP2 header [:status = 200]
>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>> 0x1fafd80 succeeded
>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>> receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: stream
>> closed with error code [0]
>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end of
>> PNR 0x1fafd80
>> 1 push notification(s) sent, 1 successfully and 0 failed.
>> job is done, thanks for using ./flexisip_pusher. Bye!
>>
>>
>> Still we do not receive push on iPhone
>>
>> Any suggestions.
>>
>> Regards
>>
>> Yuvi
>>
>>
>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>
>> Yuvi,
>>
>> unfortunately there might be many reasons why push notifications are not
>> received and you need to dive into each of the components to understand
>> where the problem comes from. You may have problems with your server-side
>> setup (are you using flexisip?) for issuing the push, or with your VoIP
>> certificates used. Then, you may want to check whether VoIP push
>> notification are presented to your device at all.
>>
>> Germán
>>
>>
>> On 2 Dec 2020, at 08:57, [hidden email]:
>>
>> Hi German
>>
>> We have integrated all however still not receiving the push.
>>
>> Regards
>>
>> yuvi
>>
>>
>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>
>> Yuvi,
>>
>> it seems you haven’t configured push notifications - have you read
>>
>>
>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>  ?
>>
>> cheers, Germán
>>
>>
>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>
>> Hi Team
>>
>> We have installed Linphone iOS sdk in our app.
>>
>> As soon as app goes to background , upto 1 minute notification arrives
>> for
>> the call but not after that.
>>
>> I think app goes to Inactive mode, but what can we do that notification
>> should arrive even if the app is killed or on inactive mode?
>>
>> Regards
>>
>> Yuvi
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

unknown (178 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

German Cancio-2
Do you get CallKit launched? Does the client REGISTER with the server, does then the server send an INVITE to the client? Have you checked that the Call-ID provided in the APNS payload is exactly the same as the one the INVITE? In the log lines you provided, the Call-ID is empty. Also, loc-key should be IC_MSG not IM_MSG.

Below is an example of what you should be sending and then receiving on the client:

2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 ) [PushKit] Notification [0x2803a9080] received with payload : {
    aps =     {
        "call-id" = “deadbeef-dead-beef-deadbeef";
        "loc-args" =         (
            ""
        );
        "loc-key" = "IC_MSG";
        "send-time" = "2020-12-06 12:00:00";
        sound = "";
        uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
    };
    "display-name" = "";
    "from-uri" = "";
    "pn_ttl" = 50;
}

So your forthcoming INVITE should have as Call-ID "deadbeef-dead-beef-deadbeef” in this example.

Germán


> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>
> We managed to get the notifications however call doenst get established. It just open the app.
>
> When the app at background, notifications arrives but call doesnt get established.
>
> Any suggestions.
>
> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>
>> Hi ,
>> I am also facing same issue , downloaded the latest code form GitHub and
>> compile it successfully on real device with add certificate xcode
>> automatic
>> option.
>> Still it not working in background or terminated mode
>>
>>
>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>> <[hidden email]>
>> wrote:
>>
>>> Juvi,
>>>
>>> we don’t use flexisip at our site for issuing PN’s so I can’t tell
>>> whether
>>> there is something wrong from your logs. Are you sure
>>> api.development.push.apple.com is the right APNS server to use (see also
>>> this
>>> link
>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>> Another potential problem (we ran into) is to use a wrong VoIP
>>> certificate
>>> - and APNS doesn’t provide any negative feedback...
>>>
>>> Germán
>>>
>>>
>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>
>>> Hi German
>>>
>>> See this is the payload data we get from server
>>>
>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]: sending
>>> PNR 0x1fafd80:
>>> :method = POST
>>> :scheme = https
>>> :path =
>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>> host = api.development.push.apple.com
>>> apns-expiration = 0
>>> apns-topic = com.diseo.circles.voip
>>>
>>> {
>>> "aps": {
>>> "sound": "",
>>> "loc-key": "IM_MSG",
>>> "loc-args": ["Pusher"],
>>> "call-id": "",
>>> "uuid": "",
>>> "send-time": "2020-12-03 11:51:11"
>>> },
>>> "from-uri": "sip:[hidden email]",
>>> "display-name": "Pusher",
>>> "pn_ttl": 2592000
>>> }
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>> receiving HTTP2 header [:status = 200]
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>> 0x1fafd80 succeeded
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>> receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: stream
>>> closed with error code [0]
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end of
>>> PNR 0x1fafd80
>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>
>>>
>>> Still we do not receive push on iPhone
>>>
>>> Any suggestions.
>>>
>>> Regards
>>>
>>> Yuvi
>>>
>>>
>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>
>>> Yuvi,
>>>
>>> unfortunately there might be many reasons why push notifications are not
>>> received and you need to dive into each of the components to understand
>>> where the problem comes from. You may have problems with your server-side
>>> setup (are you using flexisip?) for issuing the push, or with your VoIP
>>> certificates used. Then, you may want to check whether VoIP push
>>> notification are presented to your device at all.
>>>
>>> Germán
>>>
>>>
>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>
>>> Hi German
>>>
>>> We have integrated all however still not receiving the push.
>>>
>>> Regards
>>>
>>> yuvi
>>>
>>>
>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>
>>> Yuvi,
>>>
>>> it seems you haven’t configured push notifications - have you read
>>>
>>>
>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>> ?
>>>
>>> cheers, Germán
>>>
>>>
>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>
>>> Hi Team
>>>
>>> We have installed Linphone iOS sdk in our app.
>>>
>>> As soon as app goes to background , upto 1 minute notification arrives
>>> for
>>> the call but not after that.
>>>
>>> I think app goes to Inactive mode, but what can we do that notification
>>> should arrive even if the app is killed or on inactive mode?
>>>
>>> Regards
>>>
>>> Yuvi
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
> <unknown.txt>_______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

ios developer
We need to setup server-side too for notifications, Please clear

On Sun, Dec 6, 2020 at 4:48 PM German Cancio <[hidden email]> wrote:
Do you get CallKit launched? Does the client REGISTER with the server, does then the server send an INVITE to the client? Have you checked that the Call-ID provided in the APNS payload is exactly the same as the one the INVITE? In the log lines you provided, the Call-ID is empty. Also, loc-key should be IC_MSG not IM_MSG.

Below is an example of what you should be sending and then receiving on the client:

2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 ) [PushKit] Notification [0x2803a9080] received with payload : {
    aps =     {
        "call-id" = “deadbeef-dead-beef-deadbeef";
        "loc-args" =         (
            ""
        );
        "loc-key" = "IC_MSG";
        "send-time" = "2020-12-06 12:00:00";
        sound = "";
        uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
    };
    "display-name" = "";
    "from-uri" = "";
    "pn_ttl" = 50;
}

So your forthcoming INVITE should have as Call-ID "deadbeef-dead-beef-deadbeef” in this example.

Germán


> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>
> We managed to get the notifications however call doenst get established. It just open the app.
>
> When the app at background, notifications arrives but call doesnt get established.
>
> Any suggestions.
>
> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>
>> Hi ,
>> I am also facing same issue , downloaded the latest code form GitHub and
>> compile it successfully on real device with add certificate xcode
>> automatic
>> option.
>> Still it not working in background or terminated mode
>>
>>
>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>> <[hidden email]>
>> wrote:
>>
>>> Juvi,
>>>
>>> we don’t use flexisip at our site for issuing PN’s so I can’t tell
>>> whether
>>> there is something wrong from your logs. Are you sure
>>> api.development.push.apple.com is the right APNS server to use (see also
>>> this
>>> link
>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>> Another potential problem (we ran into) is to use a wrong VoIP
>>> certificate
>>> - and APNS doesn’t provide any negative feedback...
>>>
>>> Germán
>>>
>>>
>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>
>>> Hi German
>>>
>>> See this is the payload data we get from server
>>>
>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]: sending
>>> PNR 0x1fafd80:
>>> :method = POST
>>> :scheme = https
>>> :path =
>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>> host = api.development.push.apple.com
>>> apns-expiration = 0
>>> apns-topic = com.diseo.circles.voip
>>>
>>> {
>>> "aps": {
>>> "sound": "",
>>> "loc-key": "IM_MSG",
>>> "loc-args": ["Pusher"],
>>> "call-id": "",
>>> "uuid": "",
>>> "send-time": "2020-12-03 11:51:11"
>>> },
>>> "from-uri": "[hidden email]",
>>> "display-name": "Pusher",
>>> "pn_ttl": 2592000
>>> }
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>> receiving HTTP2 header [:status = 200]
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>> 0x1fafd80 succeeded
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>> receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: stream
>>> closed with error code [0]
>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end of
>>> PNR 0x1fafd80
>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>
>>>
>>> Still we do not receive push on iPhone
>>>
>>> Any suggestions.
>>>
>>> Regards
>>>
>>> Yuvi
>>>
>>>
>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>
>>> Yuvi,
>>>
>>> unfortunately there might be many reasons why push notifications are not
>>> received and you need to dive into each of the components to understand
>>> where the problem comes from. You may have problems with your server-side
>>> setup (are you using flexisip?) for issuing the push, or with your VoIP
>>> certificates used. Then, you may want to check whether VoIP push
>>> notification are presented to your device at all.
>>>
>>> Germán
>>>
>>>
>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>
>>> Hi German
>>>
>>> We have integrated all however still not receiving the push.
>>>
>>> Regards
>>>
>>> yuvi
>>>
>>>
>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>
>>> Yuvi,
>>>
>>> it seems you haven’t configured push notifications - have you read
>>>
>>>
>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>> ?
>>>
>>> cheers, Germán
>>>
>>>
>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>
>>> Hi Team
>>>
>>> We have installed Linphone iOS sdk in our app.
>>>
>>> As soon as app goes to background , upto 1 minute notification arrives
>>> for
>>> the call but not after that.
>>>
>>> I think app goes to Inactive mode, but what can we do that notification
>>> should arrive even if the app is killed or on inactive mode?
>>>
>>> Regards
>>>
>>> Yuvi
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
> <unknown.txt>_______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula
In reply to this post by German Cancio-2
Hi German

On Android ,  when linphone service is at background. It wakes up the app after two or three calls.

Means , when app is killed or not touched for few minutes, have to call the person twice , than other person get notifications for call.

Do we have to run the linphone service 24 hours at backeground, if yes which service/key/api would that be ?

Regards
Yuvi



German Cancio wrote on 6. Dec 2020 16:33 (GMT +05:30):

> Do you get CallKit launched? Does the client REGISTER with the server,
> does then the server send an INVITE to the client? Have you checked that
> the Call-ID provided in the APNS payload is exactly the same as the one
> the INVITE? In the log lines you provided, the Call-ID is empty. Also,
> loc-key should be IC_MSG not IM_MSG.
>
> Below is an example of what you should be sending and then receiving on
> the client:
>
> 2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 )
> [PushKit] Notification [0x2803a9080] received with payload : {
>     aps =     {
>         "call-id" = “deadbeef-dead-beef-deadbeef";
>         "loc-args" =         (
>             ""
>         );
>         "loc-key" = "IC_MSG";
>         "send-time" = "2020-12-06 12:00:00";
>         sound = "";
>         uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
>     };
>     "display-name" = "";
>     "from-uri" = "";
>     "pn_ttl" = 50;
> }
>
> So your forthcoming INVITE should have as Call-ID
> "deadbeef-dead-beef-deadbeef” in this example.
>
> Germán
>
>
>> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>>
>> We managed to get the notifications however call doenst get established.
>> It just open the app.
>>
>> When the app at background, notifications arrives but call doesnt get
>> established.
>>
>> Any suggestions.
>>
>> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>>
>>> Hi ,
>>> I am also facing same issue , downloaded the latest code form GitHub and
>>> compile it successfully on real device with add certificate xcode
>>> automatic
>>> option.
>>> Still it not working in background or terminated mode
>>>
>>>
>>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>>> <[hidden email]>
>>> wrote:
>>>
>>>> Juvi,
>>>>
>>>> we don’t use flexisip at our site for issuing PN’s so I can’t
>>>> tell
>>>> whether
>>>> there is something wrong from your logs. Are you sure
>>>> api.development.push.apple.com is the right APNS server to use (see
>>>> also
>>>> this
>>>> link
>>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>>> Another potential problem (we ran into) is to use a wrong VoIP
>>>> certificate
>>>> - and APNS doesn’t provide any negative feedback...
>>>>
>>>> Germán
>>>>
>>>>
>>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>>
>>>> Hi German
>>>>
>>>> See this is the payload data we get from server
>>>>
>>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]:
>>>> sending
>>>> PNR 0x1fafd80:
>>>> :method = POST
>>>> :scheme = https
>>>> :path =
>>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>>> host = api.development.push.apple.com
>>>> apns-expiration = 0
>>>> apns-topic = com.diseo.circles.voip
>>>>
>>>> {
>>>> "aps": {
>>>> "sound": "",
>>>> "loc-key": "IM_MSG",
>>>> "loc-args": ["Pusher"],
>>>> "call-id": "",
>>>> "uuid": "",
>>>> "send-time": "2020-12-03 11:51:11"
>>>> },
>>>> "from-uri": "sip:[hidden email]",
>>>> "display-name": "Pusher",
>>>> "pn_ttl": 2592000
>>>> }
>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>> receiving HTTP2 header [:status = 200]
>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>>> 0x1fafd80 succeeded
>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>> receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>> stream
>>>> closed with error code [0]
>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end
>>>> of
>>>> PNR 0x1fafd80
>>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>>
>>>>
>>>> Still we do not receive push on iPhone
>>>>
>>>> Any suggestions.
>>>>
>>>> Regards
>>>>
>>>> Yuvi
>>>>
>>>>
>>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>>
>>>> Yuvi,
>>>>
>>>> unfortunately there might be many reasons why push notifications are
>>>> not
>>>> received and you need to dive into each of the components to understand
>>>> where the problem comes from. You may have problems with your
>>>> server-side
>>>> setup (are you using flexisip?) for issuing the push, or with your VoIP
>>>> certificates used. Then, you may want to check whether VoIP push
>>>> notification are presented to your device at all.
>>>>
>>>> Germán
>>>>
>>>>
>>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>>
>>>> Hi German
>>>>
>>>> We have integrated all however still not receiving the push.
>>>>
>>>> Regards
>>>>
>>>> yuvi
>>>>
>>>>
>>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>>
>>>> Yuvi,
>>>>
>>>> it seems you haven’t configured push notifications - have you read
>>>>
>>>>
>>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>>> ?
>>>>
>>>> cheers, Germán
>>>>
>>>>
>>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>>
>>>> Hi Team
>>>>
>>>> We have installed Linphone iOS sdk in our app.
>>>>
>>>> As soon as app goes to background , upto 1 minute notification arrives
>>>> for
>>>> the call but not after that.
>>>>
>>>> I think app goes to Inactive mode, but what can we do that notification
>>>> should arrive even if the app is killed or on inactive mode?
>>>>
>>>> Regards
>>>>
>>>> Yuvi
>>>> _______________________________________________
>>>> Linphone-developers mailing list
>>>> [hidden email]
>>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>>
>>>> _______________________________________________
>>>> Linphone-developers mailing list
>>>> [hidden email]
>>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>>
>>>> _______________________________________________
>>>> Linphone-developers mailing list
>>>> [hidden email]
>>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>>
>>>>
>>>> _______________________________________________
>>>> Linphone-developers mailing list
>>>> [hidden email]
>>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>>
>>> _______________________________________________
>>> Linphone-developers mailing list
>>> [hidden email]
>>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>>
>> <unknown.txt>_______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

German Cancio-2
Yuvi,

first of all, it would be beneficial to the community behind this mailing list to feed back if you were successful getting iOS to work, and what were the steps you did finally undertake to achieve this.

As for Android, there is indeed an option is the Linphone settings to have it running in the background. But you shouldn’t need to do so if you use Google’s Firebase push notification service to wake up Linphone. We do this at our site and it works fine. You may however need to disable battery saving settings on some smartphones, such as on Samsung ones. You can see in the client logs if push notifications are being received or not.

If you haven’t yet, you need to get some acquaintance with the Firebase push service. Have a look at the top-level README of the linphone-android gitlab repository. There are many instructions that can be googled on how to generate your own google-services.json. Then you will likely need to configure flexisip accordingly.

cheers, Germán


> On 7 Dec 2020, at 08:04, [hidden email] wrote:
>
> Hi German
>
> On Android ,  when linphone service is at background. It wakes up the app after two or three calls.
>
> Means , when app is killed or not touched for few minutes, have to call the person twice , than other person get notifications for call.
>
> Do we have to run the linphone service 24 hours at backeground, if yes which service/key/api would that be ?
>
> Regards
> Yuvi
>
>
>
> German Cancio wrote on 6. Dec 2020 16:33 (GMT +05:30):
>
>> Do you get CallKit launched? Does the client REGISTER with the server,
>> does then the server send an INVITE to the client? Have you checked that
>> the Call-ID provided in the APNS payload is exactly the same as the one
>> the INVITE? In the log lines you provided, the Call-ID is empty. Also,
>> loc-key should be IC_MSG not IM_MSG.
>>
>> Below is an example of what you should be sending and then receiving on
>> the client:
>>
>> 2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 )
>> [PushKit] Notification [0x2803a9080] received with payload : {
>>    aps =     {
>>        "call-id" = “deadbeef-dead-beef-deadbeef";
>>        "loc-args" =         (
>>            ""
>>        );
>>        "loc-key" = "IC_MSG";
>>        "send-time" = "2020-12-06 12:00:00";
>>        sound = "";
>>        uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
>>    };
>>    "display-name" = "";
>>    "from-uri" = "";
>>    "pn_ttl" = 50;
>> }
>>
>> So your forthcoming INVITE should have as Call-ID
>> "deadbeef-dead-beef-deadbeef” in this example.
>>
>> Germán
>>
>>
>>> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>>>
>>> We managed to get the notifications however call doenst get established.
>>> It just open the app.
>>>
>>> When the app at background, notifications arrives but call doesnt get
>>> established.
>>>
>>> Any suggestions.
>>>
>>> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>>>
>>>> Hi ,
>>>> I am also facing same issue , downloaded the latest code form GitHub and
>>>> compile it successfully on real device with add certificate xcode
>>>> automatic
>>>> option.
>>>> Still it not working in background or terminated mode
>>>>
>>>>
>>>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>> Juvi,
>>>>>
>>>>> we don’t use flexisip at our site for issuing PN’s so I can’t
>>>>> tell
>>>>> whether
>>>>> there is something wrong from your logs. Are you sure
>>>>> api.development.push.apple.com is the right APNS server to use (see
>>>>> also
>>>>> this
>>>>> link
>>>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>>>> Another potential problem (we ran into) is to use a wrong VoIP
>>>>> certificate
>>>>> - and APNS doesn’t provide any negative feedback...
>>>>>
>>>>> Germán
>>>>>
>>>>>
>>>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>>>
>>>>> Hi German
>>>>>
>>>>> See this is the payload data we get from server
>>>>>
>>>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>> sending
>>>>> PNR 0x1fafd80:
>>>>> :method = POST
>>>>> :scheme = https
>>>>> :path =
>>>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>>>> host = api.development.push.apple.com
>>>>> apns-expiration = 0
>>>>> apns-topic = com.diseo.circles.voip
>>>>>
>>>>> {
>>>>> "aps": {
>>>>> "sound": "",
>>>>> "loc-key": "IM_MSG",
>>>>> "loc-args": ["Pusher"],
>>>>> "call-id": "",
>>>>> "uuid": "",
>>>>> "send-time": "2020-12-03 11:51:11"
>>>>> },
>>>>> "from-uri": "sip:[hidden email]",
>>>>> "display-name": "Pusher",
>>>>> "pn_ttl": 2592000
>>>>> }
>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>> receiving HTTP2 header [:status = 200]
>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>>>> 0x1fafd80 succeeded
>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>> receiving HTTP2 header [apns-id = C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>> stream
>>>>> closed with error code [0]
>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end
>>>>> of
>>>>> PNR 0x1fafd80
>>>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>>>
>>>>>
>>>>> Still we do not receive push on iPhone
>>>>>
>>>>> Any suggestions.
>>>>>
>>>>> Regards
>>>>>
>>>>> Yuvi
>>>>>
>>>>>
>>>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>>>
>>>>> Yuvi,
>>>>>
>>>>> unfortunately there might be many reasons why push notifications are
>>>>> not
>>>>> received and you need to dive into each of the components to understand
>>>>> where the problem comes from. You may have problems with your
>>>>> server-side
>>>>> setup (are you using flexisip?) for issuing the push, or with your VoIP
>>>>> certificates used. Then, you may want to check whether VoIP push
>>>>> notification are presented to your device at all.
>>>>>
>>>>> Germán
>>>>>
>>>>>
>>>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>>>
>>>>> Hi German
>>>>>
>>>>> We have integrated all however still not receiving the push.
>>>>>
>>>>> Regards
>>>>>
>>>>> yuvi
>>>>>
>>>>>
>>>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>>>
>>>>> Yuvi,
>>>>>
>>>>> it seems you haven’t configured push notifications - have you read
>>>>>
>>>>>
>>>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>>>> ?
>>>>>
>>>>> cheers, Germán
>>>>>
>>>>>
>>>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>>>
>>>>> Hi Team
>>>>>
>>>>> We have installed Linphone iOS sdk in our app.
>>>>>
>>>>> As soon as app goes to background , upto 1 minute notification arrives
>>>>> for
>>>>> the call but not after that.
>>>>>
>>>>> I think app goes to Inactive mode, but what can we do that notification
>>>>> should arrive even if the app is killed or on inactive mode?
>>>>>
>>>>> Regards
>>>>>
>>>>> Yuvi
>>>>> _______________________________________________

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula
Hi German

Sorry about that.

Yes lets continue with iOS first.  Issue is still there.

Here is the complete request :-

:method = POST
:scheme = https
:path = /3/device/81D492A1221C12BB595FD25BFEF32AE9208488AF929BA8DE94817FDF866DE793
host = api.development.push.apple.com
apns-expiration = 0
apns-topic = com.diseo.circles.voip

{
                                "aps": {
                                        "sound": "",
                                        "loc-key": "IC_MSG",
                                        "loc-args": [""],
                                        "call-id": "6OokNnh8FE",
                                        "uuid": "<urn:uuid:71b4caca-dc42-001b-b586-9805824dcc30>",
                                        "send-time": "2020-12-07 05:58:12"
                                },
                                "from-uri": "",
                                "display-name": "",
                                "pn_ttl": 90
                        }



Also on front end when call comes at background or if app kills , this is what we get.

LinphoneProxyConfig *proxyCfg = linphone_core_get_default_proxy_config(LC);
    if (proxyCfg == nil) {
        lMessage = NSLocalizedString(@"Please make sure your device is connected to the internet and double check your "
                                     @"SIP account configuration in the settings.",
                                     nil);
    } else {
//        lMessage = [NSString stringWithFormat:NSLocalizedString(@"Cannot call %@.", nil), lUserName];
        lMessage = [NSString stringWithFormat:NSLocalizedString(@"Cannot call %@.", nil), lDisplayName];
    }


This is when call is coming

{
    call = "{length = 8, bytes = 0x000b988102000000}";
    message = "Service Unavailable";
    state = 12;
}


Regards
Yuvi




German Cancio wrote on 7. Dec 2020 12:59 (GMT +05:30):

> Yuvi,
>
> first of all, it would be beneficial to the community behind this mailing
> list to feed back if you were successful getting iOS to work, and what
> were the steps you did finally undertake to achieve this.
>
> As for Android, there is indeed an option is the Linphone settings to have
> it running in the background. But you shouldn’t need to do so if you use
> Google’s Firebase push notification service to wake up Linphone. We do
> this at our site and it works fine. You may however need to disable
> battery saving settings on some smartphones, such as on Samsung ones. You
> can see in the client logs if push notifications are being received or
> not.
>
> If you haven’t yet, you need to get some acquaintance with the Firebase
> push service. Have a look at the top-level README of the linphone-android
> gitlab repository. There are many instructions that can be googled on how
> to generate your own google-services.json. Then you will likely need to
> configure flexisip accordingly.
>
> cheers, Germán
>
>
>> On 7 Dec 2020, at 08:04, [hidden email] wrote:
>>
>> Hi German
>>
>> On Android ,  when linphone service is at background. It wakes up the app
>> after two or three calls.
>>
>> Means , when app is killed or not touched for few minutes, have to call
>> the person twice , than other person get notifications for call.
>>
>> Do we have to run the linphone service 24 hours at backeground, if yes
>> which service/key/api would that be ?
>>
>> Regards
>> Yuvi
>>
>>
>>
>> German Cancio wrote on 6. Dec 2020 16:33 (GMT +05:30):
>>
>>> Do you get CallKit launched? Does the client REGISTER with the server,
>>> does then the server send an INVITE to the client? Have you checked that
>>> the Call-ID provided in the APNS payload is exactly the same as the one
>>> the INVITE? In the log lines you provided, the Call-ID is empty. Also,
>>> loc-key should be IC_MSG not IM_MSG.
>>>
>>> Below is an example of what you should be sending and then receiving on
>>> the client:
>>>
>>> 2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 )
>>> [PushKit] Notification [0x2803a9080] received with payload : {
>>>    aps =     {
>>>        "call-id" = “deadbeef-dead-beef-deadbeef";
>>>        "loc-args" =         (
>>>            ""
>>>        );
>>>        "loc-key" = "IC_MSG";
>>>        "send-time" = "2020-12-06 12:00:00";
>>>        sound = "";
>>>        uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
>>>    };
>>>    "display-name" = "";
>>>    "from-uri" = "";
>>>    "pn_ttl" = 50;
>>> }
>>>
>>> So your forthcoming INVITE should have as Call-ID
>>> "deadbeef-dead-beef-deadbeef” in this example.
>>>
>>> Germán
>>>
>>>
>>>> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>>>>
>>>> We managed to get the notifications however call doenst get
>>>> established.
>>>> It just open the app.
>>>>
>>>> When the app at background, notifications arrives but call doesnt get
>>>> established.
>>>>
>>>> Any suggestions.
>>>>
>>>> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>>>>
>>>>> Hi ,
>>>>> I am also facing same issue , downloaded the latest code form GitHub
>>>>> and
>>>>> compile it successfully on real device with add certificate xcode
>>>>> automatic
>>>>> option.
>>>>> Still it not working in background or terminated mode
>>>>>
>>>>>
>>>>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>>>>> <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>> Juvi,
>>>>>>
>>>>>> we don’t use flexisip at our site for issuing PN’s so I can’t
>>>>>> tell
>>>>>> whether
>>>>>> there is something wrong from your logs. Are you sure
>>>>>> api.development.push.apple.com is the right APNS server to use (see
>>>>>> also
>>>>>> this
>>>>>> link
>>>>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>>>>> Another potential problem (we ran into) is to use a wrong VoIP
>>>>>> certificate
>>>>>> - and APNS doesn’t provide any negative feedback...
>>>>>>
>>>>>> Germán
>>>>>>
>>>>>>
>>>>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>>>>
>>>>>> Hi German
>>>>>>
>>>>>> See this is the payload data we get from server
>>>>>>
>>>>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> sending
>>>>>> PNR 0x1fafd80:
>>>>>> :method = POST
>>>>>> :scheme = https
>>>>>> :path =
>>>>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>>>>> host = api.development.push.apple.com
>>>>>> apns-expiration = 0
>>>>>> apns-topic = com.diseo.circles.voip
>>>>>>
>>>>>> {
>>>>>> "aps": {
>>>>>> "sound": "",
>>>>>> "loc-key": "IM_MSG",
>>>>>> "loc-args": ["Pusher"],
>>>>>> "call-id": "",
>>>>>> "uuid": "",
>>>>>> "send-time": "2020-12-03 11:51:11"
>>>>>> },
>>>>>> "from-uri": "sip:[hidden email]",
>>>>>> "display-name": "Pusher",
>>>>>> "pn_ttl": 2592000
>>>>>> }
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> receiving HTTP2 header [:status = 200]
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>>>>> 0x1fafd80 succeeded
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> receiving HTTP2 header [apns-id =
>>>>>> C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> stream
>>>>>> closed with error code [0]
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end
>>>>>> of
>>>>>> PNR 0x1fafd80
>>>>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>>>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>>>>
>>>>>>
>>>>>> Still we do not receive push on iPhone
>>>>>>
>>>>>> Any suggestions.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Yuvi
>>>>>>
>>>>>>
>>>>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>>>>
>>>>>> Yuvi,
>>>>>>
>>>>>> unfortunately there might be many reasons why push notifications are
>>>>>> not
>>>>>> received and you need to dive into each of the components to
>>>>>> understand
>>>>>> where the problem comes from. You may have problems with your
>>>>>> server-side
>>>>>> setup (are you using flexisip?) for issuing the push, or with your
>>>>>> VoIP
>>>>>> certificates used. Then, you may want to check whether VoIP push
>>>>>> notification are presented to your device at all.
>>>>>>
>>>>>> Germán
>>>>>>
>>>>>>
>>>>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>>>>
>>>>>> Hi German
>>>>>>
>>>>>> We have integrated all however still not receiving the push.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> yuvi
>>>>>>
>>>>>>
>>>>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>>>>
>>>>>> Yuvi,
>>>>>>
>>>>>> it seems you haven’t configured push notifications - have you read
>>>>>>
>>>>>>
>>>>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>>>>> ?
>>>>>>
>>>>>> cheers, Germán
>>>>>>
>>>>>>
>>>>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>>>>
>>>>>> Hi Team
>>>>>>
>>>>>> We have installed Linphone iOS sdk in our app.
>>>>>>
>>>>>> As soon as app goes to background , upto 1 minute notification
>>>>>> arrives
>>>>>> for
>>>>>> the call but not after that.
>>>>>>
>>>>>> I think app goes to Inactive mode, but what can we do that
>>>>>> notification
>>>>>> should arrive even if the app is killed or on inactive mode?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Yuvi
>>>>>> _______________________________________________
>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

yuvraj.narula
In reply to this post by German Cancio-2
Hi German

Do we need both pushkit and callkit certificate installed on our server?

Regards
Yuvi

German Cancio wrote on 7. Dec 2020 12:59 (GMT +05:30):

> Yuvi,
>
> first of all, it would be beneficial to the community behind this mailing
> list to feed back if you were successful getting iOS to work, and what
> were the steps you did finally undertake to achieve this.
>
> As for Android, there is indeed an option is the Linphone settings to have
> it running in the background. But you shouldn’t need to do so if you use
> Google’s Firebase push notification service to wake up Linphone. We do
> this at our site and it works fine. You may however need to disable
> battery saving settings on some smartphones, such as on Samsung ones. You
> can see in the client logs if push notifications are being received or
> not.
>
> If you haven’t yet, you need to get some acquaintance with the Firebase
> push service. Have a look at the top-level README of the linphone-android
> gitlab repository. There are many instructions that can be googled on how
> to generate your own google-services.json. Then you will likely need to
> configure flexisip accordingly.
>
> cheers, Germán
>
>
>> On 7 Dec 2020, at 08:04, [hidden email] wrote:
>>
>> Hi German
>>
>> On Android ,  when linphone service is at background. It wakes up the app
>> after two or three calls.
>>
>> Means , when app is killed or not touched for few minutes, have to call
>> the person twice , than other person get notifications for call.
>>
>> Do we have to run the linphone service 24 hours at backeground, if yes
>> which service/key/api would that be ?
>>
>> Regards
>> Yuvi
>>
>>
>>
>> German Cancio wrote on 6. Dec 2020 16:33 (GMT +05:30):
>>
>>> Do you get CallKit launched? Does the client REGISTER with the server,
>>> does then the server send an INVITE to the client? Have you checked that
>>> the Call-ID provided in the APNS payload is exactly the same as the one
>>> the INVITE? In the log lines you provided, the Call-ID is empty. Also,
>>> loc-key should be IC_MSG not IM_MSG.
>>>
>>> Below is an example of what you should be sending and then receiving on
>>> the client:
>>>
>>> 2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 )
>>> [PushKit] Notification [0x2803a9080] received with payload : {
>>>    aps =     {
>>>        "call-id" = “deadbeef-dead-beef-deadbeef";
>>>        "loc-args" =         (
>>>            ""
>>>        );
>>>        "loc-key" = "IC_MSG";
>>>        "send-time" = "2020-12-06 12:00:00";
>>>        sound = "";
>>>        uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
>>>    };
>>>    "display-name" = "";
>>>    "from-uri" = "";
>>>    "pn_ttl" = 50;
>>> }
>>>
>>> So your forthcoming INVITE should have as Call-ID
>>> "deadbeef-dead-beef-deadbeef” in this example.
>>>
>>> Germán
>>>
>>>
>>>> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>>>>
>>>> We managed to get the notifications however call doenst get
>>>> established.
>>>> It just open the app.
>>>>
>>>> When the app at background, notifications arrives but call doesnt get
>>>> established.
>>>>
>>>> Any suggestions.
>>>>
>>>> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>>>>
>>>>> Hi ,
>>>>> I am also facing same issue , downloaded the latest code form GitHub
>>>>> and
>>>>> compile it successfully on real device with add certificate xcode
>>>>> automatic
>>>>> option.
>>>>> Still it not working in background or terminated mode
>>>>>
>>>>>
>>>>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>>>>> <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>> Juvi,
>>>>>>
>>>>>> we don’t use flexisip at our site for issuing PN’s so I can’t
>>>>>> tell
>>>>>> whether
>>>>>> there is something wrong from your logs. Are you sure
>>>>>> api.development.push.apple.com is the right APNS server to use (see
>>>>>> also
>>>>>> this
>>>>>> link
>>>>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>>>>> Another potential problem (we ran into) is to use a wrong VoIP
>>>>>> certificate
>>>>>> - and APNS doesn’t provide any negative feedback...
>>>>>>
>>>>>> Germán
>>>>>>
>>>>>>
>>>>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>>>>
>>>>>> Hi German
>>>>>>
>>>>>> See this is the payload data we get from server
>>>>>>
>>>>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> sending
>>>>>> PNR 0x1fafd80:
>>>>>> :method = POST
>>>>>> :scheme = https
>>>>>> :path =
>>>>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>>>>> host = api.development.push.apple.com
>>>>>> apns-expiration = 0
>>>>>> apns-topic = com.diseo.circles.voip
>>>>>>
>>>>>> {
>>>>>> "aps": {
>>>>>> "sound": "",
>>>>>> "loc-key": "IM_MSG",
>>>>>> "loc-args": ["Pusher"],
>>>>>> "call-id": "",
>>>>>> "uuid": "",
>>>>>> "send-time": "2020-12-03 11:51:11"
>>>>>> },
>>>>>> "from-uri": "sip:[hidden email]",
>>>>>> "display-name": "Pusher",
>>>>>> "pn_ttl": 2592000
>>>>>> }
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> receiving HTTP2 header [:status = 200]
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>>>>> 0x1fafd80 succeeded
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> receiving HTTP2 header [apns-id =
>>>>>> C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>> stream
>>>>>> closed with error code [0]
>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end
>>>>>> of
>>>>>> PNR 0x1fafd80
>>>>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>>>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>>>>
>>>>>>
>>>>>> Still we do not receive push on iPhone
>>>>>>
>>>>>> Any suggestions.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Yuvi
>>>>>>
>>>>>>
>>>>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>>>>
>>>>>> Yuvi,
>>>>>>
>>>>>> unfortunately there might be many reasons why push notifications are
>>>>>> not
>>>>>> received and you need to dive into each of the components to
>>>>>> understand
>>>>>> where the problem comes from. You may have problems with your
>>>>>> server-side
>>>>>> setup (are you using flexisip?) for issuing the push, or with your
>>>>>> VoIP
>>>>>> certificates used. Then, you may want to check whether VoIP push
>>>>>> notification are presented to your device at all.
>>>>>>
>>>>>> Germán
>>>>>>
>>>>>>
>>>>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>>>>
>>>>>> Hi German
>>>>>>
>>>>>> We have integrated all however still not receiving the push.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> yuvi
>>>>>>
>>>>>>
>>>>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>>>>
>>>>>> Yuvi,
>>>>>>
>>>>>> it seems you haven’t configured push notifications - have you read
>>>>>>
>>>>>>
>>>>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>>>>> ?
>>>>>>
>>>>>> cheers, Germán
>>>>>>
>>>>>>
>>>>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>>>>
>>>>>> Hi Team
>>>>>>
>>>>>> We have installed Linphone iOS sdk in our app.
>>>>>>
>>>>>> As soon as app goes to background , upto 1 minute notification
>>>>>> arrives
>>>>>> for
>>>>>> the call but not after that.
>>>>>>
>>>>>> I think app goes to Inactive mode, but what can we do that
>>>>>> notification
>>>>>> should arrive even if the app is killed or on inactive mode?
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Yuvi
>>>>>> _______________________________________________
>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: Notifications doesnt arrive on iOS after app goes to Background

German Cancio-2
In reply to this post by yuvraj.narula
Yuvi,

I’m afraid I don’t understand what or where the problem is. What do the linphone client logs show exactly? Is it similar to what I copy/pasted as an example? If yes, the certificate is OK. (You need the Apple VoIP services certificate to be installed on the push notification client.)

Germán



 

> On 7 Dec 2020, at 10:32, [hidden email] wrote:
>
> Hi German
>
> Sorry about that.
>
> Yes lets continue with iOS first.  Issue is still there.
>
> Here is the complete request :-
>
> :method = POST
> :scheme = https
> :path = /3/device/81D492A1221C12BB595FD25BFEF32AE9208488AF929BA8DE94817FDF866DE793
> host = api.development.push.apple.com
> apns-expiration = 0
> apns-topic = com.diseo.circles.voip
>
> {
> "aps": {
> "sound": "",
> "loc-key": "IC_MSG",
> "loc-args": [""],
> "call-id": "6OokNnh8FE",
> "uuid": "<urn:uuid:71b4caca-dc42-001b-b586-9805824dcc30>",
> "send-time": "2020-12-07 05:58:12"
> },
> "from-uri": "",
> "display-name": "",
> "pn_ttl": 90
> }
>
>
>
> Also on front end when call comes at background or if app kills , this is what we get.
>
> LinphoneProxyConfig *proxyCfg = linphone_core_get_default_proxy_config(LC);
>    if (proxyCfg == nil) {
>        lMessage = NSLocalizedString(@"Please make sure your device is connected to the internet and double check your "
>                                     @"SIP account configuration in the settings.",
>                                     nil);
>    } else {
> //        lMessage = [NSString stringWithFormat:NSLocalizedString(@"Cannot call %@.", nil), lUserName];
>        lMessage = [NSString stringWithFormat:NSLocalizedString(@"Cannot call %@.", nil), lDisplayName];
>    }
>
>
> This is when call is coming
>
> {
>    call = "{length = 8, bytes = 0x000b988102000000}";
>    message = "Service Unavailable";
>    state = 12;
> }
>
>
> Regards
> Yuvi
>
>
>
>
> German Cancio wrote on 7. Dec 2020 12:59 (GMT +05:30):
>
>> Yuvi,
>>
>> first of all, it would be beneficial to the community behind this mailing
>> list to feed back if you were successful getting iOS to work, and what
>> were the steps you did finally undertake to achieve this.
>>
>> As for Android, there is indeed an option is the Linphone settings to have
>> it running in the background. But you shouldn’t need to do so if you use
>> Google’s Firebase push notification service to wake up Linphone. We do
>> this at our site and it works fine. You may however need to disable
>> battery saving settings on some smartphones, such as on Samsung ones. You
>> can see in the client logs if push notifications are being received or
>> not.
>>
>> If you haven’t yet, you need to get some acquaintance with the Firebase
>> push service. Have a look at the top-level README of the linphone-android
>> gitlab repository. There are many instructions that can be googled on how
>> to generate your own google-services.json. Then you will likely need to
>> configure flexisip accordingly.
>>
>> cheers, Germán
>>
>>
>>> On 7 Dec 2020, at 08:04, [hidden email] wrote:
>>>
>>> Hi German
>>>
>>> On Android ,  when linphone service is at background. It wakes up the app
>>> after two or three calls.
>>>
>>> Means , when app is killed or not touched for few minutes, have to call
>>> the person twice , than other person get notifications for call.
>>>
>>> Do we have to run the linphone service 24 hours at backeground, if yes
>>> which service/key/api would that be ?
>>>
>>> Regards
>>> Yuvi
>>>
>>>
>>>
>>> German Cancio wrote on 6. Dec 2020 16:33 (GMT +05:30):
>>>
>>>> Do you get CallKit launched? Does the client REGISTER with the server,
>>>> does then the server send an INVITE to the client? Have you checked that
>>>> the Call-ID provided in the APNS payload is exactly the same as the one
>>>> the INVITE? In the log lines you provided, the Call-ID is empty. Also,
>>>> loc-key should be IC_MSG not IM_MSG.
>>>>
>>>> Below is an example of what you should be sending and then receiving on
>>>> the client:
>>>>
>>>> 2020-10-16 17:25:03:006 [CERNphone/ios] MESSAGE (honeAppDelegate.m:553 )
>>>> [PushKit] Notification [0x2803a9080] received with payload : {
>>>>   aps =     {
>>>>       "call-id" = “deadbeef-dead-beef-deadbeef";
>>>>       "loc-args" =         (
>>>>           ""
>>>>       );
>>>>       "loc-key" = "IC_MSG";
>>>>       "send-time" = "2020-12-06 12:00:00";
>>>>       sound = "";
>>>>       uuid = "<urn:uuid: deadbeef-dead-005d-9a77-9462cec3ba3f>";
>>>>   };
>>>>   "display-name" = "";
>>>>   "from-uri" = "";
>>>>   "pn_ttl" = 50;
>>>> }
>>>>
>>>> So your forthcoming INVITE should have as Call-ID
>>>> "deadbeef-dead-beef-deadbeef” in this example.
>>>>
>>>> Germán
>>>>
>>>>
>>>>> On 6 Dec 2020, at 10:04, [hidden email] wrote:
>>>>>
>>>>> We managed to get the notifications however call doenst get
>>>>> established.
>>>>> It just open the app.
>>>>>
>>>>> When the app at background, notifications arrives but call doesnt get
>>>>> established.
>>>>>
>>>>> Any suggestions.
>>>>>
>>>>> ios developer wrote on 5. Dec 2020 23:45 (GMT +05:30):
>>>>>
>>>>>> Hi ,
>>>>>> I am also facing same issue , downloaded the latest code form GitHub
>>>>>> and
>>>>>> compile it successfully on real device with add certificate xcode
>>>>>> automatic
>>>>>> option.
>>>>>> Still it not working in background or terminated mode
>>>>>>
>>>>>>
>>>>>> On Fri, Dec 4, 2020 at 12:47 AM German Cancio
>>>>>> <[hidden email]>
>>>>>> wrote:
>>>>>>
>>>>>>> Juvi,
>>>>>>>
>>>>>>> we don’t use flexisip at our site for issuing PN’s so I can’t
>>>>>>> tell
>>>>>>> whether
>>>>>>> there is something wrong from your logs. Are you sure
>>>>>>> api.development.push.apple.com is the right APNS server to use (see
>>>>>>> also
>>>>>>> this
>>>>>>> link
>>>>>>> <https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/>)?
>>>>>>> Another potential problem (we ran into) is to use a wrong VoIP
>>>>>>> certificate
>>>>>>> - and APNS doesn’t provide any negative feedback...
>>>>>>>
>>>>>>> Germán
>>>>>>>
>>>>>>>
>>>>>>> On 3 Dec 2020, at 19:17, [hidden email] wrote:
>>>>>>>
>>>>>>> Hi German
>>>>>>>
>>>>>>> See this is the payload data we get from server
>>>>>>>
>>>>>>> 2020-12-03 11:51:11:663 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>>> sending
>>>>>>> PNR 0x1fafd80:
>>>>>>> :method = POST
>>>>>>> :scheme = https
>>>>>>> :path =
>>>>>>> /3/device/98E51CA5F61AE7F42C39778296D5073C38073BA02C7BDE542D72621F1D11A755
>>>>>>> host = api.development.push.apple.com
>>>>>>> apns-expiration = 0
>>>>>>> apns-topic = com.diseo.circles.voip
>>>>>>>
>>>>>>> {
>>>>>>> "aps": {
>>>>>>> "sound": "",
>>>>>>> "loc-key": "IM_MSG",
>>>>>>> "loc-args": ["Pusher"],
>>>>>>> "call-id": "",
>>>>>>> "uuid": "",
>>>>>>> "send-time": "2020-12-03 11:51:11"
>>>>>>> },
>>>>>>> "from-uri": "sip:[hidden email]",
>>>>>>> "display-name": "Pusher",
>>>>>>> "pn_ttl": 2592000
>>>>>>> }
>>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>>> receiving HTTP2 header [:status = 200]
>>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: PNR
>>>>>>> 0x1fafd80 succeeded
>>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>>> receiving HTTP2 header [apns-id =
>>>>>>> C802569E-C31C-AA96-49E3-C6D6A1F18EC2]
>>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]:
>>>>>>> stream
>>>>>>> closed with error code [0]
>>>>>>> 2020-12-03 11:51:11:829 flexisip-debug-AppleClient[0x1faff00][1]: end
>>>>>>> of
>>>>>>> PNR 0x1fafd80
>>>>>>> 1 push notification(s) sent, 1 successfully and 0 failed.
>>>>>>> job is done, thanks for using ./flexisip_pusher. Bye!
>>>>>>>
>>>>>>>
>>>>>>> Still we do not receive push on iPhone
>>>>>>>
>>>>>>> Any suggestions.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Yuvi
>>>>>>>
>>>>>>>
>>>>>>> German Cancio wrote on 02.12.2020 14:03 (GMT +05:30):
>>>>>>>
>>>>>>> Yuvi,
>>>>>>>
>>>>>>> unfortunately there might be many reasons why push notifications are
>>>>>>> not
>>>>>>> received and you need to dive into each of the components to
>>>>>>> understand
>>>>>>> where the problem comes from. You may have problems with your
>>>>>>> server-side
>>>>>>> setup (are you using flexisip?) for issuing the push, or with your
>>>>>>> VoIP
>>>>>>> certificates used. Then, you may want to check whether VoIP push
>>>>>>> notification are presented to your device at all.
>>>>>>>
>>>>>>> Germán
>>>>>>>
>>>>>>>
>>>>>>> On 2 Dec 2020, at 08:57, [hidden email]:
>>>>>>>
>>>>>>> Hi German
>>>>>>>
>>>>>>> We have integrated all however still not receiving the push.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> yuvi
>>>>>>>
>>>>>>>
>>>>>>> German Cancio wrote on 01.12.2020 13:41 (GMT +05:30):
>>>>>>>
>>>>>>> Yuvi,
>>>>>>>
>>>>>>> it seems you haven’t configured push notifications - have you read
>>>>>>>
>>>>>>>
>>>>>>> https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications
>>>>>>> ?
>>>>>>>
>>>>>>> cheers, Germán
>>>>>>>
>>>>>>>
>>>>>>> On 1 Dec 2020, at 08:50, [hidden email] wrote:
>>>>>>>
>>>>>>> Hi Team
>>>>>>>
>>>>>>> We have installed Linphone iOS sdk in our app.
>>>>>>>
>>>>>>> As soon as app goes to background , upto 1 minute notification
>>>>>>> arrives
>>>>>>> for
>>>>>>> the call but not after that.
>>>>>>>
>>>>>>> I think app goes to Inactive mode, but what can we do that
>>>>>>> notification
>>>>>>> should arrive even if the app is killed or on inactive mode?
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Yuvi
>>>>>>> _______________________________________________
>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers