flexisip-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flexisip as push proxy - my setup


From: Björn Tackmann
Subject: Flexisip as push proxy - my setup
Date: Sat, 25 Apr 2020 23:56:23 +0200

Dear flexisip devs and users,

I am using flexisip as a push proxy for a VOIP provider. My (only) requirement 
was that incoming VOIP calls should have my phone ring even when the app is in 
background. Yet, as setting this up took me quite a bit of time, I wanted to 
post some learnings here.

First, please find below the configuration settings I had to change with 
respect to the description on the wiki page on push gateways (i.e. 
https://wiki.linphone.org/xwiki/wiki/public/view/Flexisip/HOWTOs/Push%20Gateway/).
 The settings described there were very helpful, but not sufficient for me.

=======
[global]

# Allow large UDP packets. The default setting of 1460 caused failing 
connections.
udp-mtu=65535


[presence-server]

# My setup runs without one.
enabled=false


[conference-server]

# Not needed in my proxy use case.
enabled=false


[module::NatHelper]

# This was crucial for me. The upstream server would otherwise not accept some 
messages such as BYE, because the “verified” tag was still in there. I 
fortunately don’t need the NatHelper.
enabled=false


[module::PushNotification]

# I want immediate pushes.
timeout=0


[module::Forward]

# The proxy has the sole purpose of forwarding to a VOIP provider.
route=sip:my_voip_provider:5060
=======

For iOS push notifications, I am currently using a developer certificate. 
Somehow flexisip does not detect this correctly, so I just did the following 
change in src/pushnotification/pushnotificationservice.cc:
-static const char *APN_PROD_ADDRESS = "gateway.push.apple.com";
+static const char *APN_PROD_ADDRESS = "gateway.sandbox.push.apple.com";
Oh … and note that you do need a VOIP certificate from Apple! (This is 
different from a standard push certificate!) Which of course anyway means you 
need an Apple Developer account. And you also need to compile/deploy the app 
yourself.

In the iOS app, it is important (for my setup, that may depend) that I am 
enabling “Outbound proxy” in the account settings. And of course set the proxy 
field appropriately.

There are also some minor tweaks. As my VOIP provider has a maximum expiration 
time of 600s, I am using a cron job with flexisip_pusher every 5 minutes to 
trigger my phone to send a new REGISTER. This simple solution works and battery 
drain is lower than I expected — hardly noticeable. Also, I am using acme.sh 
for managing my TLS certificates and wrote a deploy hook for flexisip, happy to 
share if someone is interested.

Setting this up was quite a bit of work. I’m not sure I would have started if I 
had known that extent from the start. But now I have a working setup and it 
seems quite reliable … so all good.

Best regards,
Björn





reply via email to

[Prev in Thread] Current Thread [Next in Thread]