mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-18 18:46:16 +00:00
Add recording agent's calls patch. Basically the call starts recording when the agent picks up and the file is stamped with the agent's id and the timestamp. Also optionally a URL link to that file may be inserted in the userfield of the CDR record. By default the recorded file will be mixed if soxmix is available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -37,6 +37,15 @@
|
||||
|
||||
/* Portions of the conversion code are by guido@sienanet.it */
|
||||
|
||||
/* begin binary data: */
|
||||
char msgsm_silence[] = /* 65 */
|
||||
{0x48,0x17,0xD6,0x84,0x02,0x80,0x24,0x49,0x92,0x24,0x89,0x02,0x80,0x24,0x49
|
||||
,0x92,0x24,0x89,0x02,0x80,0x24,0x49,0x92,0x24,0x89,0x02,0x80,0x24,0x49,0x92
|
||||
,0x24,0x09,0x82,0x74,0x61,0x4D,0x28,0x00,0x48,0x92,0x24,0x49,0x92,0x28,0x00
|
||||
,0x48,0x92,0x24,0x49,0x92,0x28,0x00,0x48,0x92,0x24,0x49,0x92,0x28,0x00,0x48
|
||||
,0x92,0x24,0x49,0x92,0x00};
|
||||
/* end binary data. size = 65 bytes */
|
||||
|
||||
struct ast_filestream {
|
||||
void *reserved[AST_RESERVED_POINTERS];
|
||||
/* Believe it or not, we must decode/recode to account for the
|
||||
@@ -487,6 +496,12 @@ static int wav_seek(struct ast_filestream *fs, long sample_offset, int whence)
|
||||
if (whence != SEEK_FORCECUR) {
|
||||
offset = (offset < min)?min:offset;
|
||||
offset = (offset > max)?max:offset;
|
||||
} else if (offset > max) {
|
||||
int i;
|
||||
lseek(fs->fd, 0, SEEK_END);
|
||||
for (i=0; i< (offset - max) / 65; i++) {
|
||||
write(fs->fd, msgsm_silence, 65);
|
||||
}
|
||||
}
|
||||
fs->secondhalf = 0;
|
||||
return lseek(fs->fd, offset, SEEK_SET);
|
||||
|
Reference in New Issue
Block a user