Re: [Linphone-users] Problem with app for IOS

2018-07-13 Thread Juha Heinanen
Dominic writes:

> Juha, have you done any testing of your app on Android Oreo? I
> saw your post on the Github thread you linked about it, but that
> was some time ago (
> https://github.com/BelledonneCommunications/linphone-android/issues/55#issuecomment-396943544
> ). Do you know if your techniques work under the new restrictions
> on background apps?

I don't have any Oreo device yet.  Based on documentation

https://developer.android.com/guide/components/services#Foreground

Oreo+ requires that a foreground service must show status bar
notification.  That should not be an issue, since the notification is
already present.

-- Juha

___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-11 Thread Dominic
I'm afraid the problem is going to be more complex than the
toggle push solution would suggest. There is a lot of code around
detecting network state and managing things like keep-alive in
the app. I don't understand it very well, but it would definitely
need to be addressed.

There's also the issue with Android 8 Oreo restricting background
services even more than before.

Honestly, I don't think I really have the bandwidth to maintain a
fork long term myself. But, I would be happy to try to work on
problems like this though. I would just need some guidance to
know why some of the current design decisions were made.

Also, just to clarify, I don't mean to come across as hostile
towards the devs at all. I know they're working hard on an open
source project we all get to enjoy. :)

Greg Troxel  wrote:
> 
> You could maintain a friendly fork, where your changes are
> planned to go upstream someday. This could be a lot of git
> wrangling, but I wonder about cloning and leaving the
> development branch as is, and then making feature branches as
> necessary, rebasing them when convenient, and having an
> integration branch which is upstream development branch plus
> feature branches. I did something sort of like this once (in a
> different context, for a different reason), but it basically
> worked well git wise.
> 
> As for the change, if turning push on and then off makes
> background calls work, it seems that there is just some missing
> initialization to set up the background socket right on boot,
> and that's only done on deconfiguring push. Really if the push
> registration is not successful this should happen
> automatically, and the push checkbox should only be used to say
> "don't even try push, even if it seems to work".

-- 
Thank you,
Dominic
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-11 Thread Russell Treleaven
On Wed, Jul 11, 2018 at 3:30 PM, Greg Troxel  wrote:

>
>
> As for the change, if turning push on and then off makes background
> calls work, it seems that there is just some missing initialization to
> set up the background socket right on boot, and that's only done on
> deconfiguring push.  Really if the push registration is not successful
> this should happen automatically, and the push checkbox should only be
> used to say "don't even try push, even if it seems to work".
>
>
Please note that this workaround is for android only.

-- 
Sincerely,

Russell Treleaven
sip:rtrelea...@sip.bunnykick.ca
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-11 Thread Greg Troxel

Dominic  writes:

> I have so much time invested in customizing Linphone, and I
> really do like the platform. I would hate to abandon it over
> something that should be fixable. I wouldn't mind personally
> digging in to the code to try to integrate some of Juha's ideas,
> but it doesn't seem like the devs are very open to outside
> contributions right now. I imagine this would be a big change too
> because there is a lot of code in LinphoneService.java around
> background issues.

You could maintain a friendly fork, where your changes are planned to go
upstream someday.   This could be a lot of git wrangling, but I wonder
about cloning and leaving the development branch as is, and then making
feature branches as necessary, rebasing them when convenient, and having
an integration branch which is upstream development branch plus feature
branches.  I did something sort of like this once (in a different
context, for a different reason), but it basically worked well git wise.

As for the change, if turning push on and then off makes background
calls work, it seems that there is just some missing initialization to
set up the background socket right on boot, and that's only done on
deconfiguring push.  Really if the push registration is not successful
this should happen automatically, and the push checkbox should only be
used to say "don't even try push, even if it seems to work".


signature.asc
Description: PGP signature
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-11 Thread Russell Treleaven
Even more interesting to me is if the native sip client on Oreo needs push
or if its socket can stay open.
Anybody know that answer?

On Wed, Jul 11, 2018 at 3:06 PM, Dominic  wrote:

> On Mon, 9 Jul 2018 15:33:09 -0400, Russell Treleaven wrote:
> > Yes it does.
> > Not great but demonstrates that Linphone can work without push.
> > Please fix this bug.
>
> Thanks for confirming that Russell. That makes it pretty much
> unusable for me as I have multiple devices scattered around my
> organization.
>
> I have so much time invested in customizing Linphone, and I
> really do like the platform. I would hate to abandon it over
> something that should be fixable. I wouldn't mind personally
> digging in to the code to try to integrate some of Juha's ideas,
> but it doesn't seem like the devs are very open to outside
> contributions right now. I imagine this would be a big change too
> because there is a lot of code in LinphoneService.java around
> background issues.
>
> Juha, have you done any testing of your app on Android Oreo? I
> saw your post on the Github thread you linked about it, but that
> was some time ago (
> https://github.com/BelledonneCommunications/linphone-android/issues/55#
> issuecomment-396943544
> ). Do you know if your techniques work under the new restrictions
> on background apps?
>
> --
> Thank you,
> Dominic
>
> ___
> Linphone-users mailing list
> Linphone-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/linphone-users
>
>


-- 
Sincerely,

Russell Treleaven
sip:rtrelea...@sip.bunnykick.ca
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-11 Thread Dominic
On Mon, 9 Jul 2018 15:33:09 -0400, Russell Treleaven wrote:
> Yes it does.
> Not great but demonstrates that Linphone can work without push.
> Please fix this bug.

Thanks for confirming that Russell. That makes it pretty much
unusable for me as I have multiple devices scattered around my
organization.

I have so much time invested in customizing Linphone, and I
really do like the platform. I would hate to abandon it over
something that should be fixable. I wouldn't mind personally
digging in to the code to try to integrate some of Juha's ideas,
but it doesn't seem like the devs are very open to outside
contributions right now. I imagine this would be a big change too
because there is a lot of code in LinphoneService.java around
background issues.

Juha, have you done any testing of your app on Android Oreo? I
saw your post on the Github thread you linked about it, but that
was some time ago (
https://github.com/BelledonneCommunications/linphone-android/issues/55#issuecomment-396943544
). Do you know if your techniques work under the new restrictions
on background apps?

-- 
Thank you,
Dominic
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Russell Treleaven
On Mon, Jul 9, 2018 at 3:26 PM, Juha Heinanen  wrote:

>
>
> You could try the push config trick mentioned earlier on this thread.  I
> don't know, however, if that trick needs to be applied each time
> linphone is started.
>
>
Yes it does.
Not great but demonstrates that Linphone can work without push.
Please fix this bug.

-- 
Sincerely,

Russell Treleaven
sip:rtrelea...@sip.bunnykick.ca
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Juha Heinanen
Dominic writes:

