Hello Daniel, The second option worked:
- 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. 2016-08-19 11:49 GMT+02:00 Igor Potjevlesch <igor.potjevle...@gmail.com>: > Hello, > > Thank you very much Daniel, I think that the second option is the most > simple one, i am going to try it. > > Thanks! > > Igor. > > 2016-08-19 9:24 GMT+02:00 Daniel-Constantin Mierla <mico...@gmail.com>: > >> Hello, >> >> try one of the variants: >> >> - relay to the fixed proxy, add a new branch and then suspend >> >> - relay first to the fixed proxy, which will bounce back to mobile >> proxy the branch for mobile device >> >> - relay to fixed proxy and mobile proxy at the same time. When coming >> from itself, mobile proxy will do async routing >> >> Cheers, >> Daniel >> >> On 18/08/16 19:25, Igor Potjevlesch wrote: >> >> 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 in my fix proxy I added a diversion field with the >> reason "forking" and in my mobile proxy I check if the reason is "forking" >> to wait with the fonction "async_route" from the ASYNC module. When I call >> the fix I can fork to the mobile with delay without any problem because in >> that case my fix proxy manage one call and my mobile proxy the other one. >> >> But when I call the mobile the call doesn't even get to my fix proxy >> because my mobile proxy has to make the original call to wait while he is >> forking the fix call to my other proxy. And i think that calling the >> async_route fonction makes both calls to wait. >> >> My code is: >> >> Fix proxy: >> >> if($tU==123456789){ >> add_diversion("forking"); >> append_branch("sip:987654321@proxy_mobile"); >> } >> >> Mobile proxy: >> >> if($tU==987654321){ >> $var(z) = "1"; >> append_branch("sip:123456789@proxy_fix"); >> } >> >> >> route[INVITE]{ >> >> if($dir == "forking"){ >> async_route("RELAY", "7"); >> }else if($var(z) == "1"){ >> async_route("RELAY", "7"); >> }else{ >> route(RELAY); >> exit; >> } >> >> } >> >> >> How can I differentiate in the second scenario when I call the mobile >> phone to fork to the fix phone? >> >> Thank you for your help. >> >> Igor. >> >> >> _______________________________________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing >> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >> >> >> -- >> Daniel-Constantin Mierlahttp://www.asipto.com - >> http://www.kamailio.orghttp://twitter.com/#!/miconda - >> http://www.linkedin.com/in/miconda >> >> >> _______________________________________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >> sr-users@lists.sip-router.org >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >> >> >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users