Recording Call kills asterisk

The basic problem is that I want to enable call recording for all calls, inbound and outbound. When i use the call recording all goes well for about 20 - 30 minutes and then the asterisk process stops and all calls are dropped and I have to restart asterisk.
I am running asterisk 1.4.7.1 on Ubuntu.
Yes I have tried newest update, 1.4.14 but that didn’t help and caused our incomming faxes not to work as well, so I went back to 1.4.7.1.

I have included the most important parts of the extensions.conf file. But im not sure what will be relevant. Please look at the call recording section and tell me if that is the correct way to use MixMonitor.

Thanks to anyone who can help.


; --------------
;   EXTENSIONS
; --------------
FRONTDESK  => 100
MM001      => 101
.
.
.
;The rest of the extensions


[trunklocal]
;
; Local seven-digit dialing accessed through trunk interface
;
exten => _9NXXXXXX,1,Macro(sip2cid)     ; set the callerid to the extension to facilitate reports
exten => _9NXXXXXX,n,Macro(recordcall,${CALLERID(num)},${EXTEN})
exten => _9NXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9NXXXXXX,100,Congestion


[trunkld]
; Long distance context accessed through trunk
exten =>  _91NXXNXXXXXX,1,Macro(sip2cid)     ; set the callerid to the extension to facilitate reports
exten =>  _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten =>  _91NXXNXXXXXX,100,Congestion


[macro-recordcall]
 exten => s,1,Set(callrecordingfile=${ARG1}_${ARG2}_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
 exten => s,n,MixMonitor(${callrecordingfile}.wav)


[macro-sip2cid]
; -----------------
;  This macro is used to map from the sid callerid
;  which is the port name, to an actual extension
;  that can be used for voicemail, call fwd, and rpts
;   *Note* that an extension name of SIP/123 for example
;   is called "Routing by Caller ID".  So, technically
;   all the extensions are "SIP", but the calleridnum
;   specifies which one applies
; -----------------
exten => s,1,Set(sipdevice=invalid)
exten => s,2,Goto(SIP,1)
exten => ${SIP-FRONTDESK},1,Set(CALLERID(num)=${FRONTDESK})
exten => SIP,1,Set(sipdevice=${CUT(CUT(CHANNEL,-,1),/,2)})
exten => SIP,2,GotoIf(${DB_EXISTS(PSDEV2X/${sipdevice})}?20)
exten => SIP,3,Set(CALLERID(ANI)=${CALLERID(num)})

exten => SIP,20,Set(CALLERID(num)=${DB_RESULT})
exten => SIP,21,Goto(3)
.
.
.
.


[mainmenu]
exten => s,1,Wait,1                     	; Wait a second, just for fun
exten => s,2,Answer                     	; Answer the line
exten => s,3,Set(TIMEOUT(digit)=5)             ; Set Digit Timeout to 5 seconds
exten => s,4,Set(TIMEOUT(response)=15)         ; Set Response Timeout to 10 seconds
exten => s,5,BackGround(welcome)    ; Play welcome message
exten => s,6,BackGround(welcome2)   ; Play some instructions
exten => s,7,BackGround(if_you_know_your_partys_ext_please_dial_it_anytime)  ; Play some instructions
exten => s,n,Wait,1                     ; Wait a second, just for fun
exten => s,n,BackGround(press_zero_to_talk_to_the_operator)  ; Play some instructions
exten => s,n,WaitExten(15)

exten => 999,1,Goto(default,s,1)        ; Set this extension to go to the Auto Attendant

; Asterisk has a set of standard extensions (t,i,o,a)
;  t -- timeout
;  i -- invalid extension
;  o -- used for operator exit by pressing zero in voicemail
;  a -- if they press * during voicemail greeting

exten => t,1,Set(LOOPCNT=$[${LOOPCNT} + 1])
exten => t,2,GotoIf($[${LOOPCNT} >= 2]?3:s|7)                   ; If they take too long, give up
exten => t,3,Playback(goodbye)
exten => t,4,Hangup                     ; If they take too long, give up

exten => i,1,Playback(invalid)          ; "That's not valid, try again"
exten => i,2,Goto(s,7)

; For the operator, we want to have it ring at the front desk for 10 seconds
; and if it does not answer, then have it ring at multiple locations for another 15 seconds
; and if they do not answer, then go to voicemail.
exten => o,1,Playback(please_hold_while_i_try_that_extension,skip)         ; "Please hold while..."
exten => o,n,Macro(recordcall,${CALLERID(num)},100)
exten => o,n,Dial(${SIP-FRONTDESK},10,Tt)
exten => o,n,Goto(o-${DIALSTATUS},1)                    ; Jump based on status (NOANSWER,BUSY,etc.)

exten => o-BUSY,1,Voicemail(100,b)                       ; If busy, send to voicemail w/ busy announce
exten => o-BUSY,n,Goto(default,s,1)                     ; If they press #, return to start

exten => o-CONGESTION,1,Voicemail(100,b)            ; If congestion, send to voicemail w/ busy announce
exten => o-CONGESTION,2,Goto(default,s,1)               ; If they press #, return to start

exten => o-NOANSWER,1,Dial(${SIP-FRONTDESK},15,Tt)
exten => o-NOANSWER,n,Goto(o2-${DIALSTATUS},1)          ; Jump based on status
exten => o-.,1,Goto(o-NOANSWER,1)                       ; Treat anything else as no answer




[macro-stdexten]
;
; Standard extension macro (with call forwarding):
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;   ${ARG3} - Dial Arguments to use
;
exten => s,1,GotoIf(${DB_EXISTS(CFIM/${ARG1})}?:10)      ; If CFIM key does not exist, goto 4
exten => s,n,Set(temp=${DB_RESULT})                     ; Get CFIM key
exten => s,n,GotoIf($[${LEN(${temp})} = 3])?users,${temp},1)
exten => s,n,Dial(${TRUNK}/${temp},,m)                  ; Unconditional forward

