[OpenSIPS-Users] rewritehost() and AVP

Ovidiu Sas osas at voipembedded.com
Wed Nov 17 17:35:26 CET 2010


Deal with the host and port via PVs:
http://www.opensips.org/Resources/DocsCoreVar16#toc59
http://www.opensips.org/Resources/DocsCoreVar16#toc64


Regards,
Ovidiu Sas

On Wed, Nov 17, 2010 at 10:58 AM, Anton Zagorskiy
<a.zagorskiy at oyster-telecom.ru> wrote:
> 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:1001@$avp(i:50>(21) /<sip:1001@$avp(i:50)> (22)
> ERROR:core:parse_sip_msg_uri: bad uri <sip:1001@$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
> a.zagorskiy at oyster-telecom.ru
> www.oyster-telecom.ru
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list