I am pretty sure you don't actually need a re-INVITE here, but rather an
actual INVITE to Asterisk. Check out how push notifications should be
handled in OpenSIPS:
https://blog.opensips.org/tag/push-notification/
Best regards,
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 1/4/23 16:37, nutxase via Users wrote:
Hi All!
I am trying to get opensips to send a re-invite to asterisk on incoming
calls
my scenario is
* Call comes to opensips
* Opensips runs a custom script to wake up a device
* Device sends a new registration to asterisk
* Opensips needs to send a re-invite to asterisk(need help here)
* Opensips Looks up the location with the below and sends the call
if (!mid_registrar_lookup("location")) {
t_reply(404, "Not Found");
exit;
}
t_relay();
exit;
}
my complete code is:
if (is_method("INVITE|MESSAGE") {
if (exec("/etc/opensips/pusher.sh $tu", , $var(out))) {
xlog ("we pushed");
} else {
xlog("no push happened");
}
t_reply(100, "SUSPEND");
route(push);
route[push] {
xlog("suspending transaction");
sleep(5);
t_reply(100,"RESUME");
route (resume_route);
}
route[resume_route] {
xlog("resuming transaction");
if (!mid_registrar_lookup("location")) {
t_reply(404, "Not Found");
exit;
}
t_relay();
exit;
}
Sent with Proton Mail <https://proton.me/> secure email.
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users