Hi all,
I've been banging my head on the table with this one and hoping someone has some insight here.
I'm trying to use a variable as the host & port input in t_relay() - t_relay(host, port)

This works fine if statically set:
t_relay("10.0.1.1", "5060");

But if I change the host or the port to a variable like this:
$avp(destip) = "10.0.1.1";
$avp(dstport) = "5060";
t_relay($avp(destip), $avp(dstport));

Then Kamailio fails to start, calling out the t_relay line:
kamailio: CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /etc/kamailio/kamailio-routelogic.cfg, line 62, column 35: bad command

I get the same behavior with pseudovariables and vars as well:
$var(destip) = "10.0.1.1";
$var(dstport) = "5060";
t_relay($var(destip), $var(dstport))

Any tips or pointers would be much appreciated.
Thanks!

Nick