Hi Anton,

Not all functions accept avp's as arguments - rewritehost doesn't accept them because this has not been implemented :).

Regards,

--
Anca Vamanu
www.voice-system.ro



On 11/18/2010 11:38 AM, Anton Zagorskiy wrote:
Thanks, this is work.

Can you explain why rewritehost() doesn't accept AVP? Where AVP doesn't work
too?






WBR, Anton Zagorskiy
VoIP Developer, Oyster Telecom
Phone.: +7 812 601-0666
Fax: +7 812 601-0593
a.zagors...@oyster-telecom.ru
www.oyster-telecom.ru



-----Original Message-----
From: users-boun...@lists.opensips.org [mailto:users-
boun...@lists.opensips.org] On Behalf Of Ovidiu Sas
Sent: Wednesday, November 17, 2010 7:35 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] rewritehost() and AVP

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.zagors...@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: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
a.zagors...@oyster-telecom.ru
www.oyster-telecom.ru





_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/user

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to