[asterisk-users] Playing a beep/noise during a call

Markus universe at truemetal.org
Thu Feb 7 07:36:20 CST 2019

I use ChanSpy for that.

This should get you on track: 

I don't use AMI, I just trigger asterisk binary through a shell script 
(via AGI) like this to originate the call, it's easier for me:

/usr/sbin/asterisk -rx "originate local/something at whisper extension 
something at whisper-playback"


exten => _[a-z,0-9].,1,Answer
exten => _[a-z,0-9].,n,Verbose(... whispering to admins)
exten => _[a-z,0-9].,n,ChanSpy(SIP/${EXTEN},qw)
exten => _[a-z,0-9].,n,Hangup


exten => 5555,1,Answer
exten => 5555,n,Verbose(... playback to chanspy for admins)
exten => 5555,n,Playback(/var/lib/asterisk/sounds/somewavfile)

So, if you need this periodically you could maybe spawn a shell script 
through AGI which will sleep for a certain amount of minutes and then 
repeat the originate command ...

Good luck!

Am 07.02.2019 um 12:59 schrieb Rui Mota:
> Hi.
> I am using an appliance as SIP-ISDN gateway that has a (not so nice) 
> feature of hanging up a call if it detects more than 10 minutes of 
> silence from the originating side.
> The problem is that the calls are always originated from a digital 
> system that, most of the times, just sends silence, for more than 10 
> minutes, only sporadically has people talking, so this makes the calls 
> to hangup automatically after 10 minutes...
> I need to inject some noise/tone, periodically (like every 9 minutes), 
> on the originating call to avoid this behaviour. What is the best way to 
> achieve it?
> I've seen the Extenspy or mixmonitor commands, but i need to make it 
> periodic...
> Thank you in advance.
> Rui

More information about the asterisk-users mailing list