<p>I think I found where the bug is. In select_rtpp_node() function there is this function call:</p>
<pre lang="//" data-meta="lookup node"><code>   node = select_rtpp_node_old(callid, viabranch, do_test, op);
</code></pre>
<p>When select_rtpp_node() is called second time,  active_rttp_set is set2, but select_rtpp_node_old() returns the previous node from set1 and a node from set2 is not selected.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2039?email_source=notifications&email_token=ABO7UZLDFDM2354MP53RJV3QF2UDXA5CNFSM4IN3G6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45NECY#issuecomment-523948555">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPP6RFWIM3ZLOVHUULQF2UDXANCNFSM4IN3G6LA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZNCB7DRAQ45M6C3LILQF2UDXA5CNFSM4IN3G6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45NECY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2039?email_source=notifications\u0026email_token=ABO7UZLDFDM2354MP53RJV3QF2UDXA5CNFSM4IN3G6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45NECY#issuecomment-523948555",
"url": "https://github.com/kamailio/kamailio/issues/2039?email_source=notifications\u0026email_token=ABO7UZLDFDM2354MP53RJV3QF2UDXA5CNFSM4IN3G6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45NECY#issuecomment-523948555",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>