Calling remove_hf() more than once for the same header causes the resulting sip
message to be malformed.
In my case I am calling remove_hf() on replies to remove custom headers.
Hopefully this pastes OK, ngrep output from calling remove_hf("^X-", "r") twice
on the same 200 response:
U 2014/05/02 10:12:43.357835 192.168.122.77:5060 -> 192.168.122.192:5060
SIP/2.0 200 OK..Record-Route: <sip:192.168.122.192;lr;did=108.c0119662>..Via:
SIP/2.0/UDP 192.168.122.192:5060;branch=z9hG4bKe7c.52cb9726.0..Via: SIP/2.0/UDP
192.168.122.1:5060;received=192.168.122.1;branch=z9hG4bK.0CPmTlXzE;rport=5
060..From: <sip:[email protected]>;tag=wm0dKOJVk..To:
sip:[email protected];tag=PRSHP.25474.4577..CSeq: 20 INVITE..Call-ID:
B-WyTTdMsk..Content-Type: application/sdp..Supported: timer..Allow: INVITE,
ACK, CANCEL, OPTIONS, BYE
, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH..X-TEST: Test Header..Contact:
<sip:192.168.122.77:5060>..Server: Pirate Proxy..Content-Length:
239....v=0..o=root 982256734 982256734 IN IP4 192.168.122.218..s=Asterisk PBX
11.7.0..c=IN IP4
192.168.122.218..t=0 0..m=audio 17666 RTP/AVP 0 101..a=rtpmap:0
PCMU/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101
0-16..a=ptime:20..a=sendrecv..
U 2014/05/02 10:12:43.366696 192.168.122.192:5060 -> 192.168.122.1:5060
SIP/2.0 200 OK..Record-Route: <sip:192.168.122.192;lr;did=108.c0119662>..Via:
SIP/2.0/UDP
192.168.122.1:5060;received=192.168.122.1;branch=z9hG4bK.0CPmTlXzE;rport=5060..From:
<sip:[email protected]>;tag=wm0dKOJVk..To: sip:55555@1
92.168.122.192;tag=PRSHP.25474.4577..CSeq: 20 INVITE..Call-ID:
B-WyTTdMsk..Content-Type: application/sdp..Supported: timer..Allow: INVITE,
ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH...122.77:5060>..Server: Pi
rate Proxy..Content-Length: 257....v=0..o=root 982256734 982256734 IN IP4
192.168.122.192..s=Asterisk PBX 11.7.0..c=IN IP4 192.168.122.192..t=0
0..m=audio 63074 RTP/AVP 0 101..a=rtpmap:0 PCMU/8000..a=rtpmap:101
telephone-event/8000.
.a=fmtp:101 0-16..a=ptime:20..a=sendrecv..a=nortpproxy:yes..
Notice how a portion of the contact header gets removed and '122.77:5060>' is
left behind.
Opensips information:
version: opensips 1.10.1-notls (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-FUTEX-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
git revision: 05f97a3
@(#) $Id$
main.c compiled on 10:47:11 Apr 30 2014 with gcc 4.7.2
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/219_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel