<div dir="ltr"><div dir="ltr"><div dir="ltr">I think I found a solution so posting it here.</div><div dir="ltr"><span class="m_-5564371147928326794gmail-il">SIPP</span> sent <span class="m_-5564371147928326794gmail-il">BYE</span> to wrong address. I had to change uac.xml.</div><div dir="ltr"><br><div>capture contact field field from 200Ok:</div><div>-------------------------</div><div><div>  <recv response="200" rtd="true"><br></div><div>          <action></div><div>               <ereg regexp="<sip:([[:digit:].:]*)" search_in="hdr" header="Contact:" check_it="true" assign_to="1,2" /></div><div>               <ereg regexp="(;did=.*)>" search_in="hdr" header="Contact:" check_it="false" assign_to="5,6" /></div><div>          </action><br></div><div>  </recv></div></div><div>------------------------- </div><div>And use it in <span class="m_-5564371147928326794gmail-il">BYE</span>:</div><div>-------------------------</div><div><div><!-- The 'crlf' option inserts a blank line in the statistics report. --></div><div>  <!-- <span class="m_-5564371147928326794gmail-il">BYE</span> sip:[service]@[remote_ip]:[remote_port] SIP/2.0 --></div><div>  <send retrans="500"></div><div>    <![CDATA[</div><div><br></div><div>      <span class="m_-5564371147928326794gmail-il">BYE</span> sip:[service]@[$2][$6] SIP/2.0</div><div>      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</div><div>      From: <span class="m_-5564371147928326794gmail-il">sipp</span> <sip:<span class="m_-5564371147928326794gmail-il">sipp</span>@[local_ip]:[local_port]>;tag=[call_number]</div><div>      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]</div><div>      Call-ID: [call_id]</div><div>      CSeq: 2 <span class="m_-5564371147928326794gmail-il">BYE</span></div><div>      Contact: sip:<span class="m_-5564371147928326794gmail-il">sipp</span>@[local_ip]:[local_port]</div><div>      Max-Forwards: 70</div><div>      Subject: Performance Test</div><div>      Content-Length: 0</div><div><br></div><div>    ]]></div><div>  </send></div></div><div>-----------------------</div><div>Now</div><div><span class="m_-5564371147928326794gmail-il">sipp</span> -t tn -rsa opensips -trace_logs  -sf uac.xml -r 1 <span class="m_-5564371147928326794gmail-il">sipp</span>-uas <br></div><div>works every time</div><div><br></div><div>Also when I modified modules/b2b_entities/dlg.c<br></div><div><br></div><div><div>-<span style="white-space:pre-wrap">        </span>method_value = msg->first_line.u.request.method_value;</div><div>-</div><div>-<span style="white-space:pre-wrap">       </span>if(method_value == METHOD_ACK)</div><div>-<span style="white-space:pre-wrap">  </span>{</div><div>-<span style="white-space:pre-wrap">               </span>goto search_dialog;</div><div>-<span style="white-space:pre-wrap">     </span>}</div></div><div><div><span style="white-space:pre-wrap"><a class="gmail_plusreply" id="m_-5564371147928326794gmail-m_5730699577154358011gmail-plusReplyChip-0">+</a>     </span>method_value = msg->first_line.u.request.method_value;</div><div><a class="gmail_plusreply" id="m_-5564371147928326794gmail-m_5730699577154358011gmail-plusReplyChip-1">+</a><br></div><div><span style="white-space:pre-wrap"><a class="gmail_plusreply" id="m_-5564371147928326794gmail-m_5730699577154358011gmail-plusReplyChip-2">+</a>       </span>if((method_value == METHOD_ACK) || (method_value == METHOD_BYE))</div><div><span style="white-space:pre-wrap"><a class="gmail_plusreply" id="m_-5564371147928326794gmail-m_5730699577154358011gmail-plusReplyChip-3">+</a>     </span>{</div><div><span style="white-space:pre-wrap"><a class="gmail_plusreply" id="m_-5564371147928326794gmail-m_5730699577154358011gmail-plusReplyChip-4">+</a>            </span>goto search_dialog;</div><div><span style="white-space:pre-wrap">+     </span>}</div></div><div>it started working as well, but I dont think this is the right fix.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 7, 2019 at 4:17 PM Konrad Malewski <<a href="mailto:konrad.malewski@motorolasolutions.com" target="_blank">konrad.malewski@motorolasolutions.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>I am new to opensips. I went through proxy tutorials and now I am trying to configure opensips in b2bua mode. I am using 3 dockers (UAS, UAC and opensips).</div><div><br></div><div>I have problems with BYE message sent by UAC. Opensips is not able to match it to whole dialog (this is my interpretation) and returns 500 internal error (due to t_relay call, but without it there is no response at all).</div><div><br></div><div><br></div></div></div></blockquote></div></div>