[asterisk-users] Call Recording Questions

Sebastian shop at open-t.co.uk
Wed Sep 15 15:37:27 CDT 2010


Hi,

On 09/15/2010 09:02 PM, Dan Journo wrote:
> Hi,
>
> I'm using the CallTime and a few other variables to name a recording so that I can then take the wav file name and see when it was recorded, and what the recording contains.
>
> However, since ${CDR(start)} contains a space in part of the date, the filename becomes corrupted when I use samba and share the file over a network.
> Therefore I need to replace the spaces with another valid character.
>
> Any ideas how I can do this (simply)?
>
> Here is the macro that i'm using to trigger call recording when the user presses *1.
>
> [macro-mixmon]
> exten =>  s,1,GotoIf($["${XAD}" = "0" | "${XAD}" = ""]?startrec:donothing)
> exten =>  s,n(startrec),Playback(beep)
> exten =>  s,n,Set(XAD=1)
> exten =>  s,n,MixMonitor(/var/lib/asterisk/clientsounds/${CDR(start)}~${CALLFROM}~${CDR(channel):4}.wav,b)

Are you sure it is the space which is corrupting it? The space is not 
incompatible with either Samba or Linux filesystem. However, is the "~" 
character part of the filename you are creating? If it is, that is 
definitely an illegal/reserved character in the Linux file systems.

Sebastian

> exten =>  s,n(donothing),MacroExit
>
> Thanks
> Dan
>



More information about the asterisk-users mailing list