<h3>Description</h3>
<p>Im using the path module on loadbalancer, the update to the path module, seems to break the default behavior.</p>

<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<pre><code>/* ----- rr params --------------------------------------------------------- */
/** add value to ;lr param (helps with some UAs) */
modparam("rr", "enable_full_lr", 1)
modparam("rr", "append_fromtag", 1)

/* ----- maxfwd params ----------------------------------------------------- */
modparam("maxfwd", "max_limit", 70)

/* ----- path params ------------------------------------------------------- */
modparam("path", "use_received", 1)
</code></pre>
<h4>Debugging Data</h4>
<h4>Log Messages</h4>

<pre><code>2(71369) DEBUG: rr [loose.c:85]: is_preloaded(): is_preloaded: Yes
2(71369) DEBUG: <core> [core/socket_info.c:564]: grep_sock_info(): checking if host==us: 12==12 && [x.x.x.126] == [x.x.x.126]
2(71369) DEBUG: <core> [core/socket_info.c:567]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
2(71369) DEBUG: rr [loose.c:788]: after_loose(): Topmost route URI: 'sip:x.x.x.126;lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls' is me
2(71369) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
2(71369) DEBUG: rr [loose.c:180]: find_next_route(): No next Route HF found
2(71369) DEBUG: rr [loose.c:813]: after_loose(): No next URI found
2(71369) DEBUG: rr [rr_cb.c:95]: run_rr_callbacks(): callback id 0 entered with <lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls>
2(71369) DEBUG: <core> [core/strutils.c:214]: unescape_user(): unescaped string is <sip:y.y.y.y:47056;transport=tls>
2(71369) DEBUG: path [path.c:424]: path_rr_callback(): setting dst uri: sip:sip:y.y.y.y:47056%3Btranspo
2(71369) DEBUG: pv [pv_core.c:951]: pv_get_useragent(): no User-Agent header
2(71369) DEBUG: rr [loose.c:1068]: check_route_param(): route params checking against [;lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls] (orig: [lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls])
2(71369) DEBUG: rr [loose.c:1073]: check_route_param(): params are <;lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls>
2(71369) DEBUG: tm [t_lookup.c:1302]: t_newtran(): msg id=4 , global msg id=4 , T on entrance=0x0
2(71369) DEBUG: tm [t_lookup.c:459]: t_lookup_request(): start searching: hash=16463, isACK=0
2(71369) DEBUG: tm [t_lookup.c:417]: matching_3261(): RFC3261 transaction matching failed
2(71369) DEBUG: tm [t_lookup.c:641]: t_lookup_request(): no transaction found
2(71369) DEBUG: <core> [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: 076837eff630cf1e80bed191da066432
2(71369) DEBUG: <core> [core/parser/parse_uri.c:1262]: parse_uri(): parse_uri: bad char ':' in state 3 parsed: <sip:sip:y.y.y.y> (21) / <sip:sip:y.y.y.y:47056%3Btranspo> (37)
2(71369) ERROR: tm [./ut.h:245]: uri2dst2(): bad_uri: [sip:sip:y.y.y.y:47056%3Btranspo]
2(71369) ERROR: tm [t_fwd.c:1735]: t_forward_nonack(): failure to add branches
2(71369) DEBUG: tm [t_funcs.c:330]: t_relay_to(): t_forward_nonack returned error -478 (-478)
2(71369) DEBUG: tm [t_funcs.c:348]: t_relay_to(): -478 error reply generation delayed 
2(71369) DEBUG: <core> [core/msg_translator.c:159]: check_via_address(): (x.x.x.124, x.x.x.124, 0)
2(71369) ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: Unresolvable destination (478/SL)
2(71369) DEBUG: <core> [core/receive.c:283]: receive_msg(): request-route executed in: 2594 usec
2(71369) DEBUG: tm [t_lookup.c:1458]: t_unref(): delayed error reply generation(-478)
2(71369) DEBUG: <core> [core/msg_translator.c:159]: check_via_address(): (x.x.x.124, x.x.x.124, 0)
2(71369) DEBUG: tm [t_reply.c:1631]: cleanup_uac_timers(): RETR/FR timers reset
2(71369) DEBUG: tm [t_reply.c:598]: _reply_light(): reply sent out. buf=0x8018e77b0: SIP/2.0 478 Unresolv..., shmem=0x8086bbc30: SIP/2.0 478 Unresolv
2(71369) DEBUG: tm [t_reply.c:608]: _reply_light(): finished

</code></pre>
<h4>SIP Traffic</h4>

<pre><code>2017/08/04 10:27:55.690224 x.x.x.124:5060 -> x.x.x.126:5060
OPTIONS sip:user@y.y.y.y:43098;transport=TLS SIP/2.0
Via: SIP/2.0/UDP x.x.x.124:5060;branch=z9hG4bK2840489
Route: <sip:x.x.x.126;lr;received=sip:y.y.y.y:43098%3Btransport%3Dtls>
From: sip:pinger@hostname-xxx;tag=uloc-7c-5982da6d-4c09-11-0-7d68
To: sip:user@y.y.y.y:43098;transport=TLS
Call-ID: 1e57ca12-c3d5f614-8b5c49@5.159.56.124
CSeq: 1 OPTIONS
Content-Length: 0
</code></pre>
<h3>Possible Solutions</h3>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code># kamailio -v
version: kamailio 5.1.0-dev5 (x86_64/freebsd) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: unknown 
compiled on 23:35:16 Aug  3 2017 with clang 3.8
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code># uname -a
FreeBSD hostname-xxx 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
</code></pre>

<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/1205">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZeM4rKy6VVR9jdLHsbxSg4WsteXJks5sUt4WgaJpZM4OtdUU">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZVYQoW07DSbiIIipdY046-ETEVBQks5sUt4WgaJpZM4OtdUU.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/kamailio/kamailio/issues/1205"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"path: rr_callback wrong dst uri  (#1205)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1205"}}}</script>