[Kamailio-Users] nested redirect

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 16 11:10:24 CEST 2008


Hello,

can you post here the SIP messages? Will help to spot if there is 
anything wrong with the ACK or something else in the signaling.

Cheers,
Daniel


On 09/13/08 04:11, kentp at globalpops.com wrote:
> i have a simple redirect server working:
>
> Call comes from switch (A) to kamailio redirect server (B)..
> (B) runs perl script to determine route
> (B) sends Stateless 300 redirect reply to (A). 
> (A) sends ACK to (B). 
>
> Now, I need to add a nested redirect... 
>
> call comes from sitch (A) to kamailio redirect server (B)..
> (B) then needs to send the call to third party proxy (C).. 
> (C) will return 302 redirect..
> (B) sends ACK to (C)
> (B) needs to read the contact header, then run perl script to determine route (using the contact value 
> returned from (c))
> (B) then sends 300 redirect back to (A).
> (A) sends ACK back to (B)
>
>
> so far i have been trying something like this, but the final (A) ACK gets ignored and (B) keeps sending 
> multiple 300's to (A):
>
> route {
> 	route(1);
> }
>
> route[1] {
> 		t_on_reply("1");
> 		t_on_failure("2");
> 		if (!t_relay("proxy.server.c:5060","0x02")) {
> 		                sl_reply_error();
>         	}
> onreply_route[1] {
>         if(t_check_status("302")){
>                 $var(lrn_from_bv) = $ct;
>         }
> }
> failure_route[2] {
>         
>         if (t_check_status("3[0-9][0-9]")) {
>                 route(2);
>                 exit;
>         }
> route[2] {
> 	        if(perl_exec("callcheck")){
> 	                avp_pushto("$ru", "$avp(s:routes)/g");
> 	                t_reply("300","Go Here");
> 	                exit;
>         	}
>         }
>         
>   
>
>
> _______________________________________________
> Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list