[Users] Call Forwarding using uac_redirect

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 24 11:46:40 CEST 2005


Hi Brandon,

get_redirects can be used only from failure_route since it process a 
negative (3xx) reply - see example:
    http://www.openser.org/docs/modules/0.10.x/uac_redirect.html#AEN247

the function fetch the contacts from 3xx and adds them as branches to 
the transaction. Once set as branches, the URIs can not be altered 
anymore - so you cannot change the contact between "get_redirects"  and 
"t_relay".

regards,
bogdan

Brandon Price wrote:

> I am trying to implement call forwarding using the uac_redirect 
> module. My user agents reply with a SIP 302 Moved Temporarily message 
> when the unconditional call forward is set. In the contact field there 
> is something like this...
>
> Contact Binding: <sip:13143212222 at ser1.manhattan.sipnetwork.net 
> <mailto:13143212222 at ser1.manhattan.vtnoc.net>>
>
> I need ser to add a plus to that then send the call back out to our 
> pstn carrier. 
> I have tried this...
>         
>     if  (t_check_status("302"))
>         get_redirects("6:2","redirect");
>         prefix("+");
>         rewritehost("pstn.carriers.ip");
>         t_relay();
> and putting it in a failure route then forcing that route
>
> failure_route[2] {
>         get_redirects("6:2","redirect");
>         prefix("+");
>         rewritehost("our.pstn.carriers.ip");
>         t_relay();
>
> I even tried
>
> if               (t_check_status("302")){ # what to do if device tells 
> us to forward to another number
>                  add_diversion("user-forward");
>                  get_redirects("6:2","redirect");
>                  prefix("+");
>                  rewritehost("our.pstn.carriers.ip");
>                  t_relay();
> but apparently get_redirects can only be used in a failure_route
>
> Has anyone been able to get this working? On a 302 get the redirects 
> from the contact field using get_redirects append with a "+" and 
> rewritehost somewhere else it seemed so simple.
> Any help is as always greatly appreciated, especially 
> from daniel at voice-system.ro <mailto:daniel at voice-system.ro> cause like 
> me he's too far for norway beer. 
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>  
>





More information about the Users mailing list