Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Escape characters or replace function


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
dg at online-business.ro
Guest





PostPosted: Mon May 12, 2008 1:36 am    Post subject: [asterisk-users] Escape characters or replace function Reply with quote

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
Back to top
tilghman at mail.jeffa...
Guest





PostPosted: Mon May 12, 2008 6:55 am    Post subject: [asterisk-users] Escape characters or replace function Reply with quote

On Monday 12 May 2008 01:36:04 Daniel Grad wrote:
Quote:
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

Use ${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
Back to top
dg at online-business.ro
Guest





PostPosted: Mon May 12, 2008 7:11 am    Post subject: [asterisk-users] Escape characters or replace function Reply with quote

Tilghman Lesher wrote:
Quote:
On Monday 12 May 2008 01:36:04 Daniel Grad wrote:

Quote:
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


Use ${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.

Found STRFTIME just after I posted the message.
I tried ${STRFTIME(${EPOCH}, %d%m%Y-%H\:%M\:%S)} but it returned an
empty string (I wanted to get the same output as DATETIME but with
escaped colons. What would have been the correct syntax? I finally used
just ${EPOCH} instead, but I'm curious how I could have escaped the colons.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080512/1841fe67/attachment.htm
-------------- 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/1841fe67/attachment.bin
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services