> I'm not familiar enough with linphone's internals to know if a
> solution like this could work for linphone as well. Maybe one of
> the devs could take a look at your implementation? I didn't see a
> license on your project repo (
> https://github.com/juha-h/baresip-studio ) though.

I'm not familiar with licensing issues.  I don't care who uses my code
and I myself have stolen pieces of code from stack overflow answers.

> I currently have several linphone android endpoints deployed, and
> in general they work quite well. The most frustrating problem
> though is that they ring unreliably due to loss of registration.
> Unfortunately, I'm not able to use the built in push notification
> system because it adds a very long string to the device's AOR in
> Asterisk (push notification tokens I believe). When I attempt to
> ring multiple devices at the same time via a FreePBX Ring Group
> the Asterisk Dial() function is truncated due to this string.

You could try the push config trick mentioned earlier on this thread.  I
don't know, however, if that trick needs to be applied each time
linphone is started.

> Needless to say, if you have solved this problem, I would love to
> see your solution integrated into linphone.

I'm sure linphone folks are much more familiar with this issue than me
and if they wish they could fix the problem. On issue

https://github.com/BelledonneCommunications/linphone-android/issues/55

DatBewar commented on May 2, 2017:

  Currently you can't stay in the background without push. I don't know
  if we will change this in the future.

and that prompted me to give up on Linphone and start working on
Baresip.

-- Juha

___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Dominic
This is really interesting to hear. I've been struggling for a
while now to get linphone on android to maintain registration
when the devices goes to sleep.

I'm not familiar enough with linphone's internals to know if a
solution like this could work for linphone as well. Maybe one of
the devs could take a look at your implementation? I didn't see a
license on your project repo (
https://github.com/juha-h/baresip-studio ) though.

I currently have several linphone android endpoints deployed, and
in general they work quite well. The most frustrating problem
though is that they ring unreliably due to loss of registration.
Unfortunately, I'm not able to use the built in push notification
system because it adds a very long string to the device's AOR in
Asterisk (push notification tokens I believe). When I attempt to
ring multiple devices at the same time via a FreePBX Ring Group
the Asterisk Dial() function is truncated due to this string.

Needless to say, if you have solved this problem, I would love to
see your solution integrated into linphone.

On Mon, Jul 9, 2018 at 10:53 AM, Juha Heinanen wrote:
> There is no need for push notifications at least in Android SIP
> clients.  I got fed up with Linphone requiring them and wrote Baresip
> based Android app that works fine without push.
> 
> The trick was to start Baresip from background service that is
> re-started automatically if is killed due to lack of resources in some
> lower end devices.  Currently my app registers every 12 minutes and
> consumes way less than 10% of battery resources.
> 
> -- Juha

-- 
Thank you,
Dominic
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Russell Treleaven
Linphone can work without push, currently there is bug though.
One needs to toggle push on and off, then the socket will stay open in the
background.


On Mon, Jul 9, 2018 at 10:53 AM, Juha Heinanen  wrote:

> Daniel-Constantin Mierla writes:
>
> > So, for someone that uses its own sip server and wants to get push
> > notifications on linphone, they have to:
> >
> >   - register as a developer to apple/google and obtain a developer
> > (crypto) certificate
> >   - build linphone by themselves (likely will require a different app
> > name) and sign the app with their developer certificate
> >   - deploy the custom linphone built app to the apple/google store
> >   - get their sip users use the custom linphone app
>
> Sounds really complicated and unpractical.
>
> > This app should have some configuration mechanism that would allow to
> > specify the apps to be waken up based on push notification payload. My
> > doubt about being possible or not is more about the ability of those
> > extra apps to be waken up by another app and behave as expected, so
> > maybe those apps would also need a local "push notification"
> > interface.
>
> There is no need for push notifications at least in Android SIP
> clients.  I got fed up with Linphone requiring them and wrote Baresip
> based Android app that works fine without push.
>
> The trick was to start Baresip from background service that is
> re-started automatically if is killed due to lack of resources in some
> lower end devices.  Currently my app registers every 12 minutes and
> consumes way less than 10% of battery resources.
>
> -- Juha
>
> ___
> Linphone-users mailing list
> Linphone-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/linphone-users
>



-- 
Sincerely,

Russell Treleaven
sip:rtrelea...@sip.bunnykick.ca
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> So, for someone that uses its own sip server and wants to get push
> notifications on linphone, they have to:
> 
>   - register as a developer to apple/google and obtain a developer
> (crypto) certificate
>   - build linphone by themselves (likely will require a different app
> name) and sign the app with their developer certificate
>   - deploy the custom linphone built app to the apple/google store
>   - get their sip users use the custom linphone app

Sounds really complicated and unpractical.

> This app should have some configuration mechanism that would allow to
> specify the apps to be waken up based on push notification payload. My
> doubt about being possible or not is more about the ability of those
> extra apps to be waken up by another app and behave as expected, so
> maybe those apps would also need a local "push notification"
> interface.

There is no need for push notifications at least in Android SIP
clients.  I got fed up with Linphone requiring them and wrote Baresip
based Android app that works fine without push.

The trick was to start Baresip from background service that is
re-started automatically if is killed due to lack of resources in some
lower end devices.  Currently my app registers every 12 minutes and
consumes way less than 10% of battery resources.

-- Juha

___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Daniel-Constantin Mierla
Just to throw my 2c here, not being a mobile app developer, but i did at
some point in time a bit of googling on this matter.

The issue is how apple/google decided to allow push notifications to an
app, respectively can be done only by the "developer" of that app. By
"developer" you must understand "who published the app on their store",
not the one who wrote the code for it.

So, for someone that uses its own sip server and wants to get push
notifications on linphone, they have to:

  - register as a developer to apple/google and obtain a developer
(crypto) certificate
  - build linphone by themselves (likely will require a different app
name) and sign the app with their developer certificate
  - deploy the custom linphone built app to the apple/google store
  - get their sip users use the custom linphone app

After that, your SIP server can send push notification to your custom
linphone app, as you send push notifications using your developer
certificate.

Again, all these are based on some research I did a while ago (more than
one year).

Not sure if someone already thought of it (didn't search the web for it
yet), or even if it is possible, but at that time my idea to deal with
these constraints and not build lots of apps myself (e.g., for email,
sip, etc...) was write a simple application that can be built easily by
anyone and deployed in A/G stores.

This app should have some configuration mechanism that would allow to
specify the apps to be waken up based on push notification payload. My
doubt about being possible or not is more about the ability of those
extra apps to be waken up by another app and behave as expected, so
maybe those apps would also need a local "push notification" interface.

Cheers,
Daniel

On 09.07.18 14:11, Greg Troxel wrote:
> Benjamin Reis  writes:
>
>> The push notifications has to go through Apple/Google since the server only 
>> makes a request to for push notification to the Apple/Google servers.
>>
>> For now push notifications only works with sip.linphone.org
>>  accounts on Linphone, we are searching for
>> a way to expand it to all services but for now it’s not possible.
> I am puzzled by "not possible", particularly in the context of open
> source.  If you mean that the code for this is not known to exist in
> other SIP server implementations, or in clients other than linphone,
> that's certaily understandable.  I would expect that each client and
> each server codebase requires extending to support this switch-to-push
> mode.
>
> It seems there must be some extension to SIP where a client can inform
> the server that it's going to switch to push mode, where the server ends
> up with a token to use with APNS/GCM, and the client stops actively
> registering (e.g., closes the TCP connection), but the server considers
> it registered.  Then, when there is traffic for the client, a wakeup is
> sent, and the client connects again, and things proceed normally.
>
> After writing that, I searched a bit and indeed there is a protocol
> specification:
>
>   https://datatracker.ietf.org/doc/draft-ietf-sipcore-sip-push/
>
> Is linphone client and server using the soon-to-be Proposed Standard?
>
> To sort of answer Juha's question, the IETF draft says that the push
> notification cannot have a payload, and causes the client to send a new
> REGISTER.  So presumably push providers can tell that a device is using
> a particular SIP server by observing where the incoming push requests
> come from, but it does not appear to leak contact information.
>
> So another question is whether linphone's mechanism is sending any
> content in the push messages.
>
> Thanks,
> Greg
>
>
>
>
> ___
> Linphone-users mailing list
> Linphone-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/linphone-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com

___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Greg Troxel

Benjamin Reis  writes:

> The push notifications has to go through Apple/Google since the server only 
> makes a request to for push notification to the Apple/Google servers.
>
> For now push notifications only works with sip.linphone.org
>  accounts on Linphone, we are searching for
> a way to expand it to all services but for now it’s not possible.

I am puzzled by "not possible", particularly in the context of open
source.  If you mean that the code for this is not known to exist in
other SIP server implementations, or in clients other than linphone,
that's certaily understandable.  I would expect that each client and
each server codebase requires extending to support this switch-to-push
mode.

It seems there must be some extension to SIP where a client can inform
the server that it's going to switch to push mode, where the server ends
up with a token to use with APNS/GCM, and the client stops actively
registering (e.g., closes the TCP connection), but the server considers
it registered.  Then, when there is traffic for the client, a wakeup is
sent, and the client connects again, and things proceed normally.

After writing that, I searched a bit and indeed there is a protocol
specification:

  https://datatracker.ietf.org/doc/draft-ietf-sipcore-sip-push/

Is linphone client and server using the soon-to-be Proposed Standard?

To sort of answer Juha's question, the IETF draft says that the push
notification cannot have a payload, and causes the client to send a new
REGISTER.  So presumably push providers can tell that a device is using
a particular SIP server by observing where the incoming push requests
come from, but it does not appear to leak contact information.

So another question is whether linphone's mechanism is sending any
content in the push messages.

Thanks,
Greg




signature.asc
Description: PGP signature
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Benjamin Reis
The push notifications has to go through Apple/Google since the server only 
makes a request to for push notification to the Apple/Google servers.

For now push notifications only works with sip.linphone.org 
 accounts on Linphone, we are searching for a way to 
expand it to all services but for now it’s not possible.

Regards
REIS Benjamin
benjamin.r...@belledonne-communications.com 

Software engineer at Belledonne Communications
http://belledonne-communications.com 

> Le 9 juil. 2018 à 12:48, Juha Heinanen  a écrit :
> 
> Greg Troxel writes:
> 
>> Is it really limited to just your service, or is there a way for other
>> SIP servers to interoperate with the switch to push mode?  Do other ios
>> clients interoperate this way?  Is there a published protocol
>> specification?
> 
> Also, is use of push notifications safe or does Apple or Google become
> aware of each call/message the app user makes/sends?
> 
> -- Juha

___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Juha Heinanen
Greg Troxel writes:

> Is it really limited to just your service, or is there a way for other
> SIP servers to interoperate with the switch to push mode?  Do other ios
> clients interoperate this way?  Is there a published protocol
> specification?

Also, is use of push notifications safe or does Apple or Google become
aware of each call/message the app user makes/sends?

-- Juha

___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Greg Troxel

Benjamin Reis  writes:

> Hello,
>
> Since iOS10 an app can’t maintain its network connections once in background.
> That’s why the app has to re register once going back to foreground.
> Therefore call and messages can’t be received in background unless the app 
> supports push notifications.
> Linphone does support push notifications if you’re using our sip service 
> (sip.linphone.org ).

Is it really limited to just your service, or is there a way for other
SIP servers to interoperate with the switch to push mode?  Do other ios
clients interoperate this way?  Is there a published protocol
specification?


signature.asc
Description: PGP signature
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users


Re: [Linphone-users] Problem with app for IOS

2018-07-09 Thread Benjamin Reis
Hello,

Since iOS10 an app can’t maintain its network connections once in background.
That’s why the app has to re register once going back to foreground.
Therefore call and messages can’t be received in background unless the app 
supports push notifications.
Linphone does support push notifications if you’re using our sip service 
(sip.linphone.org ).

Best regards
REIS Benjamin
benjamin.r...@belledonne-communications.com 

Software engineer at Belledonne Communications
http://belledonne-communications.com 

> Le 9 juil. 2018 à 12:02, Vaira Stefano - Sistema Service Software S.r.l. 
>  a écrit :
> 
> Good morning, 
> i installed linphone for IOS, the app it’s ok, the function is good but i 
> find a problem…it’s normally this app don’t work in background (when the 
> display is off)?  
> Bacause when the display is off, and i try , after, to use this, the program 
> give me “registration in progress” and then “registered”,
> sorry for my english 
>  
>  
> Vaira Stefano
> ___
> Linphone-users mailing list
> Linphone-users@nongnu.org 
> https://lists.nongnu.org/mailman/listinfo/linphone-users 
> 
___
Linphone-users mailing list
Linphone-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/linphone-users