Hello.
How to pass a value to the rewritehost() function using AVP?

1. Code
$avp(i:50) = "192.168.0.01";
rewritehostport("$avp(i:50)");
route(1)

raises errors:
ERROR:core:parse_uri: bad port in uri (error at char ) in state 8) parsed:
<sip:1...@$avp(i:50>(21) /<sip:1...@$avp(i:50)> (22)
ERROR:core:parse_sip_msg_uri: bad uri <sip:1...@$avp(i:50)>

2. Code
$avp(i:50) = "192.168.0.01";
rewritehostport($avp(i:50)); # Without qoutes
route(1)

raises errors during stratup:
CRITICAL:core:yyerror: parse error in config file, line 747, column 28-38:
syntax error
CRITICAL:core:yyerror: parse error in config file, line 747, column 38-39:
bad argument, string expected



WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
[email protected]
www.oyster-telecom.ru





_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to