<div dir="ltr">Hello,<div><br></div><div>Thank you very much Daniel, I think that the second option is the most simple one, i am going to try it.</div><div><br></div><div>Thanks!</div><div><br></div><div>Igor.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-19 9:24 GMT+02:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div 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><div><div class="h5">
    <br>
    <div>On 18/08/16 19:25, Igor Potjevlesch
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <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>"sip:987654321@<wbr>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>"sip:123456789@<wbr>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></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/<wbr>miconda</a></pre>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>