[OpenSIPS-Users] rewritehost() and AVP

Anton Zagorskiy a.zagorskiy at oyster-telecom.ru
Thu Nov 18 10:38:21 CET 2010


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.zagorskiy at oyster-telecom.ru
www.oyster-telecom.ru



> -----Original Message-----
> From: users-bounces at lists.opensips.org [mailto:users-
> bounces at 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.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
> >
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list