Hello,
the transformation for avp has to be after the parenthesis around the name:
$(avp(x){...})
Anyhow, I would recommend to use s.select transformation to get the ip
bytes:
$var(i1) = $(si{s.select,0,.});
...
$var(i4) = $(si{s.select,4,.});
Then use this variables to compute the big int value.
Cheers,
Daniel
On 4/18/13 12:19 PM, Victor V. Kustov wrote:
Hi!
According "Transformations cookbook" exist string, uri, name
transformations. I think need ip transformations, simulary
atoi()/aton() and split for stings with divider.
By the way:
avp_subst("$avp(s:sipa)/$avp(s:abc)/g",
"/(.*)\.(.*)\.(.*)\.(.*)/\1/");
avp_subst("$avp(s:sipa)/$avp(s:def)/g",
"/(.*)\.(.*)\.(.*)\.(.*)/\2/");
avp_subst("$avp(s:sipa)/$avp(s:ghk)/g",
"/(.*)\.(.*)\.(.*)\.(.*)/\3/");
avp_subst("$avp(s:sipa)/$avp(s:xyz)/g",
"/(.*)\.(.*)\.(.*)\.(.*)/\4/");
$avp(s:numipa)=$avp(s:abc{s.int})<<24||$avp(s:defi{s.int})<<16||$avp(s:ghki{s.int})<<8||$avp(s:xyz{s.int});
where is error?
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
-
http://conference.kamailio.com -