Kingsley Tart
2021-Dec-21 13:37 UTC
[asterisk-users] PJSIP keepalive only while calls are present
Hi, I see I can set qualify_frequency (for UDP) on an AOR to keep open holes through firewalls etc, and in [global] I can set keep_alive_interval for TCP based transports. However, is it possible to configure it so that these OPTIONS keepalives only get sent while there's an active call to that endpoint? The reason for this is that we have hundreds of potential endpoints depending on where customers define their call routing, but most of the time these endpoints won't have any calls on them so we don't want to send thousands of OPTIONS messages all about when there's no need. We definitely do need to do some sort of keepalive, because after some time, remote endpoints send messages back and they get blocked by the firewall if enough time has passed. Is there a way to define some sort of keepalive in the Dial string or some other dynamic way of doing it? -- Cheers, Kingsley.
Joshua C. Colp
2021-Dec-21 13:45 UTC
[asterisk-users] PJSIP keepalive only while calls are present
On Tue, Dec 21, 2021 at 9:38 AM Kingsley Tart <kingsley at dns99.co.uk> wrote:> Hi, > > I see I can set qualify_frequency (for UDP) on an AOR to keep open > holes through firewalls etc, and in [global] I can set > keep_alive_interval for TCP based transports. > > However, is it possible to configure it so that these OPTIONS > keepalives only get sent while there's an active call to that endpoint? > > The reason for this is that we have hundreds of potential endpoints > depending on where customers define their call routing, but most of the > time these endpoints won't have any calls on them so we don't want to > send thousands of OPTIONS messages all about when there's no need. > > We definitely do need to do some sort of keepalive, because after some > time, remote endpoints send messages back and they get blocked by the > firewall if enough time has passed. > > Is there a way to define some sort of keepalive in the Dial string or > some other dynamic way of doing it? >No. Session timers on the endpoint is the closest thing to making sure a call is active and keeping things open but does not use OPTIONS. Note that if you're sending calls to them, then without OPTIONS outside of calls any NAT mapping would go away unless they re-register frequently. If they did re-register frequently then you likely wouldn't need either. -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20211221/cf05e8bf/attachment.html>