MixMaster hangs up on Zap channel


#1

Asterisk 1.2.7.1 from source running on RHE4 32 bit, with most configuration done via FreePBX 2.0.1. In order to provide recording of conference calls (that are not managed by Asterisk), I have tried a few things. In extentensions_custom.conf, I currently have:

exten => 288,1,Answer() exten => 288,n,Wait(1) exten => 288,n,Playback(this) exten => 288,n,Playback(call) exten => 288,n,Playback(is-now-being-recorded) exten => 288,n,MixMonitor(/tmp/record288.wav,,/usr/local/bin/mailmp3 ^{MixMonitor_FILENAME}) exten => 288,n,Hangup()

This works fine to record a SIP call and then email the recording after hangup, but when that extension is called via a Digium TDM400P line from the PSTN, Asterisk/MixMonitor hangs up immediately. The asterisk -r output is:

-- Starting simple switch on 'Zap/4-1' -- Executing Set("Zap/4-1", "FROM_DID=s") in new stack -- Executing Goto("Zap/4-1", "aa_1|s|1") in new stack -- Goto (aa_1,s,1) -- Executing GotoIf("Zap/4-1", "1?3") in new stack -- Goto (aa_1,s,3) -- Executing Answer("Zap/4-1", "") in new stack -- Executing Wait("Zap/4-1", "1") in new stack -- Executing Set("Zap/4-1", "LOOPED=1") in new stack -- Executing GotoIf("Zap/4-1", "0?hang|1") in new stack -- Executing Set("Zap/4-1", "DIR-CONTEXT=general") in new stack -- Executing Set("Zap/4-1", "TIMEOUT(digit)=3") in new stack -- Digit timeout set to 3 -- Executing Set("Zap/4-1", "TIMEOUT(response)=7") in new stack -- Response timeout set to 7 -- Executing BackGround("Zap/4-1", "custom/aa_1") in new stack -- Playing 'custom/aa_1' (language 'en') == CDR updated on Zap/4-1 -- Executing Answer("Zap/4-1", "") in new stack -- Executing Wait("Zap/4-1", "1") in new stack -- Executing Playback("Zap/4-1", "this") in new stack -- Playing 'this' (language 'en') -- Executing Playback("Zap/4-1", "call") in new stack -- Playing 'call' (language 'en') -- Executing Playback("Zap/4-1", "is-now-being-recorded") in new stack -- Playing 'is-now-being-recorded' (language 'en') -- Executing MixMonitor("Zap/4-1", "/tmp/record287.wav||/usr/local/bin/mailmp3 ^{MixMonitor_FILENAME}") in new stack -- Executing Hangup("Zap/4-1", "") in new stack == Spawn extension (aa_1, 288, 7) exited non-zero on 'Zap/4-1' -- Executing Hangup("Zap/4-1", "") in new stack == Spawn extension (aa_1, h, 1) exited non-zero on 'Zap/4-1' -- Hungup 'Zap/4-1' == Begin MixMonitor Recording Zap/4-1

Notice the Hangup() right after MixMonitor()–this is immediate, not when the incoming caller hangs up. Any ideas about how to make this work with analog connections? The Record() tool seems to work reliably recording the incoming call, but having …,h,System(…) in the dialplan to do something after the line hangs ups isn’t working either. I can poll temp with cron to get the email sent, but I’d rather have Asterisk run the email script immediately after the real end of the call.