<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div 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="">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="">http://www.opensips-solutions.com</a><br class="">OpenSIPS Bootcamp 2018<br class=""> <a href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" class="">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="">Users@lists.opensips.org</a><br class="">http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br class=""></blockquote><br class=""></div></blockquote></div><br class=""></body></html>