[SR-Users] ser avp question
Daniel-Constantin Mierla
miconda at gmail.com
Mon Mar 29 15:25:02 CEST 2010
On 3/29/10 3:22 PM, Juha Heinanen wrote:
> modules_s/domain domain_lookup() function can be used to assign domain
> attributes to avps.
>
> for example, lookup_domain("$fd", "foo.bar"), assigns attributes of
> domain foo.bar to avps $fd.x, where x is name of attribute.
>
> my question is, how can i index these avps if there is more than one
> with the same name?
>
> statement
>
> $var(attr) = $fd.attr[];
>
> does not give syntax errors, but
>
> $var(attr) = $fd.attr[$var(i)];
>
using PV style should work:
$var(attr) = $(avp(fd.attr[$var(i)]);
Cheers,
Daniel
> produces
>
> 0(7368) :<core> [cfg.y:3379]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 3174, column 24-30: syntax error
> 0(7368) :<core> [cfg.y:3379]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 3174, column 24-30: bad command
> 0(7368) :<core> [cfg.y:3382]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 3174, column 31: bad command
> 0(7368) :<core> [cfg.y:3382]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 3174, column 31: bad command
>
> -- juha
>
> _______________________________________________
> sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
--
Daniel-Constantin Mierla * http://www.asipto.com/ *
http://twitter.com/miconda *
http://www.linkedin.com/in/danielconstantinmierla
More information about the sr-users
mailing list