[RESOLVED] Monitor with asterisk 1.4.0

Hello everybody,

I have an issue setting up monitor in asterisk 1.4.0… Yet the same settings work with asterisk 1.2.3… My extensions.conf looks something like this:


exten => 10014,1,Set(MONITOR_EXEC=/etc/asterisk/soxmixwav.sh)
exten => 10014,2,Set(CALLFILENAME=/var/spool/asterisk/monitor/${EXTEN})
exten => 10014,3,Answer
exten => 10014,4,Monitor(wav,${CALLFILENAME})
exten => 10014,5,Dial(SIP/10014)
exten => 10014,6,Hangup

[Basically] This code works perfectly on * 1.2.3, but as I said before, when I tried to move it to a newer version (* 1.4.0) it failed, it only creates empty audiofiles and/or it records (strangely) the calls BEFORE I pickup the phone, but it cuts when the other peer answers the call…

I’m wondering if there’s some additional feature I must activate on some other config file.

I’ll take this chance to ask you fellow * users and developers, what or where can I find information on the differences between the 1.2 and 1.4 branches.

Any help or guidance will be very much appreciated,


I really need my * PBX to record calls, but for some reason it doesn’t work at all on asterisk 1.4.0, the odd thing is that it works perfectly on 1.2.3.

I’m a n00b at asterisk so I don’t know what the difference is between the 2 versions, someone please help me out… :question:

Watch the log file as you try to record.

At the Linux command prompt type “tail -f /var/log/asterisk/full”. Then make a call. You might see an error message that will give you a clue.

Thanks gtcleaves for your help, although I don’t have that file on my logs.

Either way, I’ve narrowed my problem to this, my “extensions.conf” file looks something like this now:


exten => _X.,1,Set(MONITOR_EXEC=/etc/asterisk_recorder/soxmixwav.sh)
exten => _X.,2,Set(CALLFILENAME=/var/spool/asterisk/monitor/${EXTEN})
exten => _X.,3,Answer()
exten => _X.,4,Monitor(wav|${CALLFILENAME},m)
exten => _X.,5,Dial(SIP/${EXTEN})

exten => 123,1,Answer()
exten => 123,2,Monitor(wav,monitor_test,m)
exten => 123,3,SayDigits(1234567890)
exten => 123,4,StopMonitor()

When I dial 123 it works perfectly, I get both in/out legs recording my voice and the auto-playback of 1234567890, yet when I dial any other number on the in/out legs I get blank on the in, and the classic ‘ringing’ sound on the out, both audiofiles have the same lenght and both get cutted when the receiver picks up the phone.

My conclusion is that “Dial()” is stoping the recording, so can anyone just tell me if this is a possible reason, and if it is, how can I solve it.

Just as a reminder I’m using asterisk 1.4.0 on an openSuse 10.1 box, kernel

Thanks in advance,


To me, you should try a different test dial plan, like this, and see what happens:
exten => _X.,1,Answer()
exten => _X.,2,Monitor(wav|${CALLFILENAME},m)
exten => _X.,3,Dial(SIP/${EXTEN})

then, if it works, try:
exten => _X.,1,Set(CALLFILENAME=/var/spool/asterisk/monitor/${EXTEN})
exten => _X.,2,Answer()
exten => _X.,3,Monitor(wav|${CALLFILENAME},m)
exten => _X.,4,Dial(SIP/${EXTEN})

in this way you should find what causing your problem.

Hope it helps.


thanks mbruni, I’ll try that then let you know how it goes

Not even the 1st configuration (the simplest one) worked, it still stops recording when the receiver picks up.

I, however, got to this from a sip show peers

sip show peers
Name/username              Host            Dyn Nat ACL Port     Status               
10014/10014          D          5061     Unmonitored           
12345/12345          D          5060     Unmonitored           
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]

and this is the output in my CLI with verbosity set up to 5 of the call

    -- Executing [10014@default:1] Answer("SIP/123456-081b68e0", "") in new stack
    -- Executing [10014@default:2] Monitor("SIP/123456-081b68e0", "wav|10014|m") in new stack
    -- Executing [10014@default:3] Dial("SIP/123456-081b68e0", "SIP/10014") in new stack
    -- Called 10014
    -- SIP/10014-b72044b8 is ringing
    -- SIP/10014-b72044b8 answered SIP/123456-081b68e0
  == Spawn extension (default, 10014, 3) exited non-zero on 'SIP/123456-081b68e0'

I’d put the resulting files BUT you’d just here 5-6 seconds of a very neat ringing… :confused:

I’ve solved this problem, the issue was some weird bug in asterisk 1.4.0, I decided to risk it and upgrade to current version (1.4.5) and everything is just peachy now.

Thank you guys…

Glad it worked out. Early versions of 1.4 were buggy as hell…