<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">To be more specific here, use the suggested
gflags to test for initial INVITE and reject any new call if the
gflag is set - and you can toggle the flag via MI cmds.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 5-16 Dec 2022, online
<a class="moz-txt-link-freetext" href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
<div class="moz-cite-prefix">On 10/27/22 8:05 AM, mayamatakeshi
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABaNFCaa42VEzmAOKcavg+TiEx1+Zqo425L+QYP30qLa0FUBYw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>It can be done with:</div>
<div> <a
href="https://opensips.org/docs/modules/3.1.x/gflags.html"
moz-do-not-send="true">https://opensips.org/docs/modules/3.1.x/gflags.html</a></div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Oct 27, 2022 at 1:18
PM Saint Michael <<a href="mailto:venefax@gmail.com"
moz-do-not-send="true">venefax@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear
Friends<br>
I successfully wrote a script that terminates all open calls
in an<br>
orderly fashion.<br>
The question is, before I execute my script, is there any
similar<br>
command (like opensips-cli -x mi dlg_end_dlg "${callid}") that
would<br>
stop taking new calls? Like "reject any call attempts with
503 or<br>
404", because, in a high-pressure environment, 2000 new calls
may<br>
arrive before I close all calls and shut down Opensips.<br>
I use version:<br>
opensips -V<br>
version: opensips 3.1.12 (x86_64/linux)<br>
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP,
PKG_MALLOC,<br>
Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144,
MAX_LISTEN 16,<br>
MAX_URI_SIZE 1024, BUF_SIZE 65535<br>
poll method support: poll, epoll, sigio_rt, select.<br>
git revision: 15ef14a89<br>
main.c compiled on 03:16:12 Oct 25 2022 with gcc 9<br>
<br>
On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu<br>
<<a href="mailto:bogdan@opensips.org" target="_blank"
moz-do-not-send="true">bogdan@opensips.org</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> Sending a sig TERM to the opensips processes will trigger
a controlled<br>
> shutdown of opensips (meaning with flushing data to DB,
if needed,<br>
> cleanup, etc). Nevertheless, the opensips shutdown does
not ends the<br>
> call, as the calls may be continued after restarting
opensips.<br>
><br>
> Still, if you want to terminate all ongoing calls before
shutting down,<br>
> better use dialog module and check these MI cmds:<br>
> <a
href="https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg</a><br>
> <a
href="https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs</a><br>
><br>
> Regards,<br>
><br>
> Bogdan-Andrei Iancu<br>
><br>
> OpenSIPS Founder and Developer<br>
> <a href="https://www.opensips-solutions.com"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a><br>
> OpenSIPS Bootcamp 5-16 Dec 2022, online<br>
> <a
href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a><br>
><br>
> On 10/25/22 2:15 PM, Saint Michael wrote:<br>
> > Dear friends<br>
> > is there a command I can send to Opensips 3.1, so
all calls are shut<br>
> > down and BYEs are sent to both the caller and the
callee? Then of<br>
> > course, opensips closes down.<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
> > <a href="mailto:Users@lists.opensips.org"
target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
> > <a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank"
moz-do-not-send="true">Users@lists.opensips.org</a><br>
<a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>