[SR-Users] Linphone push notifications (iOS) and kamailio
German Cancio
German.Cancio.Melia at cern.ch
Fri Sep 25 12:25:32 CEST 2020
Jan,
we have a working setup using recompiled/rebranded Linphone mobile clients against Kamailio(+Asterisk), using APNS and Firebase push notifications.
For iOS it’s a bit more tricky than with Android. You need to provide some metadata in the APNS payload, such as the Call-ID and the and the urn:uuid (see example below). The Call-ID must match the one received in the INVITE that should follow the REGISTER. Also, you need to make sure that you send PN’s exactly once per call and device.
I recommend you to activate client debug log and to compare the logs when using your server to these generated when you run calls against the linphone.org<http://linphone.org> servers.
You can find additional information under https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications.
Note that an alternative could be to put the Linphone Flexisip Push Gateway proxy in front of Kamailio, but we never got to test that out.
cheers, Germán
aps ={
"call-id" = "527aaf51-671e-4559-9db7-179162aef22a";
"loc-args" = (
""
);
"loc-key" = "IC_MSG";
"send-time" = "2020-09-23 16:03:05";
sound = "";
uuid = "<urn:uuid: 0a82c013-beef-dead-beef-23d5a4e15822>";
};
"display-name" = "";
"from-uri" = "";
"pn_ttl" = 50;
}
On 25 Sep 2020, at 11:53, Jan Rozhon <jan.rozhon at gmail.com<mailto:jan.rozhon at gmail.com>> wrote:
Yes, sure. Linphone sends registration, I detect it in kamailio and call t_continue which results in INVITE going to Linphone. The thing is, although iPhone get awake and linphone is open to the foreground it does not accept the call based on the user action in the "swipe/accept/reject" menu coming from the push notification. Nor it allows me to directly accept the call, it just puts it in wait and I need to "click" through the menus to accept it. This is not intuitive and definitely not user-friendly.
There seems to be another glitch as well. When I click my way to accepting the call, there is no audio although SDP is perfectly fine (same as when the iPhone is unlocked and linphone running). This leads me to an idea that linphone need some sort od ID for the call in the push notification. But I have no clue what it should look like.
Regards, Jan
Dne 25.09.2020 v 11:27 Daniel-Constantin Mierla napsal(a):
Hello,
no direct experience with Linphone, but upon receiving a push notification, usually the SIP app sends a REGISTER requests to Kamailio and then Kamailio forwards the suspended INVITE. I suggest you run a sip traffic sniffer on kamailio server (sngrep, ngrep, ...) as well as Kamailio with debug=3 and watch the syslog to see what kind of processing happens at that time.
Cheers,
Daniel
On 25.09.20 11:12, Jan Rozhon wrote:
Hi,
I know this is kind of a wrong forum for this question, but I have got
no answer from linphone forum so I am trying my luck here.
I have kamailio with pretty much the default config with slight
modification enabling me the push notifications for iOS (via curl) and
late forking (t_suspend, t_continue). But my linphone on iOS although
gets awaken does not present me with the call I am trying to establish.
Did anyone of you guys experimented with similar setup? If so, to what
degree were you successful and can you share some insights especially on
the format of push notification where I suspect my problem to be rooted?
Thanks in advance and once again, sorry if I am off-topic too much.
Regards, Jan
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com/>
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Funding: https://www.paypal.me/dcmierla
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200925/09d9b232/attachment.htm>
More information about the sr-users
mailing list