<p>Sorry that was a typo what I would like to ask how to use it the following way:</p>
<pre><code>/* ----- path params ------------------------------------------------------- */
modparam("path", "use_received", 1)
modparam("path", "enable_r2", 1)
modparam("path", "received_format", 1)
</code></pre>
<pre><code>2017/08/08 20:55:38.008534 x.x.x.124:5060 -> x.x.x.126:5060
OPTIONS sip:user@y.y.y.y:45561;transport=TLS SIP/2.0
Via: SIP/2.0/UDP x.x.x.124:5060;branch=z9hG4bK3722567
Route: <sip:x.x.x.126;lr;received=y.y.y.y~45561~3;r2=on>,<sip:x.x.x.126:5061;transport=tls;lr;received=y.y.y.y~45561~3;r2=on>
From: sip:pinger@hostname-xxx;tag=uloc-7c-59888812-afc4-a-0-7e38
To: sip:user@y.y.y.y:45561;transport=TLS
Call-ID: 1e57ca12-c4a5f614-32f8a83@x.x.x.124
CSeq: 1 OPTIONS
Content-Length: 0
</code></pre>
<p>But this happens:</p>
<pre><code> 2(21696) DEBUG: rr [loose.c:85]: is_preloaded(): is_preloaded: Yes
 2(21696) 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(21696) DEBUG: <core> [core/socket_info.c:567]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
 2(21696) DEBUG: rr [loose.c:788]: after_loose(): Topmost route URI: 'sip:x.x.x.126;lr;received=y.y.y.y~46217~3;r2=on' is me
 2(21696) 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(21696) DEBUG: <core> [core/socket_info.c:567]: grep_sock_info(): checking if port 5061 (advertise 0) matches port 5061
 2(21696) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
 2(21696) DEBUG: rr [loose.c:180]: find_next_route(): No next Route HF found
 2(21696) DEBUG: rr [loose.c:859]: after_loose(): no next URI found
 2(21696) DEBUG: rr [rr_cb.c:95]: run_rr_callbacks(): callback id 0 entered with <lr;received=y.y.y.y~46217~3;r2=on>
 2(21696) DEBUG: path [path.c:431]: path_rr_callback(): setting dst uri: sip:y.y.y.y:462
 2(21696) DEBUG: pv [pv_core.c:951]: pv_get_useragent(): no User-Agent header
 2(21696) ERROR: <script>: sip:y.y.y.y:462 2(21696) DEBUG: rr [loose.c:1068]: check_route_param(): route params checking against [;lr;received=y.y.y.y~46217~3;r2=on] (orig: [lr;received=y.y.y.y~46217~3;r2=on])
 2(21696) DEBUG: rr [loose.c:1073]: check_route_param(): params are <;lr;received=y.y.y.y~46217~3;r2=on>
 2(21696) DEBUG: tm [t_lookup.c:1302]: t_newtran(): msg id=4 , global msg id=4 , T on entrance=0x0
 2(21696) DEBUG: tm [t_lookup.c:459]: t_lookup_request(): start searching: hash=21511, isACK=0
 2(21696) DEBUG: tm [t_lookup.c:417]: matching_3261(): RFC3261 transaction matching failed
 2(21696) DEBUG: tm [t_lookup.c:641]: t_lookup_request(): no transaction found
 2(21696) DEBUG: <core> [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: e3f2c69cf650b364b8e177fe1e7a7c61
 2(21696) DEBUG: <core> [core/parser/parse_uri.c:1273]: parse_uri(): bad port in uri (error at char  in state 3) parsed: <sip:y.y.y.y:462>(1024) /<sip:y.y.y.y:462> (1024)
 2(21696) ERROR: tm [./ut.h:245]: uri2dst2(): bad_uri: [sip:y.y.y.y:462]
 2(21696) ERROR: tm [t_fwd.c:1735]: t_forward_nonack(): failure to add branches
 2(21696) DEBUG: tm [t_funcs.c:330]: t_relay_to(): t_forward_nonack returned error -478 (-478)
 2(21696) DEBUG: tm [t_funcs.c:348]: t_relay_to(): -478 error reply generation delayed 
</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#issuecomment-321052528">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZYBt1ICAExnAgXb7Ovh-JN4BdCcAks5sWLJegaJpZM4OtdUU">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZZ7Zh1hUjtN7MtZuaMM_ksEEk6Jpks5sWLJegaJpZM4OtdUU.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#issuecomment-321052528"></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":"PERSON","message":"@dunst0 in #1205: Sorry that was a typo what I would like to ask how to use it the following way:\r\n\r\n```\r\n/* ----- path params ------------------------------------------------------- */\r\nmodparam(\"path\", \"use_received\", 1)\r\nmodparam(\"path\", \"enable_r2\", 1)\r\nmodparam(\"path\", \"received_format\", 1)\r\n```\r\n\r\n```\r\n2017/08/08 20:55:38.008534 x.x.x.124:5060 -\u003e x.x.x.126:5060\r\nOPTIONS sip:user@y.y.y.y:45561;transport=TLS SIP/2.0\r\nVia: SIP/2.0/UDP x.x.x.124:5060;branch=z9hG4bK3722567\r\nRoute: \u003csip:x.x.x.126;lr;received=y.y.y.y~45561~3;r2=on\u003e,\u003csip:x.x.x.126:5061;transport=tls;lr;received=y.y.y.y~45561~3;r2=on\u003e\r\nFrom: sip:pinger@hostname-xxx;tag=uloc-7c-59888812-afc4-a-0-7e38\r\nTo: sip:user@y.y.y.y:45561;transport=TLS\r\nCall-ID: 1e57ca12-c4a5f614-32f8a83@x.x.x.124\r\nCSeq: 1 OPTIONS\r\nContent-Length: 0\r\n```\r\n\r\nBut this happens:\r\n```\r\n 2(21696) DEBUG: rr [loose.c:85]: is_preloaded(): is_preloaded: Yes\r\n 2(21696) DEBUG: \u003ccore\u003e [core/socket_info.c:564]: grep_sock_info(): checking if host==us: 12==12 \u0026\u0026 x.x.x.126] == [x.x.x.126]\r\n 2(21696) DEBUG: \u003ccore\u003e [core/socket_info.c:567]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060\r\n 2(21696) DEBUG: rr [loose.c:788]: after_loose(): Topmost route URI: 'sip:x.x.x.126;lr;received=y.y.y.y~46217~3;r2=on' is me\r\n 2(21696) DEBUG: \u003ccore\u003e [core/socket_info.c:564]: grep_sock_info(): checking if host==us: 12==12 \u0026\u0026 [x.x.x.126] == [x.x.x.126]\r\n 2(21696) DEBUG: \u003ccore\u003e [core/socket_info.c:567]: grep_sock_info(): checking if port 5061 (advertise 0) matches port 5061\r\n 2(21696) DEBUG: \u003ccore\u003e [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header\r\n 2(21696) DEBUG: rr [loose.c:180]: find_next_route(): No next Route HF found\r\n 2(21696) DEBUG: rr [loose.c:859]: after_loose(): no next URI found\r\n 2(21696) DEBUG: rr [rr_cb.c:95]: run_rr_callbacks(): callback id 0 entered with \u003clr;received=y.y.y.y~46217~3;r2=on\u003e\r\n 2(21696) DEBUG: path [path.c:431]: path_rr_callback(): setting dst uri: sip:y.y.y.y:462\r\n 2(21696) DEBUG: pv [pv_core.c:951]: pv_get_useragent(): no User-Agent header\r\n 2(21696) ERROR: \u003cscript\u003e: sip:y.y.y.y:462 2(21696) DEBUG: rr [loose.c:1068]: check_route_param(): route params checking against [;lr;received=y.y.y.y~46217~3;r2=on] (orig: [lr;received=y.y.y.y~46217~3;r2=on])\r\n 2(21696) DEBUG: rr [loose.c:1073]: check_route_param(): params are \u003c;lr;received=y.y.y.y~46217~3;r2=on\u003e\r\n 2(21696) DEBUG: tm [t_lookup.c:1302]: t_newtran(): msg id=4 , global msg id=4 , T on entrance=0x0\r\n 2(21696) DEBUG: tm [t_lookup.c:459]: t_lookup_request(): start searching: hash=21511, isACK=0\r\n 2(21696) DEBUG: tm [t_lookup.c:417]: matching_3261(): RFC3261 transaction matching failed\r\n 2(21696) DEBUG: tm [t_lookup.c:641]: t_lookup_request(): no transaction found\r\n 2(21696) DEBUG: \u003ccore\u003e [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: e3f2c69cf650b364b8e177fe1e7a7c61\r\n 2(21696) DEBUG: \u003ccore\u003e [core/parser/parse_uri.c:1273]: parse_uri(): bad port in uri (error at char  in state 3) parsed: \u003csip:y.y.y.y:462\u003e(1024) /\u003csip:y.y.y.y:462\u003e (1024)\r\n 2(21696) ERROR: tm [./ut.h:245]: uri2dst2(): bad_uri: [sip:y.y.y.y:462]\r\n 2(21696) ERROR: tm [t_fwd.c:1735]: t_forward_nonack(): failure to add branches\r\n 2(21696) DEBUG: tm [t_funcs.c:330]: t_relay_to(): t_forward_nonack returned error -478 (-478)\r\n 2(21696) DEBUG: tm [t_funcs.c:348]: t_relay_to(): -478 error reply generation delayed \r\n```"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1205#issuecomment-321052528"}}}</script>