<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi all,<br><br>I'm trying to implement Apple Push Notifications with OpenSIPS.<br><br>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:<br><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><font face="monospace, monospace">> if (!lookup("location","m")) {<br>>   if (is_method("INVITE")) {<br>>     # Sends the notification here<br>>     t_reply("100", "Trying");<br>>     t_reply("180", "Ringing");<br>>     async(sleep("5"), wait_bob);<br>> }<br>><br> > [...]<br>><br> > route[wait_bob] {<br>>    if (!lookup("location","m")) {<br>>       async(sleep("2"), wait_bob);<br>>    }<br>>    if (!t_relay()) { # This establishes the call as usual when Bob becomes online<br>>       send_reply("500","Internal Error");<br>>    }<br>>   exit;<br>> }</font></blockquote><font face="monospace, monospace"><br></font>This mechanism works without problems, but, when integrating and RTP proxy OpenSIPS is randomly crashing after a while.<br><br>That's why I'm trying to avoid the use of async sleep and switch to another mechanism.<br><br><div>As usual, how do you solve this problem?<br>Is there any  way to send a new (re)INVITE when Bob becomes online?<br><br>I'm trying to use create_dialog() when Bob registers, but it doesn't look to work -I'm probably using it wrong.<br><br>Thank you very much in advance</div></div>
</div><br></div>