[OpenSIPS-Users] OpenSIPS and Apple Push Notification
microx
acmicrox at gmail.com
Tue Jun 10 07:06:38 CEST 2014
Hi,
I also encountered the same issue. What I do is create an external process
which communicates with the APNS server and receives requests from OpenSIPS
server. Specifically, when the SIP server receives an INVITE but fails to
lookup for the callee, the SIP server notifies the external process with the
callee SIP ID. Next, with the callee's SIP ID, the external process checks
whether the callee uses ios-version App. If so, the external process
retrieves the callee's APNS token based on the received SIP ID and sends an
notification with the token to the APNS server. If lucky, the callee invokes
the SIP-based VoIP app and receives some following SIP INVITE in time. I
hope that this would be helpful. Any comment is welcome.
if (!lookup("location","m")) {
switch ($retcode) {
case -1:
case -3:
exec_avp("echo $tU,$ci | nc 10.100.13.12
externalProcessPort", "$avp(ios)");
xlog("iOS: $avp(ios)");
if ($avp(ios) != "1") {
t_newtran();
xlog("Invite: 404 Not Found");
t_reply("404", "Not Found");
}
exit;
case -2:
sl_send_reply("405", "Method Not Allowed");
exit;
}
}
Best regards,
Chen-Che
--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-and-Apple-Push-Notification-tp7591783p7591786.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
More information about the Users
mailing list