[sr-dev] [kamailio/kamailio] path: rr_callback wrong dst uri (#1205)

Rick notifications at github.com
Fri Aug 4 11:02:14 CEST 2017


<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.

If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:

  * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

If you have questions about developing extensions to Kamailio or its existing
C code, ask on sr-dev mailing list

  * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.

If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.

If there is no content to be filled in a section, the entire section can be removed.

You can delete the comments from the template sections when filling.

You can delete next line and everything above before submitting (it is a comment).
-->

### Description

Im using the path module on loadbalancer, the update to the path module, seems to break the default behavior. 
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->

### Troubleshooting

#### Reproduction

```
/* ----- 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)
```
#### Debugging Data



#### Log Messages

<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
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

```

#### SIP Traffic

<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
2017/08/04 10:27:55.690224 x.x.x.124:5060 -> x.x.x.126:5060
OPTIONS sip:user at 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 at hostname-xxx;tag=uloc-7c-5982da6d-4c09-11-0-7d68
To: sip:user at y.y.y.y:43098;transport=TLS
Call-ID: 1e57ca12-c3d5f614-8b5c49 at 5.159.56.124
CSeq: 1 OPTIONS
Content-Length: 0
```

### Possible Solutions

<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
# 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
```

* **Operating System**:

<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->

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


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1205
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170804/d8ce8bb7/attachment.html>


More information about the sr-dev mailing list