Call Recording *1 ends the call

Using Asterisk 2.11
FreePBX 2.11
All modules are uptodate.

If I set recording options to always, it works like a charm.
However, if recording option is set to OnDemand = Enabled. the call disconnects when *1 is pressed. I have attached the log below. Appreciate your help.
Thank you.

[2013-10-04 19:06:59] VERBOSE[2205][C-00000093] netsock2.c: == Using SIP RTP TOS bits 184
[2013-10-04 19:06:59] VERBOSE[2205][C-00000093] netsock2.c: == Using SIP RTP CoS mark 5
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [91xxxxxxxxxx@from-internal:1] Macro(“SIP/6xxx-000000c6”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:1] Set(“SIP/6xxx-000000c6”, “TOUCH_MONITOR=1380928019.215”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:2] Set(“SIP/6xxx-000000c6”, “AMPUSER=6xxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:3] GotoIf(“SIP/6xxx-000000c6”, “0?report”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:4] ExecIf(“SIP/6xxx-000000c6”, “1?Set(REALCALLERIDNUM=6xxx)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:5] Set(“SIP/6xxx-000000c6”, “AMPUSER=6xxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:6] Set(“SIP/6xxx-000000c6”, “AMPUSERCIDNAME=Sid Varma”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:7] GotoIf(“SIP/6xxx-000000c6”, “0?report”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:8] Set(“SIP/6xxx-000000c6”, “AMPUSERCID=6xxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:9] Set(“SIP/6xxx-000000c6”, “__DIAL_OPTIONS=Ttr”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:10] Set(“SIP/6xxx-000000c6”, “CALLERID(all)=“Sid Varma” <6xxx>”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:11] GotoIf(“SIP/6xxx-000000c6”, “0?limit”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:12] ExecIf(“SIP/6xxx-000000c6”, “1?Set(GROUP(concurrency_limit)=6xxx)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:13] GotoIf(“SIP/6xxx-000000c6”, “1?continue”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (macro-user-callerid,s,26)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:26] Set(“SIP/6xxx-000000c6”, “CALLERID(number)=6xxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:27] Set(“SIP/6xxx-000000c6”, “CALLERID(name)=Sid Varma”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:28] Set(“SIP/6xxx-000000c6”, “CDR(cnum)=6xxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:29] Set(“SIP/6xxx-000000c6”, “CDR(cnam)=Sid Varma”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-user-callerid:30] Set(“SIP/6xxx-000000c6”, “CHANNEL(language)=en”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [91xxxxxxxxxx@from-internal:2] Set(“SIP/6xxx-000000c6”, “MOHCLASS=default”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [91xxxxxxxxxx@from-internal:3] Set(“SIP/6xxx-000000c6”, “_NODEST=”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [91xxxxxxxxxx@from-internal:4] Gosub(“SIP/6xxx-000000c6”, “sub-record-check,s,1(out,91xxxxxxxxxx,)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:1] Set(“SIP/6xxx-000000c6”, “REC_POLICY_MODE_SAVE=”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:2] GotoIf(“SIP/6xxx-000000c6”, “1?check”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (sub-record-check,s,7)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:7] Set(“SIP/6xxx-000000c6”, “__MON_FMT=WAV”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:8] GotoIf(“SIP/6xxx-000000c6”, “1?next”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (sub-record-check,s,11)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:11] ExecIf(“SIP/6xxx-000000c6”, “0?Return()”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:12] ExecIf(“SIP/6xxx-000000c6”, “0?Set(__REC_POLICY_MODE=)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:13] GotoIf(“SIP/6xxx-000000c6”, “0?out,1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:14] Set(“SIP/6xxx-000000c6”, “__REC_STATUS=INITIALIZED”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:15] Set(“SIP/6xxx-000000c6”, “NOW=1380928019”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:16] Set(“SIP/6xxx-000000c6”, “__DAY=04”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:17] Set(“SIP/6xxx-000000c6”, “__MONTH=10”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:18] Set(“SIP/6xxx-000000c6”, “__YEAR=2013”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:19] Set(“SIP/6xxx-000000c6”, “__TIMESTR=20131004-190659”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:20] Set(“SIP/6xxx-000000c6”, “__FROMEXTEN=6xxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:21] Set(“SIP/6xxx-000000c6”, “__CALLFILENAME=out-91xxxxxxxxxx-6xxx-20131004-190659-13809xxxxx.215”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-record-check:22] Goto(“SIP/6xxx-000000c6”, “out,1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (sub-record-check,out,1)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [out@sub-record-check:1] ExecIf(“SIP/6xxx-000000c6”, “1?Set(__REC_POLICY_MODE=dontcare)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [out@sub-record-check:2] GosubIf(“SIP/6xxx-000000c6”, “0?record,1(exten,91xxxxxxxxxx,6xxx)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [out@sub-record-check:3] Return(“SIP/6xxx-000000c6”, “”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [91xxxxxxxxxx@from-internal:5] Macro(“SIP/6xxx-000000c6”, “dialout-trunk,1,1xxxxxxxxxx,off”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“SIP/6xxx-000000c6”, “DIAL_TRUNK=1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/6xxx-000000c6”, “0?sub-pincheck,s,1()”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/6xxx-000000c6”, “0?disabletrunk,1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“SIP/6xxx-000000c6”, “DIAL_NUMBER=1xxxxxxxxxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“SIP/6xxx-000000c6”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“SIP/6xxx-000000c6”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/6xxx-000000c6”, “1?nomax”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (macro-dialout-trunk,s,9)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/6xxx-000000c6”, “0?skipoutcid”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:10] Set(“SIP/6xxx-000000c6”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:11] Macro(“SIP/6xxx-000000c6”, “outbound-callerid,1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/6xxx-000000c6”, “0?Set(CALLERPRES()=)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/6xxx-000000c6”, “0?Set(REALCALLERIDNUM=6xxx)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/6xxx-000000c6”, “1?normcid”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (macro-outbound-callerid,s,6)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“SIP/6xxx-000000c6”, “USEROUTCID=”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“SIP/6xxx-000000c6”, “EMERGENCYCID=”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“SIP/6xxx-000000c6”, “TRUNKOUTCID=19174361347”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/6xxx-000000c6”, “1?trunkcid”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Goto (macro-outbound-callerid,s,14)
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/6xxx-000000c6”, “1?Set(CALLERID(all)=19174361347)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/6xxx-000000c6”, “0?Set(CALLERID(all)=)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:16] ExecIf(“SIP/6xxx-000000c6”, “0?Set(CALLERID(all)=)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:17] ExecIf(“SIP/6xxx-000000c6”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:18] Set(“SIP/6xxx-000000c6”, “CDR(outbound_cnum)=19174361347”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-outbound-callerid:19] Set(“SIP/6xxx-000000c6”, “CDR(outbound_cnam)=”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/6xxx-000000c6”, “1?sub-flp-1,s,1()”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-flp-1:1] ExecIf(“SIP/6xxx-000000c6”, “0?Set(TARGET_FLP_1=2017266201)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-flp-1:2] GotoIf(“SIP/6xxx-000000c6”, “0?match”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@sub-flp-1:3] Return(“SIP/6xxx-000000c6”, “”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:13] Set(“SIP/6xxx-000000c6”, “OUTNUM=1xxxxxxxxxx”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“SIP/6xxx-000000c6”, “custom=SIP/Flowroute”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/6xxx-000000c6”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/6xxx-000000c6”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:17] Macro(“SIP/6xxx-000000c6”, “dialout-trunk-predial-hook,”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/6xxx-000000c6”, “”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/6xxx-000000c6”, “0?bypass,1”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/6xxx-000000c6”, “1?Set(CONNECTEDLINE(num,i)=1xxxxxxxxxx)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/6xxx-000000c6”, “1?Set(CONNECTEDLINE(name,i)=CID:19174361347)”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/6xxx-000000c6”, “0?customtrunk”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-dialout-trunk:22] Dial(“SIP/6xxx-000000c6”, “SIP/Flowroute/1xxxxxxxxxx,300,Tt”) in new stack
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] netsock2.c: == Using SIP RTP TOS bits 184
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] netsock2.c: == Using SIP RTP CoS mark 5
[2013-10-04 19:06:59] VERBOSE[5468][C-00000093] app_dial.c: – Called SIP/Flowroute/1xxxxxxxxxx
[2013-10-04 19:07:00] VERBOSE[5468][C-00000093] app_dial.c: – SIP/Flowroute-000000c7 is ringing
[2013-10-04 19:07:00] VERBOSE[5468][C-00000093] app_dial.c: – SIP/Flowroute-000000c7 is making progress passing it to SIP/6xxx-000000c6
[2013-10-04 19:07:05] VERBOSE[5468][C-00000093] app_dial.c: – SIP/Flowroute-000000c7 answered SIP/6xxx-000000c6
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] features.c: – Feature Found: apprecord exten: apprecord
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-one-touch-record:1] Set(“SIP/6xxx-000000c6”, “ONETOUCH_REC_SCRIPT_STATUS=”) in new stack
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-one-touch-record:2] System(“SIP/6xxx-000000c6”, “/var/lib/asterisk/bin/one_touch_record.php SIP/6xxx-000000c6”) in new stack
[2013-10-04 19:07:13] WARNING[5468][C-00000093] app_system.c: Unable to execute ‘/var/lib/asterisk/bin/one_touch_record.php SIP/6xxx-000000c6’
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] app_macro.c: == Spawn extension (macro-one-touch-record, s, 2) exited non-zero on ‘SIP/6xxx-000000c6’ in macro ‘one-touch-record’
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Executing [h@macro-dialout-trunk:1] Macro(“SIP/6xxx-000000c6”, “hangupcall,”) in new stack
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/6xxx-000000c6”, “1?theend”) in new stack
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Goto (macro-hangupcall,s,3)
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-hangupcall:3] ExecIf(“SIP/6xxx-000000c6”, “0?Set(CDR(recordingfile)=)”) in new stack
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: – Executing [s@macro-hangupcall:4] Hangup(“SIP/6xxx-000000c6”, “”) in new stack
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/6xxx-000000c6’ in macro ‘hangupcall’
[2013-10-04 19:07:13] VERBOSE[5468][C-00000093] pbx.c: == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/6xxx-000000c6’

someone solved this problem?

Are you having this problem or a similar one?