[SR-Users] Call forking priority
Igor Potjevlesch
igor.potjevlesch at gmail.com
Wed Sep 28 17:49:50 CEST 2016
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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160928/0287118d/attachment.html>
More information about the sr-users
mailing list