<div dir="ltr">Stupid gmail replying to sender only...<br><br><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">George Diamantopoulos</b> <span dir="ltr"><<a href="mailto:georgediam@gmail.com">georgediam@gmail.com</a>></span><br>Date: 27 August 2017 at 02:29<br>Subject: Re: [SR-Users] Weird issue with kamailio relaying messages to itself<br>To: Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>><br><br><br><div dir="ltr"><div><div><div><div><div>Hello all,<br><br></div>I've figured out what was going on, so I'm sharing here in case anyone else runs into this. I guess it should be a fairly common situation under certain circumstances when using the dispatcher module...<br><br></div>The problem was that no destinations in the dispatcher set used were available for these requests. So $du was not set by ds_select_next. Which meant that when t_relay() was called later in the script, it would route based on R-URI, and the RURI's uri was kamailio itself.<br><br></div>As to the reason why I was left with no dispatcher destinations available, well, I would mark destinations offline for 500 "server error" responses coming from them, and asterisk (which is the receiving application for all of dispatcher's destination sets) will send out a 500 to the B-leg when it receives a 480 to an A-leg. Getting a single 480 to one of the asterisk boxes would cause this to happen across all destinations, as kamailio would retry the next destination after a 500 failure and would receive a 500 from all of them in the end (because all of them would get the 480 in such small time frame).<br><br></div>BR,<br></div>George<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 31 July 2017 at 21:52, George Diamantopoulos <span dir="ltr"><<a href="mailto:georgediam@gmail.com" target="_blank">georgediam@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello Daniel,<br></div><br></div>Thanks for the reply. That is correct, looping was not my intention, I'm trying to figure out what's causing it...<br><br></div>BR,<br></div>George<br></div><div class="m_-4139004479613105873HOEnZb"><div class="m_-4139004479613105873h5"><div class="gmail_extra"><br><div class="gmail_quote">On 31 July 2017 at 17:29, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>usually you should not loop requests locally, unless a very
      special case -- do you do the loop routing because of a need or
      just happens but you don't know why?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p><div><div class="m_-4139004479613105873m_3891372853480237293h5">
    <br>
    <div class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-cite-prefix">On 31.07.17 13:46, George
      Diamantopoulos wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="m_-4139004479613105873m_3891372853480237293h5">
      <div dir="ltr">
        <div>Hello all,<br>
          <br>
          I have been toying with kamailio lately, and I thought I had
          gotten to the point where I had a mostly working (tm)
          prototype. I gave it a test drive with some real calls,
          however, and an issue manifested at least once, where homer
          received packets originating from the kamailio host, and whose
          destination was also the kamailio host.<br>
          <br>
          The dialog this manifested in is a generally problematic one,
          with many retransmissions occurring because of slow database
          access (I haven't implemented htable caching yet). No packet
          capture over the network is actually taking place, I'm copying
          everything to homer with "trace_mode"set to 1.<br>
          <br>
          Homer shows these messages like in the screenshot: <a href="https://imagebin.ca/v/3VGJAmovRBmo" target="_blank">https://imagebin.ca/v/3VGJAmov<wbr>RBmo</a>.
          Here's an example of a packet:<br>
          <br>
          <br>
          <div style="margin-left:40px">2017-07-28 14:32:29 +0300 : <a href="http://2.3.4.5:5060" target="_blank">2.3.4.5:5060</a>
            -> <a href="http://2.3.4.5:5060" target="_blank">2.3.4.5:5060</a><br>
            INVITE <a href="mailto:sip%3A1234567890@kamailio-server.org" target="_blank">sip:1234567890@kamailio-server<wbr>.org</a>
            SIP/2.0<br>
            Record-Route: <a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-rfc2396E"><sip:2.3.4.5;lr;ftag=as491cec8<wbr>2></a><br>
            Via: SIP/2.0/UDP
            2.3.4.5;branch=z9hG4bK0cf.0779<wbr>9e3eb71f33a9ef91178ac760ebd2.0<br>
            Via: SIP/2.0/UDP
2.3.4.5;branch=z9hG4bKsr-BnCVy<wbr>rWoUladI14pU7Pry-Pzy-ONy-VSQ74<wbr>NU7HzeYazq2nFU2Oc5FIWiGIKq-HXe<wbr>x1oONpam-C6IrIXkr4FQxZRh7sM<br>
            Max-Forwards: 69<br>
            From: <<a href="http://sip:subscriber@5.4.3.2:5061" target="_blank">sip:subscriber@5.4.3.2:5061</a>>;<wbr>tag=as491cec82<br>
            To: <<a href="mailto:sip%3A1234567890@kamailio-server.org" target="_blank">sip:1234567890@kamailio-serve<wbr>r.org</a>><br>
            Contact:
<a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-rfc2396E"><sip:2.3.4.5;line=sr-eNC05xhKe<wbr>fQnON1EglFrOkF0OfpzV2s9UzM9UXM<wbr>NQXMn5-B0Q-s*></a><br>
            Call-ID: <a href="http://4e5d22c3369704b97d866c8d0f3798f8@192.168.201.2:5061" target="_blank">4e5d22c3369704b97d866c8d0f3798<wbr>f8@192.168.201.2:5061</a><br>
            CSeq: 103 INVITE<br>
            User-Agent: Asterisk PBX 11.13.1~dfsg-2~bpo70+1<br>
            Date: Fri, 28 Jul 2017 11:32:24 GMT<br>
            Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
            NOTIFY, INFO, PUBLISH, MESSAGE<br>
            Supported: replaces, timer<br>
            Remote-Party-ID: "9876543210" <<a href="mailto:sip%3A9876543210@192.168.201.2" target="_blank">sip:9876543210@192.168.201.2</a>><wbr>;party=calling;privacy=off;scr<wbr>een=yes<br>
            Content-Type: application/sdp<br>
            Content-Length: 500<br>
            <br>
            v=0<br>
            o=root 242468242 242468243 IN IP4 172.17.130.13<br>
            s=Asterisk PBX 11.13.1~dfsg-2~bpo70+1<br>
            c=IN IP4 172.17.130.13<br>
            t=0 0<br>
            m=audio 59426 RTP/AVP 18 101<br>
            a=rtpmap:18 G729/8000<br>
            a=fmtp:18 annexb=no<br>
            a=rtpmap:101 telephone-event/8000<br>
            a=fmtp:101 0-16<br>
            a=ptime:50<br>
            a=sendrecv<br>
            a=rtcp:59427<br>
            a=ice-ufrag:hffIoy6x<br>
            a=ice-pwd:nXB8ip7Qz8ZG5yyZRr97<wbr>kGJbej<br>
            a=candidate:igct4zWHEzhGCjWc 1 UDP <a href="tel:21%203070%206431" value="+302130706431" target="_blank">2130706431</a> 172.17.130.13
            59426 typ host<br>
            a=candidate:igct4zWHEzhGCjWc 2 UDP <a href="tel:21%203070%206430" value="+302130706430" target="_blank">2130706430</a> 172.17.130.13
            59427 typ host<br>
          </div>
          <br>
        </div>
        Can something like this be triggered by misconfiguration in the
        routing scripts? Should it worry me and should I dig into it
        more? Could it be a bug of the siptrace module and nothing bad
        actually took place? I'm not sure where to start with this, so
        any input would be greatly appreciated. Thanks!<br>
      </div>
      <br>
      <fieldset class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><span class="m_-4139004479613105873m_3891372853480237293HOEnZb"><font color="#888888">
</font></span></pre><span class="m_-4139004479613105873m_3891372853480237293HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="m_-4139004479613105873m_3891372853480237293HOEnZb"><font color="#888888">
    <br>
    <pre class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_-4139004479613105873m_3891372853480237293m_-313965258654759870moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </font></span></div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div><br></div></div>