[OpenSIPS-Users] OpenSIPS and Apple Push Notification

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jun 10 15:17:36 CEST 2014


Hi Chen-Che,

After triggering the PN (via the exec), shouldn't you wait for the 
device to register and do lookup again ? - I see you simply drop the 
INVITE if PN was successful - do you rely on retransmissions from the 
UAC in order to wait ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 10.06.2014 08:06, microx wrote:
> 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.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>




More information about the Users mailing list