Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include_hf_value: Not expected behaviour #1629

Closed
sergey-safarov opened this issue Sep 1, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@sergey-safarov
Copy link
Contributor

commented Sep 1, 2018

Description

I want modify Accept header using include_hf_value. Need to add additional values to current. I do this using.

include_hf_value("Accept", "application/sdp");
include_hf_value("Accept", "application/pidf+xml");

Expected result in SIP message

Accept: application/sdp, application/pidf+xml

Realy i get

Accept: application/sdp
Accept: application/pidf+xml

Troubleshooting

Reproduction

Need to add this to kamailio config

Accept: application/sdp
Accept: application/pidf+xml

Debugging Data

None

Log Messages

None

SIP Traffic

PCAP file is attached.

Possible Solutions

None

Additional Information

Used kamailio 5.1 branch commit 9f04def504051dc8da3989b1f96e4b6633d31a75
Docker container kamailio/kamailio-ci

/ # kamailio -v
version: kamailio 5.1.5 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, 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_BLACKLIST, HAVE_RESOLV_RES
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 on 10:41:20 Aug 23 2018 with gcc 6.4.0
  • Operating System:
/ # cat /etc/os-release 
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.0
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
/ # uname -a
Linux 088bedf3b82f 4.14.13-300.fc27.x86_64 #1 SMP Thu Jan 11 04:00:01 UTC 2018 x86_64 Linux
@sergey-safarov

This comment has been minimized.

Copy link
Contributor Author

commented Sep 1, 2018

This happens if original SIP message not have modified header.
Same result if i add header first and then i want modify.

append_hf("Accept: application/sdp\r\n");
include_hf_value("Accept", "application/pidf+xml");
@sergey-safarov

This comment has been minimized.

Copy link
Contributor Author

commented Sep 1, 2018

PCAP is attached
pcap.pcapng.gz

@miconda

This comment has been minimized.

Copy link
Member

commented Sep 2, 2018

Changes on headers are not seen in config if you do not use msg_apply_changes().

If you want to discuss more, then use sr-users mailing list. If it proves to be a bug, then an issue can be here.

@miconda miconda closed this Sep 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.