[OpenSIPS-Users] Orderly shutdown

mayamatakeshi mayamatakeshi at gmail.com
Thu Oct 27 05:05:26 UTC 2022


It can be done with:
  https://opensips.org/docs/modules/3.1.x/gflags.html


On Thu, Oct 27, 2022 at 1:18 PM Saint Michael <venefax at gmail.com> wrote:

> Dear Friends
> I successfully wrote a script that terminates all open calls in an
> orderly fashion.
> The question is, before I execute my script, is there any similar
> command (like opensips-cli -x mi dlg_end_dlg "${callid}") that would
> stop taking new calls?  Like "reject any call attempts with 503 or
> 404", because, in a high-pressure environment, 2000 new calls may
> arrive before I close all calls and shut down Opensips.
> I use version:
> opensips -V
> version: opensips 3.1.12 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll, sigio_rt, select.
> git revision: 15ef14a89
> main.c compiled on 03:16:12 Oct 25 2022 with gcc 9
>
> On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu
> <bogdan at opensips.org> wrote:
> >
> > Hi,
> >
> > Sending a sig TERM to the opensips processes will trigger a controlled
> > shutdown of opensips (meaning with flushing data to DB, if needed,
> > cleanup, etc). Nevertheless, the opensips shutdown does not ends the
> > call, as the calls may be continued after restarting opensips.
> >
> > Still, if you want to terminate all ongoing calls before shutting down,
> > better use dialog module and check these MI cmds:
> > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg
> >
> https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs
> >
> > Regards,
> >
> > Bogdan-Andrei Iancu
> >
> > OpenSIPS Founder and Developer
> >    https://www.opensips-solutions.com
> > OpenSIPS Bootcamp 5-16 Dec 2022, online
> >    https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
> >
> > On 10/25/22 2:15 PM, Saint Michael wrote:
> > > Dear friends
> > > is there a command I can send to Opensips 3.1, so all calls are shut
> > > down and BYEs are sent to both the caller and the callee? Then of
> > > course, opensips closes down.
> > >
> > > _______________________________________________
> > > Users mailing list
> > > Users at lists.opensips.org
> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221027/ff7b323e/attachment.html>


More information about the Users mailing list