Issues with Set from DB values containing the | character


Version: on Gentoo linux (2.6.16-r7)

What I am trying to achieve is to store a Time Expression in the database. This time expression is for use in a GotoIfTime command. The database would contain the following.

The in my extension I would like to do the following

exten => s,1,Set(line=${ARG1})
exten => s,2,Set(vmailTimes=${DB(x${line}/vmailTimes)})
exten => s,3,GotoIf($["${vmailTimes}" = ""]?999999)

exten => s,4,GotoIfTime(${vmailTimes}?s,1000)
; Macro exits here

exten => s,1000,VoiceMail(${line})
exten => s,1001,Hangup

exten => s,999999,NoOp
; Macro exits here

Unfortunatley the Set command is treating the | character in the value as a separator for multiple values so fails after 8:00-18:00. I tried quoting the ${DB portion in ’ & " and neither worked as I would expect.

Is there a way to force the parser to treat the result returned from the DB call as a single string or a way to escape the | ?