OpenSIPS and Apple Push Notification

classic Classic list List threaded Threaded
9 messages Options
leo
Reply | Threaded
Open this post in threaded view
|

OpenSIPS and Apple Push Notification

leo
Hello, i'm trying to implement Opensips with support for APNS. I saw that in the opensips main web site there is a Community Tweets...
OpenSIPS and Apple Push Notification
12th of April 2013 Great tutorial on OpenSIPS and Apple Push Notification service(APNS) integration.
but the "Read more..." link is broken
Could it be restored? I could i get that info?

Or could someone give me a clue on how to implement it?

Thanks a lot,

Leo.
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

Chen-Che Huang
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
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

Bogdan-Andrei Iancu-2
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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

Bogdan-Andrei Iancu-2
In reply to this post by leo
Hello Leo,

The link was updated:
http://web.archive.org/web/20131018015829/http://techvoiper.com/opensips-and-apple-push-notification-service-integration/


Regards,

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

On 09.06.2014 17:59, leo wrote:

> Hello, i'm trying to implement Opensips with support for APNS. I saw that in
> the opensips main web site there is a Community Tweets...
> OpenSIPS and Apple Push Notification
> 12th of April 2013 Great tutorial on OpenSIPS and Apple Push Notification
> service(APNS) integration.
> but the "Read more..." link is broken
> Could it be restored? I could i get that info?
>
> Or could someone give me a clue on how to implement it?
>
> Thanks a lot,
>
> Leo.
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-and-Apple-Push-Notification-tp7591783.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

kondik
Hello,

Unfortunatelly this link: http://web.archive.org/web/20131018015829/http://techvoiper.com/opensips-and-apple-push-notification-service-integration/
doesn't work again :(

If you could repair this link - I will be grateful
Thanks in advance!

Regards,
Kondik
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

kondik
In reply to this post by Chen-Che Huang
microx wrote
[...] 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. [...]
How do you check whether the calee uses ios ?
And how you can obtain APNS token based on the SIP ID ?

Could you explain this or provide any examples?
Thanks in advance!
leo
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

leo
In reply to this post by Bogdan-Andrei Iancu-2
Hello Bogdan,

Wow!!! It took me so much to understand this... hahaha

I just need the last help:
- considering that the UAC has an unlimited expiry (so the lookup will return 1)
- my actual configuration is trying to send the INVITE to the contact in the DB but it will timeout (because the UAC is not connected anymore but it has unlimited expiry).
- after this time out i should send the PN and wait for the UAC to re-register and then establish a new INVITE with this new info.

Could you give me a couple of ideas on how to implement this?

Thanks a lot!

Leo
leo
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

leo
In reply to this post by leo
I just need the last help:
- considering that the UAC has an unlimited expiry (so the lookup will return 1)
- my actual configuration is trying to send the INVITE to the contact in the DB but it will timeout (because the UAC is not connected anymore but it has unlimited expiry).
- after this time out i should send the PN and wait for the UAC to re-register and then establish a new INVITE with this new info.

Could you give me a couple of ideas on how to implement this?

Thanks a lot!

Leo
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS and Apple Push Notification

Eric Tamme-3
I would forget about push notifications.  Just set a short expiration so
that the device will renew its registration frequently.  If you are
using tcp then you should look at RFC5626 for SIP outbound information.

On 03/04/2015 09:45 AM, leo wrote:

> I just need the last help:
> - considering that the UAC has an unlimited expiry (so the lookup will
> return 1)
> - my actual configuration is trying to send the INVITE to the contact in the
> DB but it will timeout (because the UAC is not connected anymore but it has
> unlimited expiry).
> - after this time out i should send the PN and wait for the UAC to
> re-register and then establish a new INVITE with this new info.
>
> Could you give me a couple of ideas on how to implement this?
>
> Thanks a lot!
>
> Leo
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-and-Apple-Push-Notification-tp7591783p7595598.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users