[asterisk-dev] ast_config and character escaping

Tilghman Lesher tlesher at digium.com
Tue Sep 7 14:48:19 CDT 2010


On Tuesday 07 September 2010 12:58:45 Alexander wrote:
>   07.09.2010 18:30, Tilghman Lesher wrote:
> > On Tuesday 07 September 2010 01:30:02 st41ker wrote:
> >> I'm using ast_variable_browse to retrieve variables from some text
> >> config file.
> >> I need to load variables containing regexp values, but it seems like
> >> something is breaking them.
> >>
> >> Sample variable from config file:
> >>
> >> ^1(.*)=(.*)/09\&
> >>
> >> In the output ast_variable I'm getting escaped ('\\&') value.
> >>
> >> When I use:
> >>
> >> ^1(.*)=(.*)/09\1
> >>
> >> everything is fine.
> >>
> >> I've looked almost everywhere in the related code and found nothing that
> >> can help in resolving the issue.
> >> Please, could someone direct me in the right way?
> >
> > Much of this behavior is going to change, depending upon what version of
> > Asterisk you're using.  Especially in 1.4 and earlier versions, escaping
> > was removed at the point of load.  What version of the API are you using?
>
> Currently I'm using * 1.6.11.
> If it was removed then the "problem" could be in ast_copy_string or in
> any of the string field functions.
> But there is nothing similar to escaping.

There's no such thing as Asterisk 1.6.11.  There is a 1.6.1.11, a 1.6.1.1, and
a 1.6.2.11.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list