[OpenSIPS-Users] Force rtp proxy

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Feb 27 12:34:05 CET 2009


Hi michel,

Should do something like:

if(!cr_route("default", "0", "$rU", "$rU", "call_id")){
      sl_send_reply("403", "Not allowed");
    } else {
        # In cas of failure, re-route the request
         t_on_failure("1");
         t_on_reply("1");
         force_rtp_proxy();
         t_relay();
}


onreply_route[1] {
    if (t_check_status("2[0-9][0-9]")) {
          force_rtp_proxy();
    }
}

See : http://www.opensips.org/index.php?n=Resources.DocsCoreRoutes#toc4

Regards,
Bogdan

michel freiha wrote:
> Dear Bogdan,
>
> Do you mean doing something like that?
>
> if(!cr_route("default", "0", "$rU", "$rU", "call_id")){
>        sl_send_reply("403", "Not allowed");
>      } else {
>          # In cas of failure, re-route the request
>           t_on_failure("1");
>
> force_rtp_proxy();
>           t_relay();
> route(2) ;
> }
>
>
> Please let me know how can I force it on route2 for the 200OK reply
>
> Thanks Bogdan
>
>
> On Fri, Feb 27, 2009 at 11:54 AM, Bogdan-Andrei Iancu 
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi Michel,
>
>     You have to call twice force_rtp_proxy() in order to complete the
>     RTP session (and have RTP flowing). First for the INVITE (as you
>     already do) and second for the 200 OK reply.
>
>     So install a onreply_route and if the reply is 200 OK, call again
>     force_rtp_proxy.
>
>     Regards,
>     Bogdan
>
>     michel freiha wrote:
>
>         Dear All,
>
>         I need to make all my rtp traffic through OpenSips to pass
>         through rtp proxy...I have the following route:
>
>
>         if(!cr_route("default", "0", "$rU", "$rU", "call_id")){
>               sl_send_reply("403", "Not allowed");
>             } else {
>                 # In cas of failure, re-route the request
>                  t_on_failure("1");
>         force_rtp_proxy();
>                  t_relay();
>           }
>         The call is working fine but with no audio...How can i fix
>         this issue in order to have 2 way audio through rtpproxy?
>
>         Regards
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         Users mailing list
>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>          
>
>
>




More information about the Users mailing list