ShadoWalkeR31 created an issue (kamailio/kamailio#4817)
### Description
We work with ISUP and uses prefixes with ABCDE for routing. Prefix can contain
sequence 'D0' which converts in '0D' for hex string and kamailio handle it as
CR at msg_apply_changes() instead use it AS-IS. And append to body "after" body
in outgoing INVITE
I saved 2 calls in pcap - with D0 and D1 as prefixes for compare in whireshark.
<img width="2558" height="1523" alt="Image"
src="https://github.com/user-attachments/assets/bb326c11-4384-4958-aa7f-3a6e0fb570de"
/>
<img width="2548" height="1534" alt="Image"
src="https://github.com/user-attachments/assets/5d780581-7c09-4367-bd58-d8507de1f10f"
/>
### Troubleshooting
#### Reproduction
$var(b) = "01 00 49 00 0A 00 02 0B 09 84 10 0D 89 67 45 23 01 F9 0A 07 84 13 21
43 65 87 F9 00";
append_body_part_hex("$var(b)", "application/isup;version=itu-t92+",
"signal;handling=optional");
msg_apply_changes();
#### Log Messages
Bad call:
```
июл 10 16:39:43 test /usr/sbin/kamailio[187822]: INFO: [INVITE:1]
<pox9p0reIB><script>: [isup:isup_add_iam]: adding ISUP part, IAM [123456789] ->
[D098765432109], hex [01 00 49 00 0A 00 02 0B 09 84 10 0D 89 67 45 23 01 F9 0A
07 84 13 21 43 65 87 F9 00]
июл 10 16:39:43 test /usr/sbin/kamailio[187822]: ERROR: [INVITE:1]
<pox9p0reIB><core> [core/msg_translator.c:1751]: find_line_start(): No LF after
CR
```
#### SIP Traffic
Github prevent adding .pcap, i add .txt to filename for adding file
```
[0D_in_hex.pcap.txt](https://github.com/user-attachments/files/29887762/0D_in_hex.pcap.txt)
```
* **Kamailio Version** - output of `kamailio -v`
```
kamailio -V
version: kamailio 6.1.3 (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, DBG_QM_MALLOC, DBG_F_MALLOC,
DBG_TLSF_MALLOC, USE_FUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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 on 00:00:00 Sep 13 2022 with gcc [11.5.0](url)
```
Kamailio installed from [kamailio repo for
Centos/RedHat/](https://rpm.kamailio.org)https://rpm.kamailio.org/
* **Operating System**:
```
Rocky Linux 9
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4817
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [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!