[Users] 302 Redirect behavior

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Nov 17 10:14:23 CET 2005

Hi Brandon,

the important thing to know if that in failure route t_relay() uses as 
new destination the branches and not the RURI (which was already used in 
first relay).

the problem is get_redirects adds the new destinations as new branches - 
these branches, once added are not accessible/modifiable any more; 
rewritehost() affects the RURI :(.

you can try to relay directly to your GW like:
hopefully the GW will accept the RURI.


Brandon Price wrote:

> I am trying to use the uac_redirect module to duplicate the behavior  
> that asterisk performs when it receives a 302-Moved Temporarily from  
> a registered user agent. It basically extracts the number to forward  
> to from the SIP contact address in the 302 reply. For example if "sip: 
> 13143212222 at ser1.voipnoc.net" is the sip contact address then  
> 13143212222 is the number (of coarse). It then executes whatever code  
> matches that pattern. This works perfectly for me but ends up making  
> 2 calls because I get the invite, I send it to the UA, and then I do  
> another dial if there is a forward. That of coarse costs me twice as  
> much.
> I have tried...
> if(t_check_status("302")){ # what to do if device tells us to forward  
> to another number
>                 xlog("A redirect");
>                 get_redirects("*","redirect");
>                 rewritehost("our.pstn.gw.ip");
>                 t_relay();
>                 return;
> I simply need it to get the number to redirect to from the contact  
> portion and forward the invite to that number @ our pstn gateway. Any  
> help greatly appreciated.
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users

More information about the Users mailing list