[asterisk-users] PJSIP keepalive only while calls are present

Kingsley Tart kingsley at dns99.co.uk
Tue Dec 21 08:41:29 CST 2021


On Tue, 2021-12-21 at 10:30 -0400, Joshua C. Colp wrote:
> Allow traffic from specific IP addresses? Others may have better
> input or guidance on such a situation. 

Hi,

Thanks.

That's the problem. Customers have automated access to their setup and
may at any point change the SIP destination of a number and then
immediately make calls, so it's not really practical to update the
firewall to staticallly accept anything a customer might try to deliver
to. This is why I was hoping for a more dynamic solution.

One thought I had was to use ${CHANNEL(pjsip,remote_addr)} to get the
actual remote IP address and then put it into an ipset that the
firewall uses, either with a timeout or specifically removed when all
calls to that IP address have ended. However,
${CHANNEL(pjsip,remote_addr)} doesn't work on our systems here (though
there are other PJSIP parameters that it DOES return).

It'll be interesting to see whether anyone else has any better ideas.
If I could make Asterisk send a re-invite every few minutes, even if
nothing has changed, that'd probably sort it.

-- 
Cheers,
Kingsley.




More information about the asterisk-users mailing list