[OpenSIPS-Users] Re-invite on mid_registrar

nutxase nutxase at proton.me
Thu Jan 5 16:15:32 UTC 2023


anyone have any idea how i can get opensips to request a new invite here :(

Sent with [Proton Mail](https://proton.me/) secure email.

------- Original Message -------
On Wednesday, January 4th, 2023 at 2:37 PM, nutxase via Users <users at lists.opensips.org> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230105/08a458b4/attachment.html>


More information about the Users mailing list