[OpenSIPS-Users] s.index madness and my waning grip on sanity
Jock McKechnie
jock.mckechnie at gmail.com
Fri Jan 27 12:26:01 EST 2017
Good morning all;
I'm having a battle with s.index that I'd really like to believe no
one should be waging, and I've come to the conclusion either 1.11 is
seriously broken, or I'm utterly deranged, but at the risk of
verifying the second, I wanted to reach out and figure out what I'm
doing wrong here.
I seem utterly incapable of getting s.index working at all, consider
the following:
$var(source) = "onetwothree";
$var(search) = "one";
$var(index) = $(var(source){s.index, $var(search), 0});
Which should look famaliar as it's based entirely on the example in
the 1.11 documentation. This produces the following:
ERROR:core:tr_parse_string: unknown transformation: index,
$var(search), 0}/index/5! ERROR:core:parse_transformation: error
parsing [{s.index, $var(search), 0}] ERROR:core:pv_parse_spec:
ERROR:bad tr in pvar name "var" ERROR:core:pv_parse_spec: invalid
parsing in [$(var(source){s.index, $var(search), 0})] at (4)
CRITICAL:core:yyerror: parse error in config file
/etc/opensips/opensips.cfg, line 92, column 166-206: unknown script
variable
Using a static search string:
$var(index) = $(var(source){s.index, "one", 0});
Garners me the same with:
ERROR:core:tr_parse_string: unknown transformation: index, "one", 0}/index/5!
And not providing a starting offset is similar:
$var(index) = $(var(source){s.index, $var(search)});
ERROR:core:tr_parse_string: unknown transformation: index,
$var(search)}/index/5!
Given these are core transformations and I'm using several others in
my configs I'm running under the belief I'm not missing a module. I've
tried copying the doc example verbatim with identical results. What am
I missing here, people? Is it just staring me straight in the face?
My thanks;
- Jock
More information about the Users
mailing list