SIP Trunk With Cisco Call Manager CUCM

My intention is to record our call center calls using Asterisk. I installed Asterisk. I setup the Asterisk and CUCM as per the guidance given in the link ucguru.com/recording-call-m … -asterisk/. As per the guidance given in the web link if i make a call to 1111200 DN from my CISCO phone then it should record the files in active-calls folder, however no call recording i can see in active-calls folder. Following are the sip messages which I captured from Asterisk console while I made the call from CISCO IP Phone 55254 to the DN 1111200, Can anyone please help me in understanding whats going wrong?

My configuration in extensions_custom.conf are :

[from-trunk]
exten => 1111200,1,Answer
exten => 1111200,n,Noop( SIPCALLID ${SIPCALLID})
exten => 1111200,n,Noop( UNIQUEID ${UNIQUEID})
exten => 1111200,n,Noop( SIPHEADER From = ${SIP_HEADER(From)})
exten => 1111200,n,Noop( SIPHEADER From = ${CUT(CUT(SIP_HEADER(From),;,7),>,1)})
exten => 1111200,n,Set(remotedid=${CUT(CUT(SIP_HEADER(From),=,6),>,1)})
exten => 1111200,n,Set(pseudodidi2=${CUT(SIP_HEADER(From),x-farendaddr,1)})
exten => 1111200,n,Noop( ${remotedid})
exten => 1111200,n,Set(File_Record=${CALLERID(num)}${remotedid}${STRFTIME(${EPOCH},%Y%m%d-%H%M%S)}${CUT(SIPCALLID,-,1)}${CHANNEL:-2}%d:wav)
exten => 1111200,n,Record(/var/spool/asterisk/monitor/active-calls/${File_Record})
exten => 111200,n,Hangup()
#exten => h,1,Set(result=${SHELL(bash /var/spool/asterisk/tmp/script.sh ${File_Record})})
exten => h,1,System(/bin/mv /var/spool/asterisk/monitor/active-calls/${CALLERID(num)}${remotedid}_${CUT(SIPCALLID,-,1)} /var/spool/asterisk/monitor/completed-calls/)
exten => h,2,NoOp(result is ${result})

