Question: I'm trying to put a double quote into the CDRUserField. What I end up with is a pair of double quotes. Example: exten => s,n,SetCDRUserField(data) exten => s,n,AppendCDRUserField(") exten => s,n,AppendCDRUserField(moredata) My record will look like this: data""moredata What I want is: data"moredata The wiki mentions using a backslash in order to 'quote the character' as it says. However, this example: exten => s,n,SetCDRUserField(data) exten => s,n,AppendCDRUserField(\") exten => s,n,AppendCDRUserField(moredata) Yields the same results: data""moredata Is there something that I'm missing? Thanks, MC P.S. I'm using CSV for my CDR's
Michael Collins wrote:> Question: I'm trying to put a double quote into the CDRUserField. What > I end up with is a pair of double quotes. Example: > exten => s,n,SetCDRUserField(data) > exten => s,n,AppendCDRUserField(") > exten => s,n,AppendCDRUserField(moredata) > > > My record will look like this: > data""moredata >It's common for CSV files to escape quotes by putting two of them to indicate it is a quote within the string, not the end of the string. Perhaps you could accomplish what you're going for with something else, say an underscore character? Regards, Trevor Peirce
Possibly Parallel Threads
- SetCDRUserField not working in A@H?
- Asterisk 1.0.9-BRIstuffed-0.2.0-RC8o memory leak when using call files ?
- Warning: "Channel does not have a CDR" when doing ForkCDR
- RESOLUTION: SetCDRUserField not working in A@H?
- Asterisk does not bridge zap channels on outgoing calls