[Asterisk-Dev] RECORD FILE in app_agi

Jason Boyd jason at silenttype.com
Mon Mar 1 05:35:21 MST 2004


I'm contemplating a patch to app_agi.c that would address a few issues
with the RECORD FILE command:

1) According to the documentation we should get result=-1 for hangups,
which is what we get for hangups with all other AGI commands.  Currently
we get result=0.

2) The return strings for max-record-time timeouts and max-silence
timeouts are identical: "200 result=0 (timeout) endpos=xxxxx"
I'd like to keep track of the reason for timeouts, and propose to
replace "(timeout)" with "(silence)" for max-silence timeouts.

3) The silence detection threshold is hard-coded at 256.  I'd like to be
able to override this default per recording.  I propose an optional
parameter like a "t=" that could occur after "s=" to change the default
threshold.

4) After a max-silence timeout, asterisk trims the recorded file so that
only the first second of silence remains.  The "endpos=" value does not
reflect this, however -- it still indicates the position in the file at
the moment the maximum silence was hit.  I propose that that "endpos="
value should take the silence trimming into account.

The first two are easy, but they are both potential script-breakers.  #3
is not hard but it would be good to run it by someone who has some
knowledge of how the silence detetctor works, to know what sane values
are, if nothing else.  #4 is tricky, and I'd be much obliged if someone
with a little more experience would take a peek at it.

Any thoughts?



More information about the asterisk-dev mailing list