--------------------------------------------SIP DEBUG On Asterisk------------------------------------------------
– Executing [1111200@from-trunk-sip-CUCM3:1] Set(“SIP/CUCM3-00000009”, “GROUP()=OUT_4”) in new stack
– Executing [1111200@from-trunk-sip-CUCM3:2] Goto(“SIP/CUCM3-00000009”, “from-trunk,1111200,1”) in new stack
– Goto (from-trunk,1111200,1)
– Executing [1111200@from-trunk:1] Answer(“SIP/CUCM3-00000009”, “”) in new stack
> 0x1c8d7c70 – Probation passed - setting RTP source address to 10.149.26.34:29292
– Executing [1111200@from-trunk:2] NoOp(“SIP/CUCM3-00000009”, " SIPCALLID a8426000-4be19a29-3c8-231b950a@10.149.27.35") in new stack
– Executing [1111200@from-trunk:3] NoOp(“SIP/CUCM3-00000009”, " UNIQUEID 1421766433.9") in new stack
– Executing [1111200@from-trunk:4] NoOp(“SIP/CUCM3-00000009”, " SIPHEADER From = “Yasir Shaikh (Extn:55254)” sip:55254@10.149.27.35;tag=78ab2ddf-d3f7-4278-b48e-f7343afb9430-53024901") in new stack
– Executing [1111200@from-trunk:5] NoOp(“SIP/CUCM3-00000009”, " SIPHEADER From = __") in new stack
– Executing [1111200@from-trunk:6] Set(“SIP/CUCM3-00000009”, “remotedid=”) in new stack
– Executing [1111200@from-trunk:7] Set(“SIP/CUCM3-00000009”, "pseudodidi2=“Yasir Shaikh (E”) in new stack
– Executing [1111200@from-trunk:8] NoOp(“SIP/CUCM3-00000009”, " ") in new stack
– Executing [1111200@from-trunk:9] Set(“SIP/CUCM3-00000009”, “File_Record=1.wav”) in new stack
– Executing [1111200@from-trunk:10] Record(“SIP/CUCM3-00000009”, “/var/spool/asterisk/monitor/active-calls/1.wav”) in new stack
– <SIP/CUCM3-00000009> Playing ‘beep.gsm’ (language ‘en’)
– Auto fallthrough, channel ‘SIP/CUCM3-00000009’ status is ‘UNKNOWN’
– Executing [h@from-trunk:1] Macro(“SIP/CUCM3-00000009”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/CUCM3-00000009”, “1?endmixmoncheck”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] NoOp(“SIP/CUCM3-00000009”, “End of MIXMON check”) in new stack
– Executing [s@macro-hangupcall:10] GotoIf(“SIP/CUCM3-00000009”, “1?nomeetmemon”) in new stack
– Goto (macro-hangupcall,s,28)
– Executing [s@macro-hangupcall:28] NoOp(“SIP/CUCM3-00000009”, “End of MEETME check”) in new stack
– Executing [s@macro-hangupcall:29] GotoIf(“SIP/CUCM3-00000009”, “1?noautomon”) in new stack
– Goto (macro-hangupcall,s,34)
– Executing [s@macro-hangupcall:34] NoOp(“SIP/CUCM3-00000009”, “TOUCH_MONITOR_OUTPUT=”) in new stack
– Executing [s@macro-hangupcall:35] GotoIf(“SIP/CUCM3-00000009”, “1?noautomon2”) in new stack
– Goto (macro-hangupcall,s,41)
– Executing [s@macro-hangupcall:41] NoOp(“SIP/CUCM3-00000009”, “MONITOR_FILENAME=”) in new stack
– Executing [s@macro-hangupcall:42] GotoIf(“SIP/CUCM3-00000009”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,45)
– Executing [s@macro-hangupcall:45] GotoIf(“SIP/CUCM3-00000009”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,48)
– Executing [s@macro-hangupcall:48] GotoIf(“SIP/CUCM3-00000009”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,50)
– Executing [s@macro-hangupcall:50] AGI(“SIP/CUCM3-00000009”, “hangup.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
– <SIP/CUCM3-00000009>AGI Script hangup.agi completed, returning 0
– Executing [s@macro-hangupcall:51] Hangup(“SIP/CUCM3-00000009”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 51) exited non-zero on ‘SIP/CUCM3-00000009’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/CUCM3-00000009’

Have you contacted the people that wrote the lab? It’s not terribly exciting for people here to try and debug someone else’s explicit instructions, especially those that include dialplan made by an additional third party (probably FreePBX dialplan).

The record tries, and then things hang up:

-- Executing [1111200@from-trunk:10] Record("SIP/CUCM3-00000009", "/var/spool/asterisk/monitor/active-calls/1.wav") in new stack
-- <SIP/CUCM3-00000009> Playing 'beep.gsm' (language 'en')
-- Auto fallthrough, channel 'SIP/CUCM3-00000009' status is 'UNKNOWN'

I have no comment on whether or not it’s taking place. You might want to turn up your debug levels and see if the file’s being written or not.

Thanks malcolmd to reply me. Yes I am using Elastix box for call recording purpose. But anyways you given me a nice clue to enable the debug. I enabled the full debug and found that asterisk was trying to record it correctly but was not able to create files in active-calls folder and completed-calls folder. So all i needed to do was to give the full permission to active-calls and completed-calls folder. I did that using chmod command. after that asterisk started recording files correctly when i dialed 11112000.

Regards,
Yasir

Howdy,

Yay. You might want to mention to the Elastix people though that they have a problem with their file folder permissions. That’s not an Asterisk problem.

Cheers