[asterisk-users] How to record a call in a single file when transfered...
Leif Madsen
leif.madsen at asteriskdocs.org
Tue Apr 20 20:07:48 CDT 2010
Carlos Chavez wrote:
> On Tue, 2010-04-20 at 15:04 -0400, Leif Madsen wrote:
>> Carlos Chavez wrote:
>>> I have a customer that needs to record all calls coming in and out.
>>> The problem I am having is when a call comes in to the operator and it
>>> is transferred to another extension. The first mixmonitor begins
>>> recording when the operator picks up but the recording stops when the
>>> call is transferred. I need to have a single recording for the
>>> complete call no matter how many times it is transferred. Any tips?
>> See AUDIOHOOK_INHERIT() dialplan function.
>>
> Thank you for that. I am having trouble trying to implement this.
> Since my macro-stdexten begins with:
>
> exten => s,1,Mixmonitor(${UNIQUEID}.wav,b)
>
> I need some logic to prevent a name change of the file. How can I know
> if the call is already being recorded because it is a transfer or if I
> need to start recording for a new call? It seems that I cannot read the
> value of ${AUDIOHOOK_INHERIT(MixMonitor)} to determine if it has already
> been set so what other variable can I test?
You could set an inherited channel variable as the first thing you do before
calling MixMonitor(). Something like:
exten => s,1,Verbose(2,Starting Call Recording) ; I always start my first
priority with something innocuous
exten => s,n,GotoIf($[${EXISTS(${CALL_RECORDED})}]?skip_rec_start)
exten => s,n,Set(__CALL_RECORDED=1)
exten => s,n,MixMonitor(${UNIQUEID}.wav,b)
exten => s,n(skip_rec_start),Verbose(2,Call recording already enabled)
exten => s,n,...
Something like that may work.
Leif.
More information about the asterisk-users
mailing list