[asterisk-users] how to block spammer calls
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sat Jan 5 05:31:36 CST 2008
On Sat, Jan 05, 2008 at 11:54:41AM +0100, Anselm Martin Hoffmeister wrote:
> Using cronjobs is possibly a bad idea because you create load spikes, if
> e.g. 5000 asterisk -rx commands are issued within a few seconds.
Why would you do that?
If you want to write 5000 commands, write them directly to the socket or
use the manager interface.
I posted one a simple script for writing batch commands to the
asterisk.ctl socket using socat. You have to strip the '\n' in the end
of each command, and write every command in a separate write (I used a
'sleep 0.001' for that).
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-users
mailing list