[Asterisk-Users] voip-info: Asterisk record calls

Tim Litwiller tim at litwiller.net
Mon Jan 9 21:48:17 MST 2006


Mojo with Horan & Company, LLC wrote:
> Hi Tim!
>
> Wow, I didn't imagine that asterisk on different systems would use 
> different date codes for the monitor filenames -- but aah isn't 
> asterisk ;)
AAH builds Asterisk from source during the install. 

I just reinstalled to the latest AAH 2.2 which uses asterisk 1.2.1.
now I get recordings like this - these are all recorded with "record 
always" turn on in AMP.

internal to internal call - 20060109-212748-1136863668.139.WAV
incoming call - g200-20060109-205540-1136861730.135.WAV
outgoing call - OUT202-20060109-222003-1136866803.141.WAV
outgoing call - OUT203-20060109-205232-1136861552.133.WAV

here is the code I'm using now
--- snip ---
                foreach($a as $b)
                {
                        $k = explode(".", $b);
                        $l = explode("-", $k[0]);
                        $m = $k[1];
                                if (isset($l[3])) {
                                $unixtime = $l[3];
                                $o = $l[0];
                                } else {
                                $unixtime = $l[2];
                                $o = "internal";
                                }
                        $q = date('F j, Y \a\t g:i a', $unixtime);
                        echo "$i. $o made a call at $q, on channel 
<b>".$m." </b> -
--- end snip ---

I'm guessing $m is a channel number or something like that since I don't 
have any extensions like 133, 135 or 139 -seems to be incrementing up
so it probably isn't a usefull number.

Your file names seem to have more usefull info - mine in AAH just have 
the date and time twice and the sip extension that made an outgoing 
call. There is probably a compile option somewhere that would set it 
like yours that I need to find.








>
> My monitor filenames include the date and time, embedded as seconds 
> since epoch iirc:
>
> [pbx at pbx monitor]$ ll
> auto-1136394539-112-7476011-in.wav
> auto-1136394539-112-7476011-out.wav
> [pbx at pbx monitor]$ ll
> auto-1136394539-112-7476011.wav
>
> So the 1136394539 part is seconds since epoch, 112 is who started the 
> recording, 7476011 is where they were connected to when it happened.
> And, I suspect the auto- part is 'cause I used automon feature to do 
> this?  I haven't looked at asterisk code enough to see what filenames 
> are created when.
>
> Thank you for the patch though.  Now that I know many people are 
> trying this stuff, I'll try to incorporate autodetection of filename 
> style....
>
> Moj
>
>





More information about the asterisk-users mailing list