Hi,
did you install it from source? If yes, you can simply add the
"BRANCH_ROUTE" to allowed routes in OpenSER 1.3, that should work, i
used it that way many years ago... (i think you need to change the
module another place too).
I strongly recommend you update your OpenSER to a more recent
Kamailio, then you won't have that problem at all.
Kind regards,
Carsten
2012/3/23 Robert R <rob1485(a)gmail.com>om>:
Hi,
Even though when I try to use "uac_replace_from( )" in branch_route block I
get the same error message:
branch_route[2]
{
if ( $avp(i:204) )
{
uac_replace_from("hello");
}
}
error message:
Not starting openser: invalid configuration file!
Mar 23 09:03:00 [7542] CRITICAL:core:yyerror: parse error in config file,
line 623, column 26-27: Command cannot be used in the block
Mar 23 09:03:00 [7542] ERROR:core:main: bad config file (1 errors)
PS: I am running an old release of openser 1.3.
Thanks,
R
On Thu, Mar 22, 2012 at 1:23 PM, Daniel-Constantin Mierla
<miconda(a)gmail.com> wrote:
On 3/22/12 6:12 PM, Alex Balashov wrote:
On 03/22/2012 01:00 PM, Robert R wrote:
When I am trying to modify FROM field in the
"failure_route" block I
get an error message:
failure_route[1]
{
...
uac_replace_from("$avp(i:204)");
append_branch();
t_relay();
}
Not starting openser: invalid configuration file!
Mar 22 10:51:39 [6457] CRITICAL:core:yyerror: parse error in config
file, line 662, column 32-33: Command cannot be used in the block
Mar 22 10:51:39 [6457] ERROR:core:main: bad config file (1 errors)
You can probably get around it this way:
failure_route[1]
{
...
append_branch();
route(STUFF);
t_relay();
}
route[STUFF]
{
uac_replace_from(...);
}
indeed this should work -- it is no reason of not being usable in
failure_route, perhaps is so from the time of development. The function
itself is allowed in branch_route which is called from inside t_relay()
(when t_on_branch(...) is used), therefore we can relax the restriction for
failure_route, imo.
One thing to take care of, if you use uac_replace_from() in request route
and then in failure route, you may end in malformed format, so it is
recommended to use it in branch_route, then the changes done by the function
will be per each forwarded branch.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Carsten Bock
CEO (Geschäftsführer)
ng-voice GmbH
Schomburgstr. 80
D-22767 Hamburg / Germany
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Mobile +49 179 2021244
Office +49 40 34927219
Fax +49 40 34927220
Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/
--
Meet ng-voice at LinuxTag 2012 in Berlin - May 23rd - 26th, 2012. Save the
date!