[OpenSIPS-Users] Users Digest, Vol 138, Issue 48
Yuri Ritvin
yuri.ritvin at gmail.com
Tue Jan 21 08:40:52 EST 2020
Another approach you may consider is to drop inbound OPTIONS packets by
means of iptables (if you'd prefer not to touch the OpenSIPS configuration).
Just run from CLI the command like this:
iptables -I INPUT -p udp -m udp --dport 5060 -m string --string "OPTIONS
sip:" --algo bm --to 65535 -j DROP
And then delete this rule when not needed anymore:
iptables -D INPUT -p udp -m udp --dport 5060 -m string --string "OPTIONS
sip:" --algo bm --to 65535 -j DROP
Of course, the parameters will be pertinent to your specific implementation
- protocol, port and optionally source IP(s).
On Tue, Jan 21, 2020 at 8:09 AM <users-request at lists.opensips.org> wrote:
> Send Users mailing list submissions to
> users at lists.opensips.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> or, via email, send a message with subject or body 'help' to
> users-request at lists.opensips.org
>
> You can reach the person managing the list at
> users-owner at lists.opensips.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Users digest..."
>
>
> Today's Topics:
>
> 1. Re: opensips - graceful maintenance mode? (solarmon)
> 2. Re: opensips - graceful maintenance mode? (Liviu Chircu)
> 3. Re: opensips - graceful maintenance mode? (solarmon)
> 4. Re: opensips - graceful maintenance mode? (Liviu Chircu)
> 5. Re: opensips - graceful maintenance mode? (solarmon)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 21 Jan 2020 12:21:56 +0000
> From: solarmon <solarmon at one-n.co.uk>
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] opensips - graceful maintenance mode?
> Message-ID:
> <CAOXfywMsyQ27Y78O=
> GO-AnxyGgSPZXTg9bjMsUtAF1-C3JCUFw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Liviu,
>
> Apologies, I should be more clear.
>
> The dispatcher endpoints that I have configured are used for routing the
> SIP calls to. They are also the endpoints that we are receiving SIP calls
> from.
>
> I understand that opensips are sending SIP Options pings to these
> endpoints. And these endpoints are sending SIP Options pings to opensips
> and getting a response.
>
> I would like to understand if I set these endpoints to 'inactive' whether
> that means opensips will stop responding to SIP Options pings from that
> particular endpoint.
>
> However, now I have checked our opensips.cfg script (that was created for
> us) it looks like it has been hardcoded in:
>
> route[handle_pings]
> {
> # keepalive notifies replied ok
> if ( is_method("NOTIFY|OPTIONS") && !has_totag() && $rU==NULL) {
> send_reply("200", "OK");
> exit;
> }
> }
>
>
>
>
> On Tue, 21 Jan 2020 at 11:58, Liviu Chircu <liviu at opensips.org> wrote:
>
> > On 21.01.2020 13:47, solarmon wrote:
> > >
> > > So to be clear, I cannot use the dispatcher endpoint method to stop
> > > responding to SIP Options pings? If I can do that, then that is the
> > > equivalent - since our platform would see opensips as unhealthy and
> > > not send calls to it.
> >
> > What do you mean by "dispatcher endpoint method"? Also, the dispatcher
> > module
> > ORIGINATES pings to its destinations, it does not RESPOND to them.
> > Maybe I'm
> > not on par with your terminology here :)
> >
> > --
> > Liviu Chircu
> > www.twitter.com/liviuchircu | www.opensips-solutions.com
> >
> > OpenSIPS Summit, Amsterdam, May 2020
> > www.opensips.org/events
> > OpenSIPS Bootcamp, Miami, March 2020
> > www.opensips.org/training
> >
> >
> > _______________________________________________
> > 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/20200121/7e426355/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 21 Jan 2020 14:28:20 +0200
> From: Liviu Chircu <liviu at opensips.org>
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] opensips - graceful maintenance mode?
> Message-ID: <6377cb24-0509-1435-bffa-888c5f282228 at opensips.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 21.01.2020 14:21, solarmon wrote:
> > However, now I have checked our opensips.cfg script (that was created
> > for us) it looks like it has been hardcoded in:
> >
> > route[handle_pings]
> > {
> > # keepalive notifies replied ok
> > if ( is_method("NOTIFY|OPTIONS") && !has_totag() && $rU==NULL) {
> > send_reply("200", "OK");
> > exit;
> > }
> > }
> >
> Exactly! That's where the ping responses are generated. You should
> hook the "drain mode"
> login somewhere before that block.
>
> Best regards,
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
> www.opensips.org/events
> OpenSIPS Bootcamp, Miami, March 2020
> www.opensips.org/training
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 21 Jan 2020 13:01:18 +0000
> From: solarmon <solarmon at one-n.co.uk>
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] opensips - graceful maintenance mode?
> Message-ID:
> <
> CAOXfywPCHgKmGaox-m8HuzzMz_mNrv1E5MwYyuV8ojVFoyBrxw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Liviu,
>
> Can the drain_mode code just be put at the very start of the route {}
> block?
>
> Thank you
>
> On Tue, 21 Jan 2020 at 12:29, Liviu Chircu <liviu at opensips.org> wrote:
>
> > On 21.01.2020 14:21, solarmon wrote:
> > > However, now I have checked our opensips.cfg script (that was created
> > > for us) it looks like it has been hardcoded in:
> > >
> > > route[handle_pings]
> > > {
> > > # keepalive notifies replied ok
> > > if ( is_method("NOTIFY|OPTIONS") && !has_totag() && $rU==NULL)
> {
> > > send_reply("200", "OK");
> > > exit;
> > > }
> > > }
> > >
> > Exactly! That's where the ping responses are generated. You should
> > hook the "drain mode"
> > login somewhere before that block.
> >
> > Best regards,
> >
> > --
> > Liviu Chircu
> > www.twitter.com/liviuchircu | www.opensips-solutions.com
> >
> > OpenSIPS Summit, Amsterdam, May 2020
> > www.opensips.org/events
> > OpenSIPS Bootcamp, Miami, March 2020
> > www.opensips.org/training
> >
> >
> > _______________________________________________
> > 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/20200121/399b96f6/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Tue, 21 Jan 2020 15:04:23 +0200
> From: Liviu Chircu <liviu at opensips.org>
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] opensips - graceful maintenance mode?
> Message-ID: <930a8df3-25d6-0c2b-f817-ec8dc37bb7a3 at opensips.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> On 21.01.2020 15:01, solarmon wrote:
> > Can the drain_mode code just be put at the very start of the route {}
> > block?
>
> If you don't mind letting SIP scanners know when you're doing
> maintenance, sure.
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
> www.opensips.org/events
> OpenSIPS Bootcamp, Miami, March 2020
> www.opensips.org/training
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 21 Jan 2020 13:08:19 +0000
> From: solarmon <solarmon at one-n.co.uk>
> To: OpenSIPS users mailling list <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] opensips - graceful maintenance mode?
> Message-ID:
> <CAOXfywM6bmVt4u+s1=
> TA-3_o9VmTiLRHWh7_oMbYN8uW+p7+0A at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Very good point! I'll try to figure out a more suitable place for it.
>
> Thanks so much for your help!
>
> On Tue, 21 Jan 2020 at 13:06, Liviu Chircu <liviu at opensips.org> wrote:
>
> > On 21.01.2020 15:01, solarmon wrote:
> > > Can the drain_mode code just be put at the very start of the route {}
> > > block?
> >
> > If you don't mind letting SIP scanners know when you're doing
> > maintenance, sure.
> >
> > --
> > Liviu Chircu
> > www.twitter.com/liviuchircu | www.opensips-solutions.com
> >
> > OpenSIPS Summit, Amsterdam, May 2020
> > www.opensips.org/events
> > OpenSIPS Bootcamp, Miami, March 2020
> > www.opensips.org/training
> >
> >
> > _______________________________________________
> > 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/20200121/b2919641/attachment.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------
>
> End of Users Digest, Vol 138, Issue 48
> **************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200121/516e9915/attachment-0001.html>
More information about the Users
mailing list