Hello list,

I have a proxy that manage fix calls and a proxy that manage mobile calls. I want to implement call forking so when I call to a fix phone the call goes to the fix proxy and it forks to the mobile proxy who manage the call and viceversa. I want the fix to ring 2 or 3 times before the mobile.

In order to do so I relay first to the fixed proxy, which will bounce back to mobile proxy the branch for mobile device.

But now if I want to be able to choose which phone (mobile or fixe) rings before I have tried by doing the "async_route("RELAY", "7");" in the fixe proxy like in the mobile proxy but it doesn't work.

My code is:

Fix proxy:

if($rU==123456789){
   add_diversion("forking");
   $var(priority)=1;
   append_branch("sip:987654321@proxy_mobile");
}

route[INVITE]{

if($var(priority) == "1"){
   async_route("RELAY", "7");
}else{
   route(RELAY);
   exit;
}

Mobile proxy:

if($tU==987654321){
   $rU=123456789;
}


route[INVITE]{

if($dir == "forking"){
   async_route("RELAY", "7");
}else{
   route(RELAY);
   exit;
}

}

Thanks.