; if arg3 is not set, go to step 5, if it is set, go to step 202
exten => s,10,GotoIf($["${ARG3}" = ""]?:202)            ; Check to see if custom Dial arguments were passed in
exten => s,n,Set(dialedStdExten=${ARG1})                ; save the extension so we can handle * during voicemail
exten => s,n,Dial(${ARG2},20,Ttm)                       ; Ring the interface, 20 seconds maximum allow calls to be transfered also play music

exten => s,n,Goto(s-${DIALSTATUS},1)                    ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
.
.
.
.
.


[macro-loginexten]
exten => s,1,Set(dialedStdExten=${MACRO_EXTEN})
exten => s,n,GotoIf(${DB_EXISTS(CFIM/${dialedStdExten})}?:nofwd)   ; If CFIM key does not exist, goto nofwd
exten => s,n(forwarded),Set(temp=${DB_RESULT})                     ; Get CFIM key
exten => s,n,GotoIf($[${LEN(${temp})} = 3])?users,${temp},1)       ; forward to extension
exten => s,n,Macro(recordcall,${CALLERID(num)},${dialedStdExten})
exten => s,n,Dial(${TRUNK}/${temp},,m)                             ; forward to outside number

exten => s,10(nofwd),GotoIf(${DB_EXISTS(PSX2DEV/${dialedStdExten})}?:s-CHANUNAVAIL,1)
exten => s,n,Set(sipdevice=${DB_RESULT})
exten => s,n,Macro(recordcall,${CALLERID(num)},${dialedStdExten})
exten => s,n,Dial(SIP/${sipdevice},20,Ttm)                     ; Ring the interface, 20 seconds maximum allow calls to be transfered and play music
exten => s,n,Goto(s-${DIALSTATUS},1)                    ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

.
.
.
.
.




[users]
exten => ${FRONTDESK},1,Playback(please_hold_while_i_try_that_extension,skip)         ; "Please hold while..."
exten => ${FRONTDESK},2,Macro(stdexten,${FRONTDESK},${SIP-FRONTDESK})

exten => ${MM001},1,Playback(please_hold_while_i_try_that_extension,skip)         ; "Please hold while..."
exten => ${MM001},n,Macro(loginexten)

.
.
.
.
.

ok. I find it hard to believe nobody has had this problem. Nobody’s asterisk has died when trying to do call recording?

Somebody give me a clue. If i don’t have enough info for you let me know.

I’m running asterisk 1.2.13 and I use Monitor instead of MixMonitor

I saw this:
[macro-recordcall]
exten => s,1,Set(callrecordingfile=${ARG1}${ARG2}${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)})
exten => s,n,MixMonitor(${callrecordingfile}.wav)

I do that in this way:
[macro-recordcall]
exten => s,1,Set(callrecordingfile=${ARG1}${ARG2}${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)})
exten => s,n,Monitor(wav,callrecordingfile,m)

Sorry, is in this way:

[macro-recordcall]
exten => s,1,Set(callrecordingfile=${ARG1}${ARG2}${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)})
exten => s,n,Monitor(wav,${callrecordingfile},m)

Thanks I’ll give that a try. I’ll update this page either way.