Reopening. 
(https://github.com/kamailio/kamailio/issues/3932#issuecomment-2252138364)

It's bug. 

Please see highlighted on screenshot. 

![image](https://github.com/user-attachments/assets/88b9671d-d2be-4d49-8596-3e6ab3a2d294)


Hey Team, 

Thank you for the awesome software

### Description

Neither option work:

`listen=... advertise some.custom.hostname.io`
`listen=... advertise some.custom.hostname.io:0`

to make Kamailio present only hostname(without port) in Record-Route headers, 
affects NAPTR/SRV.



### Troubleshooting

============
_Hostname without port - still gives port 5081 in Record-Route_

**kamailio.cfg**
...
`listen=tls:KAM_LOC_IP:5081     advertise some.custom.io name 
"provider_socket_tls"`
...


**sngrep, 200 OK for INVITE**
...
`Record-Route: <sip:some.custom.io:5081;transport=tls;r2=on;lr;did=494.6e51>`
...

**kamcmd corex.list_sockets**
...
```
{
        af: IPv4
        proto: tls
        name: 172.17.57.164
        addrlist: {
                addr: 172.17.57.164
        }
        port: 5081
        sockstr: tls:172.17.57.164:5081
        mcast: no
        mhomed: no
        virtual: no
        sockname: provider_socket_tls
        advertise: tls:some.custom.io:0
}
```
...

========
_Hostname with port 0 - still gives port 5081 in Record-Route_

kamailio.cfg
...
`listen=tls:KAM_LOC_IP:5081     advertise some.custom.io:0 name 
"provider_socket_tls"`
...


sngrep, 200 OK for INVITE
...
`Record-Route: <sip:some.custom.io:5081;transport=tls;r2=on;lr;did=042.7721>`
...

kamcmd corex.list_sockets
...
```
{
        af: IPv4
        proto: tls
        name: 172.17.57.164
        addrlist: {
                addr: 172.17.57.164
        }
        port: 5081
        sockstr: tls:172.17.57.164:5081
        mcast: no
        mhomed: no
        virtual: no
        sockname: provider_socket_tls
        advertise: tls:some.custom.io:0
}
```
...

============
_Hostname with explicit different port 8888 - gives that port 8888 in 
Record-Route (to confirm config works)_

kamailio.cfg
...
`listen=tls:KAM_LOC_IP:5081     advertise some.custom.io:8888 name 
"provider_socket_tls"`
...


sngrep, 200 OK for INVITE
...
`Record-Route: <sip:some.custom.io:8888;transport=tls;r2=on;lr;did=dae.ac31>`
...

kamcmd corex.list_sockets
...
```
{
        af: IPv4
        proto: tls
        name: 172.17.57.164
        addrlist: {
                addr: 172.17.57.164
        }
        port: 5081
        sockstr: tls:172.17.57.164:5081
        mcast: no
        mhomed: no
        virtual: no
        sockname: provider_socket_tls
        advertise: tls:some.custom.io:8888
}
```
...



#### Reproduction

Please see Troubleshooting section

#### Debugging Data

Please see Troubleshooting section

#### Log Messages

N/A

#### SIP Traffic

Please see Troubleshooting section

### Possible Solutions

N/A

### Additional Information


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

```
version: kamailio 5.8.2 (x86_64/linux) dbe51d
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: dbe51d 
compiled on 07:13:22 Jul 17 2024 with gcc 12.2.0)
```

* **Operating System**:

```
[dev]root@[voiceproxy]:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
[dev]root@[voiceproxy]:~# uname -a
Linux i-0875d7720d6152612 6.1.0-23-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 
6.1.99-1 (2024-07-15) x86_64 GNU/Linux
[dev]root@[voiceproxy]:~# cat /etc/*relea*
ID=ec2
VERSION="20240702-1796"
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/";
SUPPORT_URL="https://www.debian.org/support";
BUG_REPORT_URL="https://bugs.debian.org/";
```


* **Might be related** :
https://github.com/kamailio/kamailio/issues/1884



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3933
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to