<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>try one of the variants:</p>
<p> - relay to the fixed proxy, add a new branch and then suspend</p>
<p> - relay first to the fixed proxy, which will bounce back to
mobile proxy the branch for mobile device</p>
<p> - relay to fixed proxy and mobile proxy at the same time. When
coming from itself, mobile proxy will do async routing</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 18/08/16 19:25, Igor Potjevlesch
wrote:<br>
</div>
<blockquote
cite="mid:CAJmJ=jEFCM109eLQh-R0HnmQn0wvxR3bxNsU2HGywJO99GSzKw@mail.gmail.com"
type="cite">
<div dir="ltr">Hello list,
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>My code is:</div>
<div><br>
</div>
<div>Fix proxy:</div>
<div><br>
</div>
<div>if($tU==123456789){<br>
</div>
<div> add_diversion("forking");</div>
<div> append_branch(<a class="moz-txt-link-rfc2396E" href="sip:987654321@proxy_mobile">"sip:987654321@proxy_mobile"</a>);</div>
<div>}</div>
<div><br>
</div>
<div>Mobile proxy:<br>
<br>
<div>if($tU==987654321){<br>
</div>
<div> $var(z) = "1";</div>
<div> append_branch(<a class="moz-txt-link-rfc2396E" href="sip:123456789@proxy_fix">"sip:123456789@proxy_fix"</a>);</div>
<div>}<br>
<br>
<br>
route[INVITE]{</div>
<div><br>
if($dir == "forking"){<br>
</div>
</div>
<div> async_route("RELAY", "7");</div>
<div>}else if($var(z) == "1"){</div>
<div> async_route("RELAY", "7");</div>
<div>}else{</div>
<div> route(RELAY);</div>
<div> exit;</div>
<div>}</div>
<div><br>
</div>
<div>}</div>
<div><br>
</div>
<div><br>
</div>
<div>How can I differentiate in the second scenario when I call
the mobile phone to fork to the fix phone?</div>
<div><br>
</div>
<div>Thank you for your help.</div>
<div><br>
</div>
<div>Igor.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>