you should remove t_relay_to_udp, as well as the break and make sure that on return to failure_route you don't run more commands.
g-)

Shaun Hofer wrote:
I tried making route just to house the commands, I call for both:
route[7] {
	revert_uri();
	rewritehostport("202.168.41.218:5060");
	append_branch();
 	t_relay_to_udp("202.168.41.218", "5060");
	break;
}

When I did this I found that it wouldn't work properly. I did play around with 
putting something like use_mediaproxy and calling other routes but seemed 
like they failed to be called correctly.  I'm thinking either I mediaproxy 
all traffic before from the start or let rtp travel directly between UA and 
Asterisk.

On Wednesday 31 January 2007 18:21, you wrote:
  
You could create a route and then call the route from failure_route. 
However, I'm not sure if that will work as the INVITE was already sent 
to the UA not responding. But try.
g-)

Shaun Hofer wrote:
    
Hi,

I wish to forward busy and no answer calls to Asterisk, and have the RTP 
stream go through mediaproxy. At the moment, some calls use mediaproxy and 
some don't. If the call is not using mediaproxy to get it too. I have 
      
noticed 
  
that I can't call use_media_proxy() from failed route. I don't want to use 
mediaproxy for every call between UA's, if not needed. Any suggestions on 
      
how 
  
I might be able to get calls to use mediaproxy if forwarded ?

current fail route:

failure_route[1] {
        if (t_check_status("487")) {
                break;
        };
        if (isflagset(26) && t_check_status("486")) {
                avp_delete("s:fwdbusy");
                resetflag(26);
                revert_uri();
                rewritehostport("202.168.41.218:5060");
                append_branch();
                t_relay_to_udp("202.168.41.218", "5060");
                break;
        };
        if (isflagset(27) && t_check_status("408")) {
                avp_delete("s:fwdnoanswer");
                resetflag(27);
 		revert_uri();
                rewritehostport("202.168.41.218:5060");
                append_branch();
                t_relay_to_udp("202.168.41.218", "5060");
                break;
	};
        end_media_session();
}


Thanks