<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class=""><br class="">
</div>
<div class="">Jan,</div>
<div class=""><br class="">
</div>
<div class="">we have a working setup using recompiled/rebranded Linphone mobile clients against Kamailio(+Asterisk), using APNS and Firebase push notifications.</div>
<div class=""><br class="">
</div>
<div class="">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.</div>
<div>
<div>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
<a href="http://linphone.org" class="">linphone.org</a> servers.</div>
<div class=""><br class="">
</div>
</div>
<div>You can find additional information under <a href="https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications" class="">https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HGuidelinesforintegratingwithpushnotifications</a>. </div>
<div><br class="">
</div>
<div>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.</div>
<div><br class="">
</div>
<div>cheers, Germán</div>
<div><span style="font-family: Menlo; font-size: 11px;" class=""><br class="">
</span></div>
<div><span style="font-family: Menlo; font-size: 11px;" class=""><br class="">
</span></div>
<div><span style="font-family: Menlo; font-size: 11px;" class="">aps =</span><span style="font-family: Menlo; font-size: 11px;" class="">{</span></div>
<div>
<pre class="highlight code" lang="plaintext"><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        "call-id" = "527aaf51-671e-4559-9db7-179162aef22a";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        "loc-args" =         (</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">            ""</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        );</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        "loc-key" = "IC_MSG";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        "send-time" = "2020-09-23 16:03:05";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        sound = "";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        uuid = "<urn:uuid: 0a82c013-beef-dead-beef-23d5a4e15822>";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    };</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "display-name" = "";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "from-uri" = "";</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    "pn_ttl" = 50;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">}</div>
</pre>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 25 Sep 2020, at 11:53, Jan Rozhon <<a href="mailto:jan.rozhon@gmail.com" class="">jan.rozhon@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<p class="">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.</p>
<p class="">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.</p>
<p class="">Regards, Jan<br class="">
</p>
<div class="moz-cite-prefix">Dne 25.09.2020 v 11:27 Daniel-Constantin Mierla napsal(a):<br class="">
</div>
<blockquote type="cite" cite="mid:db1e5d43-60ba-414c-0c2a-2052264521ce@gmail.com" class="">
<p class="">Hello,</p>
<p class="">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.</p>
<p class="">Cheers,<br class="">
Daniel<br class="">
</p>
<div class="moz-cite-prefix">On 25.09.20 11:12, Jan Rozhon wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:f3a23658-d36f-bba7-2dfd-3d675ab3300b@gmail.com" class="">
<pre class="moz-quote-pre" wrap="">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


</pre>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com/" moz-do-not-send="true">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</blockquote>
</div>
_______________________________________________<br class="">
Kamailio (SER) - Users Mailing List<br class="">
<a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>