[Users] Call Forwarding using uac_redirect

Brandon Price brandon.price at hostrocket.com
Fri Oct 21 19:53:08 CEST 2005


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>

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 cause like me he's too far for norway beer.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20051021/5164dd81/attachment.htm 


More information about the Users mailing list