xhttp module generates an error sip parsing error log

崔天浩 via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <CAKbN6=fVFzzyfGNFdfMW6YQsS_LNNOxJN23qZRf8Kp2pJaPdbQ@mail.gmail.com>
### Description

I see that when the xhttp module is enabled, kamailio will forge the Via
header to process the HTTP request, but the parse sip error will be
generated in the log
```
104(113) ERROR: <core> [core/parser/parse_uri.c:1417]: _parse_ruri(): bad
uri </metrics>
104(113) ERROR: <core> [core/parser/parse_uri.c:1455]: parse_orig_ruri():
parse orig ruri failed
104(113) ERROR: pv [pv_core.c:355]: pv_get_ouri_attr(): failed to parse the
R-URI
```

### Troubleshooting


#### Debugging Data

Set up a Kamailio server with the xhttp module enabled.

```
loadmodule "xhttp.so"

event_route[xhttp:request] {
$var(xhttp_prom_root) = $(hu{s.substr,0,8});
if ($var(xhttp_prom_root) == "/metrics") {
xlogl("L_INFO", " [$utimef(20%y-%d-%m %H:%M:%S)] [$(hdr(Call-ID))]:
[bizCall=$xavu(bizCallId)] [bot=$xavu(bizBotId)] Called metrics\n");
prom_dispatch();
}
}
```


#### Log Messages


```
104(113) ERROR: <core> [core/parser/parse_uri.c:1417]: _parse_ruri(): bad
uri </metrics>
104(113) ERROR: <core> [core/parser/parse_uri.c:1455]: parse_orig_ruri():
parse orig ruri failed
104(113) ERROR: pv [pv_core.c:355]: pv_get_ouri_attr(): failed to parse the
R-URI
```


### Additional Information


```
root@kamailio-60-bot-67d564c54c-xj97x:/# kamailio -V
version: kamailio 6.0.1 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST,
HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE
262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 8.3.0
```

* **Operating System**:

```
root@kamailio-60-bot-67d564c54c-xj97x:/# uname -a
Linux kamailio-60-bot-67d564c54c-xj97x 5.4.119-19.0009.28 #1 SMP Thu May 18
10:37:10 CST 2023 x86_64 GNU/Linux
```

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.