<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Srigo,<br>
      <br>
      I checked the output, but I see no messages/logs from the
      event_routing module. Maybe I got it wrong :( ?<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
  <a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
    <div class="moz-cite-prefix">On 10/22/2018 03:31 PM, Srigo
      Kanapathipillai wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:5397aaf4-f09f-42d5-96e0-849dccf1a3a7@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="auto">Hi Bogdan,<br>
        <br>
      </div>
      <div dir="auto">Any updates regarding this issue?<br>
        <br>
      </div>
      <div dir="auto">Thanks<br>
      </div>
      <div dir="auto"><!-- tmjah_g_1299s -->Srigo Kana<!-- tmjah_g_1299e --></div>
      <div class="gmail_quote">On 8 Oct 2018, at 16:58, KSrigo <<a
          href="mailto:ksrigo@gmail.com" target="_blank"
          moz-do-not-send="true">ksrigo@gmail.com</a>> wrote:
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div class=""> Hi Bogdan,
          </div>
          <div class=""> <br class="">
          </div>
          <div class=""> - Yes calls to fs and Bob, fs and Charlie are 2
            differents calls (different from-tag/call-id). 
          </div>
          <div class=""> - Yes EBR is done on each fs leg.
          </div>
          <div class=""> <br class="">
          </div>
          <div class=""> Yes for some reason when David takes the call,
            Opensips send an Invite to David and Cancel one of fs leg
            (which is the normal behavior) but then it send again an
            invite to David and Cancel it.
          </div>
          <div class="">  
          </div>
          <div class=""> here is debug log:  <a
              href="https://pastebin.com/48xqKi3Y" class=""
              moz-do-not-send="true">https://pastebin.com/48xqKi3Y</a>
          </div>
          <div class=""> <br class="">
          </div>
          <div class=""> <br class="">
          </div>
          <div class=""> Thanks in advance 
          </div>
          <div class=""> Srigo
          </div>
          <br class="">
          <div>
            <blockquote type="cite" class="">
              <div class=""> On Oct 5, 2018, at 6:08 PM, Bogdan-Andrei
                Iancu < <a href="mailto:bogdan@opensips.org"
                  class="" moz-do-not-send="true">bogdan@opensips.org</a>>
                wrote: </div>
              <br class="Apple-interchange-newline">
              <div class=""> Hi Srigo, <br class="">
                <br class="">
                So, the calls between FS and Bob/Charlie are 2 different
                SIP calls, right ? and you do EBR on each of them (on
                the OpenSIPS with usrloc, rigth ? <br class="">
                <br class="">
                As I understand from your description, the faulty step
                is the last one when David takes a CANCEL too, right ?
                Do you have pcaps + debug logs for this scenario ? <br
                  class="">
                <br class="">
                Regards, <br class="">
                <br class="">
                Bogdan-Andrei Iancu <br class="">
                <br class="">
                OpenSIPS Founder and Developer <br class="">
                  <a href="http://www.opensips-solutions.com" class=""
                  moz-do-not-send="true">http://www.opensips-solutions.com</a>
                <br class="">
                OpenSIPS Bootcamp 2018 <br class="">
                  <a
                  href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/"
                  class="" moz-do-not-send="true">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
                <br class="">
                <br class="">
                On 10/05/2018 12:40 PM, KSrigo wrote: <br class="">
                <blockquote type="cite" class=""> Hi, <br class="">
                  <br class="">
                  I'm currently trying to add call pickup feature using
                  event_routing module. It seems to work fine when I
                  have only ONE inbound call to a given call group but
                  when I have two calls to the same call group at the
                  same, It's not working properly <br class="">
                  <br class="">
                  Here is my scenario: <br class="">
                  <br class="">
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>-->
                  Opensips1 (usr_loc) --> Bob <br class="">
                  Alice --> Opensips1 --> Freeswitch (fork) <br
                    class="">
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>
                  <span class="Apple-tab-span" style="white-space:pre"> </span>-->
                  Opensips1 (usr_loc) --> Charlie <br class="">
                  <br class="">
                  David tries to pickup the phone ringing on Bob and
                  Call (which is the same call because it's a fork but
                  different A leg call_id) <br class="">
                  Bob, Charlie and David are in the same pickup group. <br
                    class="">
                  <br class="">
                  When Bob and Charlies ring, David dials *0 to pick the
                  call: <br class="">
                  <span class="Apple-tab-span" style="white-space:pre"> </span>*
                  Opensips immediately send an Invite to David for one
                  of the incoming call (randomly choosen). Let's say for
                  Bob <br class="">
                  <span class="Apple-tab-span" style="white-space:pre"> </span>*
                  Opensips send a Cancel to Bob <br class="">
                  <span class="Apple-tab-span" style="white-space:pre"> </span>*
                  Opensips send again the previous Invite to David (for
                  the same A leg) <br class="">
                  <span class="Apple-tab-span" style="white-space:pre"> </span>*
                  Opensips send a Cancel to David <br class="">
                  <br class="">
                  <br class="">
                  Here is my opensips code: <br class="">
                  <br class="">
                      dp_translate("DP_FEATURE", "$rU/$rU",
                  "$var(attrs)"); <br class="">
                      #Is it a callpickup? <br class="">
                      if($var(attrs) =~ "call_pickup" &&
                  $avp(caller_pickup_grp) != "") { <br class="">
                          t_newtran(); # 100 Trying is fired here <br
                    class="">
                          send_reply("480","Gone"); <br class="">
                  <br class="">
                          #extension can belong to multiple group so
                  let's raise an event for each group <br class="">
                          $var(p) = 0; <br class="">
                          $var(caller_pickup_grp_len) = 0; <br class="">
                          $var(caller_pickup_grp_len) =
                  $(avp(caller_pickup_grp){csv.count}); <br class="">
                          while ($var(p) <
                  $var(caller_pickup_grp_len)) { <br class="">
                              $avp(attr-name) = "group"; <br class="">
                              $avp(attr-val) =
                  $(avp(caller_pickup_grp){csv.value,$var(p)}); <br
                    class="">
                              xlog("L_NOTICE","$rm $ci hunting2: Caller
                  pickup group [$avp(attr-val)] for [$fu]"); <br
                    class="">
                              $avp(attr-name) = "picker"; <br class="">
                              $avp(attr-val) = $fu; <br class="">
                              raise_event("E_CALL_PICKUP",
                  $avp(attr-name), $avp(attr-val)); <br class="">
                              $var(p) = $var(p) + 1; <br class="">
                          } <br class="">
                          exit; <br class="">
                      } <br class="">
                  <br class="">
                  <br class="">
                      if (isbflagset(USRLOC_FOUND) &&
                  $avp(callee_pickup_grp) != ""){ <br class="">
                          t_newtran(); <br class="">
                          $var(p) = 0; <br class="">
                          $var(callee_pickup_grp_len) = 0; <br class="">
                          $var(callee_pickup_grp_len) =
                  $(avp(callee_pickup_grp){csv.count}); <br class="">
                          while ($var(p) <
                  $var(callee_pickup_grp_len)) { <br class="">
                              #$avp(filter) = "group=1"; <br class="">
            $var(group)=$(avp(callee_pickup_grp){csv.value,$var(p)}); <br
                    class="">
                              $avp(filter) = "group="+$var(group); <br
                    class="">
                              xlog("L_NOTICE","$rm $ci relay: Callee
                  pickup group [$var(group)]. Raise event"); <br
                    class="">
            notify_on_event("E_CALL_PICKUP","$avp(filter)","handle_pickup",
                  "20"); <br class="">
                              $var(p) = $var(p) + 1; <br class="">
                          } <br class="">
                      } <br class="">
                  <br class="">
                      if (!t_relay()) { <br class="">
                          xlog("L_WARN","$rm $ci relay: 500 Internal
                  Server Error (t_relay failure)"); <br class="">
                          t_reply("500","Internal Server Error"); <br
                    class="">
                          $avp(reason) = "SIP;cause=500;text=INTERNAL
                  SERVER ERROR"; <br class="">
                          route(REASON); <br class="">
                      } <br class="">
                      exit; <br class="">
                  <br class="">
                  <br class="">
                  Any idea, what I missed here? <br class="">
                  <br class="">
                  Thanks in advance for your help <br class="">
                  Srigo <br class="">
                  <br class="">
                  <br class="">
                  <br class="">
                  <br class="">
                  _______________________________________________ <br
                    class="">
                  Users mailing list <br class="">
                  <a href="mailto:Users@lists.opensips.org" class=""
                    moz-do-not-send="true">Users@lists.opensips.org</a>
                  <br class="">
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a> <br class="">
                </blockquote>
                <br class="">
              </div>
            </blockquote>
          </div>
          <br class="">
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>