Hello, I need to use the ${DATETIME} macro inside the filename saved by Record, but the colons (':') used in the time interfere with the command (everything after the colon is interpreted as the format I wish to save to): My command is: Record(/path/to/voicemail/${EXTEN}-${DATETIME}-${UNIQUEID}:wav) I need some function to escape the colons inside DATETIME... I'm sure it's something really basic, but I couldn't find it Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3331 bytes Desc: S/MIME Cryptographic Signature Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080512/cfcdf5a7/attachment.bin
Tilghman Lesher
2008-May-12 11:55 UTC
[asterisk-users] Escape characters or replace function
On Monday 12 May 2008 01:36:04 Daniel Grad wrote:> I need to use the ${DATETIME} macro inside the filename saved by Record, > but the colons (':') used in the time interfere with the command > (everything after the colon is interpreted as the format I wish to save > to): > > My command is: > Record(/path/to/voicemail/${EXTEN}-${DATETIME}-${UNIQUEID}:wav) > > I need some function to escape the colons inside DATETIME... I'm sure > it's something really basic, but I couldn't find itUse ${STRFTIME()} instead to get the format that you want and do not include colons in the format. "core show function STRFTIME" should give you the details on this dialplan function. -- Tilghman