[asterisk-users] help for recording
Taylan KIRAN
taylank at w3media.net
Mon Nov 6 17:23:34 MST 2006
Hello ,
I want to enable recording for a few extensions. In sip.conf it is
defined as
record_out=Always
record_in=Always
under the section of extension.but it doesn't work.
Extensions are defined in the extension_additional.conf file like
exten => 10,1,Macro(exten-vm,10,10)
exten => 10,hint,SIP/10
exten => ${VM_PREFIX}10,1,Macro(vm,10,DIRECTDIAL)
I can't be sure how should I enable recording for this extension because
of the macros.
I think I should add something like
exten=> 10,1, record,caller:wav # or can I use speech instead of
caller.
Or
Should I use Macro(systemrecording,dorecord) and how can I use it ?
Thanks ,
macros are define in the extensions.conf file as following
[macro-exten-vm]
exten => s,1,Macro(user-callerid)
exten => s,n,Set(FROMCONTEXT=exten-vm)
exten => s,n,Set(VMBOX=${ARG1})
exten => s,n,Set(EXTTOCALL=${ARG2})
exten => s,n,Set(CFUEXT=${DB(CFU/${EXTTOCALL})})
exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] |
$["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")})
exten => s,n,Macro(record-enable,${EXTTOCALL},IN)
exten => s,n,GotoIf($["${CHANNEL:0:5}" = "Local"]?dolocaldial,1) ; if
the channel is Local
exten => s,n,Macro(dial,${RT},${DIAL_OPTIONS},${EXTTOCALL})
exten => s,n,GosubIf($[$["${DIALSTATUS}"="NOANSWER"] &
$["foo${CFUEXT}"!="foo"]]?docfu,1) ; check for CFU in use on no answer
exten => s,n,NoOp(Voicemail is '${VMBOX}')
exten => s,n,GotoIf($["${VMBOX}" = "novm"]?s-${DIALSTATUS},1) ; no
voicemail in use for this extension
exten => s,n,NoOp(Sending to Voicemail box ${EXTTOCALL})
exten => s,n,Macro(vm,${VMBOX},${DIALSTATUS})
; Local channel should try to ring the phone only then come back out
; i.e. it's wrong for it to Answer the call in any way (including
Congestion
; and stop the initiating dialplan from being returned to)
exten => dolocaldial,1,Macro(dial,,${DIAL_OPTIONS},${EXTTOCALL})
exten => dolocaldial,n,NoOp(Returned to dolocaldial with DIALSTATUS
'${DIALSTATUS}')
; Try the Call Forward on No Answer / Unavailable number
exten => docfu,1,Set(RTCFU=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")})
exten =>
docfu,n,Dial(Local/${CFUEXT}@from-internal/n,${RTCFU},${DIAL_OPTIONS})
exten => docfu,n,Return
; Extensions with no Voicemail box reporting BUSY come here
exten => s-BUSY,1,NoOp(Extension is reporting BUSY and not passing to
Voicemail)
exten => s-BUSY,n,Busy()
exten => s-BUSY,n,Wait(60)
exten => s-BUSY,n,Congestion()
; Anything but BUSY comes here
exten => _s-.,1,Congestion()
[macro-vm]
exten => s,1,Macro(user-callerid)
exten =>
s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")})
exten => s,n,Goto(s-${ARG2},1)
exten => s-BUSY,1,NoOp(BUSY voicemail)
exten => s-BUSY,n,Macro(get-vmcontext,${ARG1})
exten => s-BUSY,n,Voicemail(${ARG1}@${VMCONTEXT}|b${VMGAIN}) ;
Voicemail Busy message
exten => s-BUSY,n,Goto(exit-${VMSTATUS},1)
exten => s-DIRECTDIAL,1,NoOp(DIRECTDIAL voicemail)
exten => s-DIRECTDIAL,n,Macro(get-vmcontext,${ARG1})
exten =>
s-DIRECTDIAL,n,Voicemail(${ARG1}@${VMCONTEXT}|${VM_DDTYPE}${VMGAIN})
exten => s-DIRECTDIAL,n,Goto(exit-${VMSTATUS},1)
exten => _s-.,1,Macro(get-vmcontext,${ARG1})
exten => _s-.,n,Voicemail(${ARG1}@${VMCONTEXT}|u${VMGAIN}) ;
Voicemail Unavailable message
exten => _s-.,n,Goto(exit-${VMSTATUS},1)
exten => o,1,Background(one-moment-please) ; 0 during vm message
will hangup
exten => o,n,GotoIf($["foo${FROM_DID}" =
"foo"]?from-pstn,s,1:from-pstn,${FROM_DID},1)
exten => a,1,Macro(get-vmcontext,${ARG1})
exten => a,n,VoiceMailMain(${ARG1}@${VMCONTEXT})
exten => a,n,Hangup
exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured)
exten => exit-FAILED,n,Hangup()
exten => exit-SUCCESS,1,Playback(goodbye)
exten => exit-SUCCESS,n,Hangup()
exten => exit-USEREXIT,1,Playback(goodbye)
exten => exit-USEREXIT,n,Hangup()
exten => t,1,Hangup()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061106/1273f7fe/attachment.htm
More information about the asterisk-users
mailing list