Call record/ Transfer issue

Hi all

I am trying to customize the call recording macro to include the numbers dialed as the file name… I have no issue when the call is done directly from the phone, but, if an autodialer is used, it shows up as s for the number dialed. This appears to be caused because an autodialer passes the number in as an xfer

how can I pickup the xfered number based on below… Do note, this is a copy of the macro-record put into the override file and then modified

Inbound calls are fine as well as outbound calls done directly from the phone… Here is a saved file that is broken due to transfer (xfer)

– Executing [s@macro-record-enable:17] NoOp(“SIP/122-00003209”, “Recording enable for 122”) in new stack
– Executing [s@macro-record-enable:18] NoOp(“SIP/122-00003209”, “VERIFY-@from-internal-xfer”) in new stack
– Executing [s@macro-record-enable:19] Set(“SIP/122-00003209”, “CALLFILENAME=Direction:OUT-Agent:-EXT:122-Date:20101227-Time:133757-ToNum:s”) in new stack
– Executing [s@macro-record-enable:20] Goto(“SIP/122-00003209”, “record”) in new stack
– Goto (macro-record-enable,s,24)
– Executing [s@macro-record-enable:24] MixMonitor(“SIP/122-00003209”, “OUT/Direction:OUT-Agent:-EXT:122-Date:20101227-Time:133757-ToNum:s .wav,”) in new stack
– Executing [s@macro-record-enable:25] NoOp(“SIP/122-00003209”, “MixMonitor(OUT/Direction:OUT-Agent:-EXT:122-Date:20101227-Time:133757-To Num:s.wav,)”) in new stack
– Executing [s@macro-record-enable:26] MacroExit(“SIP/122-00003209”, “”) in new stack
– Executing [514032498124@from-internal-xfer:6] Macro(“SIP/122-00003209”, “dialout-trunk,2,,”) in new stack


James

[macro-record-enable]
include => macro-record-enable-custom
exten => s,1,GotoIf($["${BLINDTRANSFER}" = “”]?check)
exten => s,n,ResetCDR(w)
exten => s,n,StopMixMonitor()
exten => s,n(check),ExecIf($["${ARG1}"=""]?MacroExit())
exten => s,n,GotoIf($["${ARG2}"=“Group”]?Group:OUT)
exten => s,n(Group),Set(LOOPCNT=${FIELDQTY(ARG1,-)})

exten => s,n,Set(ITER=1)
exten => s,n(begin),GotoIf($["${CUT(DB(AMPUSER/${CUT(ARG1,-,${ITER})}/recording),=,3)}" != “Always”]?continue)
exten => s,n,Set(TEXTEN=${CUT(ARG1,-,${ITER})})
exten => s,n,Noop(Recording enable for IN-1${TEXTEN})
exten => s,n,Set(CALLFILENAME=Direction:IN-Agent:${SIPUSERAGENT}-EXT:${ARG1}-${STRFTIME(${EPOCH},Date:%Y%m%d-Time:%H%M%S)}-Dealerdid:${FROM_DID})
;exten => s,n,Noop("${TEXTEN}"-"${CDR(dst)})
;exten => s,n,GotoIf("${TEXTEN}"="${CDR(dst)}"?continue)
exten => s,n,Goto(record)
exten => s,n(continue),Set(ITER=$[${ITER}+1])
exten => s,n,GotoIf($[${ITER}<=${LOOPCNT}]?begin)
exten => s,n(OUT),GotoIf($["${ARG2}"=“IN”]?IN)
exten => s,n,ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\|,1):4}" != “Always”]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
exten => s,n,Noop(VERIFY-${EXTEN:1}@${TRANSFER_CONTEXT})
exten => s,n,Set(CALLFILENAME=Direction:OUT-Agent:${SIPUSERAGENT}-EXT:${ARG1}-${STRFTIME(${EPOCH},Date:%Y%m%d-Time:%H%M%S)}-ToNum:${CDR(dst)})
exten => s,n,Goto(record)
exten => s,n(IN),ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\|,2):3}" != “Always”]?MacroExit())
exten => s,n,Noop(Recording enable for ${ARG1})
;exten => s,n,Gotoif(${SIPUSERAGENT}=${CALLERID(num}?MacroExit())
exten => s,n,Set(CALLFILENAME=Direction:IN-Agent:${SIPUSERAGENT}-EXT:${ARG1}-${STRFTIME(${EPOCH},Date:%Y%m%d-Time:%H%M%S)}-Dealerdid:${FROM_DID}-FromNum:${CALLERID(num)})
exten => s,n(record),MixMonitor(${MIXMON_DIR}${ARG2}/${CALLFILENAME}.${MIXMON_FORMAT},${MIXMON_POST})
exten => s,n,Noop(MixMonitor(${MIXMON_DIR}${ARG2}/${CALLFILENAME}.${MIXMON_FORMAT},${MIXMON_POST}))
exten => s,n,MacroExit()

; end of [macro-record-enable]