[OpenSIPS-Users] Fwd: Push notifications
José Expósito
jose.exposito89 at gmail.com
Wed Mar 2 14:13:23 CET 2016
Hi Babil,
Thank you very much for your answer.
I have another server that offers a RESTful API to send the push
notifications, store the tokens, etc.
I'm using OpenSIPS *2.1.2*
Jose
2016-03-02 14:00 GMT+01:00 Babil (Golam Sarwar) <gsbabil at gmail.com>:
> Hi José,
> what is your mechanism to initiate sending the push? For example, what
> function/script are you calling? Please also add the OpenSIPS version you
> are
> using.
>
> On 3/2/16 4:47 AM, José Expósito wrote:
> > Hi all,
> >
> > I'm trying to implement Apple Push Notifications with OpenSIPS.
> >
> > At the moment, when Alice calls Bob and Bob is offline, I send the push
> > notification to Bob and call async sleep until Bob becomes online and I
> proceed
> > whit the call as usual:
> >
> > > if (!lookup("location","m")) {
> > > if (is_method("INVITE")) {
> > > # Sends the notification here
> > > t_reply("100", "Trying");
> > > t_reply("180", "Ringing");
> > > async(sleep("5"), wait_bob);
> > > }
> > >
> > > [...]
> > >
> > > route[wait_bob] {
> > > if (!lookup("location","m")) {
> > > async(sleep("2"), wait_bob);
> > > }
> > > if (!t_relay()) { # This establishes the call as usual when Bob
> > becomes online
> > > send_reply("500","Internal Error");
> > > }
> > > exit;
> > > }
> >
> >
> > This mechanism works without problems, but, when integrating and RTP
> proxy
> > OpenSIPS is randomly crashing after a while.
> >
> > That's why I'm trying to avoid the use of async sleep and switch to
> another
> > mechanism.
> >
> > As usual, how do you solve this problem?
> > Is there any way to send a new (re)INVITE when Bob becomes online?
> >
> > I'm trying to use create_dialog() when Bob registers, but it doesn't
> look to
> > work -I'm probably using it wrong.
> >
> > Thank you very much in advance
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160302/dd31a47f/attachment-0001.htm>
More information about the Users
mailing list