[OpenSIPS-Users] mid_registrar

Andy Dierlam adierlam at ptgi-ics.com
Wed Dec 7 18:07:57 UTC 2022


Try adding xlog entries after your lookups, to verify its hitting where you think it is.
separate to two blocks, and add xlog to see if is hitting them both.

if (!mid_registrar_lookup("location")) {
     xlog("did not find phone 1st lookup");
}

if (!mid_registrar_lookup("location")) {
          xlog("2nd lookup did not find phone, sending 404");
           t_reply(404, "Not Found");
}


________________________________
From: Users <users-bounces at lists.opensips.org> on behalf of nutxase via Users <users at lists.opensips.org>
Sent: Wednesday, December 7, 2022 12:42 PM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: [OpenSIPS-Users] mid_registrar


EXTERNAL: Caution, this email originated from outside the organization. Do not click links or open attachments unless you can verify the sender and know the content is safe.


Hi Guys

How can i make it that if an invite comes in and the location is not found that it will then try look again for the location before sending 404?

i have tried

if (!mid_registrar_lookup("location")) {
     sleep (5);
    if (!mid_registrar_lookup("location")) {
           t_reply(404, "Not Found");
      }
}

Sent with Proton Mail<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fproton.me%2F&data=05%7C01%7Cadierlam%40ptgi-ics.com%7C1c5656d618cb40b6b4ac08dad87aaad1%7Cf4c81856eb684f3c8c148d91aa0e37df%7C0%7C0%7C638060318631933087%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Nzbo8DseMA9P%2FojWdt99yvj1HMOI9F3X2zjCpZNcw5A%3D&reserved=0> secure email.

CONFIDENTIALITY NOTICE
This email is solely for the use of the intended recipient(s) and may contain information and attachments that are confidential, privileged or otherwise sensitive in nature.   Please do not disseminate this email or any of its attachments without the permission of the sender.  If this email has been received in error, please do not read, copy, use, forward or disclose the email or any of its attachments to others.  Instead, immediately notify the sender by replying to this email and then delete it from your system.  Transmission of this email is not to be construed as a waiver of any rights of confidentiality or applicable privilege.


NO BINDING AGREEMENT
This email does not constitute an agreement to conduct transactions by electronic means and does not create any legally binding contract or enforceable obligation in the absence of a fully signed written contract.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221207/920a4c8b/attachment.html>


More information about the Users mailing list