<div dir="ltr"><span style="font-size:12.8000001907349px">Hello. I thry to integrate redis for location module and first at all that I do - dublicate location to redis.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">First At all I create analog of lookup procedure that use location but from redis. I take values from location and create branches by mannualy. All works good but branch route create dublicate of first branch. We talk about it already and I cnow that branch route creates first original Request and then create branches. So my question is how to disable creation of original URI?</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">My cfg part of creation branches is:</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">First of all I create massive of needed endpoints and then create branches as bellow.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">I create it with different сucles  "while" because websockets not blocked when creates dublicate INVITE, but some UDP endpoints can not take call because answer to kamailio 482 reply and CANCELs call. </span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">It works fine when I logged on with wesocket device and UNP at one time. But when I logget with 2 UDP devices only this algorithm not worked.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Thanks for help.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                </span>$var(k)=0;</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                </span>xlog("L_INFO", "request URI is $ru");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                         </span>while ($var(k)<= $var(j)){</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                             </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                  </span>if ($(avp(device_contact)[$var(k)])=~"device"){</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                         </span>xlog("L_INFO", "This is a classic UDP call to endpoint");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                             </span>if ($(avp(device_received)[$var(k)])==""){</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                                      </span>xlog("L_INFO", "Received string is EMPTY");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                                   </span>$du="sip:"+$(avp(device_contact[$var(k)]){s.select,1,@});</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                               </span>}</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                         </span>else</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                              </span>{</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                                 </span>xlog("L_INFO", "Received string is {$avp(device_received)[$var(k)]}");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                                        </span>$du=$(avp(device_received)[$var(k)]);</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                             </span>}</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                         </span>$var(UDP_contact)="sip:"+$(avp(device_contact[$var(k)]){s.select,1,@});</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                         </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                          </span>append_branch("sip:$tU@$(du{s.select,1,:})","0.3");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                           </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                          </span>xlog("L_INFO","Classic Destination URI is {$(avp(device_contact[$var(k)]){s.select,1,@})} for {$tU}}. Destination is {$du}\n");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                       </span>}</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                         </span>$var(k) = $var(k) + 1;</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                            </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                          </span>}</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                         </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap"><br></span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap"><br></span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap"><br></span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                          </span>$var(k)=0;</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                </span>xlog("L_INFO", "request URI is $ru");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                         </span>while ($var(k)<=$var(j)){</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                              </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                  </span>if ($(avp(device_contact)[$var(k)])=~"transport=ws"){</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                           </span>xlog("L_INFO", "This is a classic UDP call to endpoint");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                     </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                          </span>xlog("L_INFO", "Received string is {$avp(device_received)[$var(k)]}");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                                </span>$du=$(avp(device_received)[$var(k)]);</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                             </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                          </span>append_branch("sip:$tU@$(du{s.select,1,:})","0.7");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                           </span></div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                          </span>xlog("L_INFO","Classic Destination URI is {$(avp(device_contact[$var(k)]){s.select,1,@})} for {$tU}}. Destination is {$du}\n");</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                                       </span>}</div><div style="font-size:12.8000001907349px"><span style="white-space:pre-wrap">                         </span>$var(k) = $var(k) + 1;</div></div>