Hi Inaki,

I'm getting the below error when using t_relay(); in onreply_route[7]....Maybe i need to you something else?

Mar 13 13:11:03 [27785] DBG:core:find_cmd_export_t: <t_relay> not found
Mar 13 13:11:03 [27785] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 13 13:11:03 [27785] CRITICAL:core:yyerror: parse error in config file, line 728, column 9-10: Command cannot be used in the block


Regards



On Fri, Mar 13, 2009 at 1:15 PM, Iņaki Baz Castillo <ibc@aliax.net> wrote:
2009/3/13 michel freiha <michofr@gmail.com>:
> Dear Inaki,
>
> Thenaks agian for your responses and care...I did what you asked to
> do...Just have a look please to the below:

It's wrong:


> if(loose_route()){
>
> t_on_reply("7");
> if (is_method("INVITE")) {
>
> t_on_failure("1");
> t_on_reply("6");
       ^^^
This t_on_reply("6") is overriding the previous t_on_reply("7").

> force_rtp_proxy();
> t_relay();
>
> }
> }
>
> And the onreply_route(7) will be:
>
> onreply_route[7] {
>
>
> if (status=~"200"){
> t_on_failure("1");
> t_on_reply("6");
   ^^^
You cannot use t_on_reply and t_on_failure in a onreply_route block.

> force_rtp_proxy();
> t_relay();
>
> }
> exit;
> }




--
Iņaki Baz Castillo
<ibc@aliax.net>