<p><a href="https://github.com/staskobzar" class="user-mention">@staskobzar</a>, I'm not able to reproduce the double VIA problem. I'm using the python script you provided together with the opensips default cfg. Indeed, the NOTIFY is sent out to another SIP server (is not looping).</p>

<p>Using latest 1.11:<br>
version: opensips 1.11.5-notls (x86_64/linux)<br>
flags: STATS: On, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
git revision: <a href="https://github.com/OpenSIPS/opensips/commit/e72d1ef2627e2852d7548e12ca5afb804a2ac904" class="commit-link"><tt>e72d1ef</tt></a><br>
main.c compiled on 16:24:30 Jun  4 2015 with gcc 4.8</p>

<p>Now, about the missing \r, it seems to be the fault of libxml2, of the xml standard actually:<br>
   <a href="http://www.w3.org/TR/REC-xml/#sec-line-ends">http://www.w3.org/TR/REC-xml/#sec-line-ends</a><br>
Any \r\n is converted to \n :( ....</p>

<p>I tried to escape the the \r, but is not decoded ...we need to check with <a href="https://github.com/ovidiusas" class="user-mention">@ovidiusas</a>  on this.</p>

<p>Regards,<br>
Bogdan</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/537#issuecomment-108931860">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciS1cmRqJ6J0eRd5W4fR2qCXRBGAIks5oQGNlgaJpZM4EzfXn.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/537#issuecomment-108931860"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>