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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190207/c6d92193/attachment.html>
I use ChanSpy for that. This should get you on track: https://community.asterisk.org/t/play-audio-file-on-channel-that-is-in-confbridge/67678 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" [whisper] 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 [whisper-playback] 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 >
Le 07.02.19 à 12:59, Rui Mota a écrit :> 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 >Hello, maybe you could use the approach described in https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_PERIODIC_HOOK regards Hans