### Description
when using rtp_media_server module in my kamailio configuration, the `rms_answer` function
generates a "200 OK" with a hard-coded Contact header user.
I believe it would make more sense for this to use the To user (`$tU`) as that should be
who is answering.
#### Reproduction
```
route {
if (t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
if (is_method("INVITE") && !has_totag()) {
if (!rms_answer("rms:start_long")) {
t_reply("503", "server error");
}
exit;
}
if (rms_dialog_check()) {
rms_sip_request();
}
}
```
#### Debugging Data
n/a
#### Log Messages
n/a
#### SIP Traffic
```
INVITE sip:+461812345678@123.123.example.com SIP/2.0.
Via: SIP/2.0/UDP 172.21.0.3:6060;branch=z9hG4bK6810d54f.
Max-Forwards: 70.
From: <sip:+461812345677@172.21.0.3:6060>;tag=as21f01093.
To: <sip:+461812345678@123.123.example.com>.
Contact: <sip:+461812345677@172.21.0.3:6060>.
Call-ID: 4f56bf7336a114d75402e30f47013748@172.21.0.3:6060.
CSeq: 102 INVITE.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH,
MESSAGE.
Supported: replaces, timer.
Content-Type: application/sdp.
Content-Length: 248.
..
v=0.
o=root 1511071437 1511071437 IN IP4 172.21.0.3.
s=Asterisk PBX 18.10.0.
c=IN IP4 172.21.0.3.
t=0 0.
m=audio 26516 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=maxptime:150.
a=sendrecv.
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
172.21.0.2;branch=z9hG4bK09e2.aa4ab6455ca95a0ee95268497e877cc4.2;rport=5060.
Via: SIP/2.0/UDP 172.21.0.3:6060;rport=6060;branch=z9hG4bK6810d54f.
From: <sip:+461812345677@172.21.0.3:6060>;tag=as21f01093.
To:
<sip:+461812345678@123.123.example.com>;tag=f46321019d9527ace4b30f86d231e4a2-cafc0000.
Call-ID: 4f56bf7336a114d75402e30f47013748@172.21.0.3:6060.
CSeq: 102 INVITE.
Contact: <sip:rms@172.21.0.4:5060>.
Content-Type: application/sdp.
Server: kamailio (5.6.3 (aarch64/linux)).
Content-Length: 99.
..
v=0.
o=- 1028316687 1 IN IP4 172.21.0.4.
s=-.
c=IN IP4 172.21.0.4.
t=0 0.
m=audio 51900 RTP/AVP 8.
```
### Possible Solutions
n/a
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.3 (aarch64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST,
DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY,
USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, 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_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 12.2.0
```
* **Operating System**:
```
debian bookworm
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3380
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3380(a)github.com>