[asterisk-dev] [Code Review] 3362: func_beep: New function for periodic beeps.

Russell Bryant reviewboard at asterisk.org
Sat Mar 15 13:15:18 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3362/
-----------------------------------------------------------

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

    This commit introduces a new dialplan function, BEEP().  It allows you
    to enable playing a beep tone at a regular interval into a call.  The
    most common use case for this is to use during call recording to
    notify and remind the callers that the call is being recorded.  A
    future commit will update the call recording applications in Asterisk
    to use this automatically if an option is specified for convenience.
    
    The implementation makes heavy use of existing Asterisk components.
    Instead of replicating logic required to load a sound file, transcode
    it if necessary, and do audio mixing, it makes use of
    Playback+ChanSpy to accomplish the task.
    
    The other important bit of the implementation is how it figures out
    when to trigger the beep playback.  This implementation uses the
    audiohook API, even though it's not actually touching the audio in any
    way.  It's a convenient way to get a callback and check if it's time
    to kick off another beep.  It would be nice if this was timer event
    based instead of polling based, but unfortunately I don't see a way to
    do it that won't interfere with other things.


Diffs
-----

  /trunk/funcs/func_beep.c PRE-CREATION 
  /trunk/CHANGES 410649 

Diff: https://reviewboard.asterisk.org/r/3362/diff/


Testing
-------

Called the following extension, both letting it run all the way through, as well as hanging up at various points in the middle.

[test]

exten => 100,1,Answer()
   same => n,Set(BEEP(5)=on)
   same => n,Wait(20)
   same => n,Set(BEEP()=off)
   same => n,Wait(20)
   same => n,Hangup()


Thanks,

Russell Bryant

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140315/f2cb69dd/attachment.html>


More information about the asterisk-dev mailing list