Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.

About voice recording in Asterisk #3

@logs777

Description

@logs777

Please, do not get mad at me for talkativeness, I just want to recommend to add into manual information about recording voice in asterisk. I understand, that this is off topic, but with this (I don't know how to say it in English) "снизится порог вхождения".
For example, I configured voice recording with this way:

  1. Make directory for voice records
    mkdir -p /var/spool/asterisk/monitor
  2. Install lame: download latest archive from here for example with wget , and after that:
tar zxvf lame-3.*.gz 
cd lame-3.*
./configure
make
make install
  1. Create file /usr/local/bin/conv2mp3.sh with the following content:
#!/bin/sh
LAME="/usr/local/bin/lame --noreplaygain"
filename="$1"
foldername="$2"
$LAME -V2 $foldername/$filename.wav $foldername/$filename.mp3
rm -f $foldername/$filename.wav
  1. Use this script in /etc/asterisk/extensions.conf to convert recorded WAV file to MP3 (also, this is example of recording voice in format needed by webcdr ) :
exten => _8XX,1,Set(filename=${UNIQUEID})
exten => _8XX,n,Set(foldername=/var/spool/asterisk/monitor/${STRFTIME(,,%Y)}/${STRFTIME(,,%m)}/${STRFTIME(,,%d)}/)
exten => _8XX,n,MixMonitor(${foldername}/${filename}.wav,b,/usr/local/bin/conv2mp3.sh ${filename} ${foldername})
exten => _8XX,n,Dial(SIP/${EXTEN},30,t)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions