[asterisk-users] Double quotes in CDRUserField?
Michael Collins
mcollins at fcnetwork.com
Tue Jan 2 23:23:30 MST 2007
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> bounces at lists.digium.com] On Behalf Of Trevor Peirce
> Sent: Tuesday, January 02, 2007 5:57 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Double quotes in CDRUserField?
>
> 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
Under the circumstances I think that is the easiest thing to do. I can
do some minor shell scripting to handle the parsing of the userfield.
Thanks for the suggestion.
-MC
More information about the asterisk-users
mailing list