[Serusers] ser and asterisk and rtpproxy

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Fri Jul 2 14:08:44 CEST 2004


On Jul 01, 2004 at 23:15, Aldo Armiento <aldo at armiento.com> wrote:
> Hi all!
> I know the argument is very famouse, I think I have read all ser.cfg on 
> the net....
> The problem is that when I call extension 9916 I don't hear asterisk 
> music-on-old sound...
> 
> 
[...]
> 
>        if (uri=~"sip:9916@")
>        {
>                log("\n\nLOG: 9916 - Asterisk - Test()\n\n");
>       
>                force_rtp_proxy();

With this setup you won't catch the reply. So the reply won't be
modified and you UA will try to send media directly to asterisk.
Set a t_on_reply route (e.g. t_on_reply("5")) and on the onreply route
 if the reply status is 183 or 2xx force_rtp_proxy on it.

A nicer way would be to do the nat test at the beginning of the cfg,
 set a flag if a request was nated, and also an onreply route.
 In the rest of the cfg you can check only for the flag.

>                t_relay_to_udp("xxx.xxx.xxx.xxx","5090");
>                break;
>        }
> 

Andrei




More information about the sr-users mailing list