[Kamailio-Devel] [ openser-Bugs-2135713 ] $(hdr(Foobar)[N]) does not work for N=="*"
SourceForge.net
noreply at sourceforge.net
Mon Sep 29 11:47:05 CEST 2008
Bugs item #2135713, was opened at 2008-09-29 11:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2135713&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.4.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jerome Martin (tramjoe)
Assigned to: Nobody/Anonymous (nobody)
Summary: $(hdr(Foobar)[N]) does not work for N=="*"
Initial Comment:
Kamailio documentation states:
$(hdr(name)[N]) - represents the body of the N-th header identified by 'name'. If [N] is omitted then the body of the first header is printed. The first header is got when N=0, for the second N=1, a.s.o. To print the last header of that type, use -1, no other negative values are supported now. No white spaces are allowed inside the specifier (before }, before or after {, [, ] symbols). When N='*', all headers of that type are printed.
Here is a test case to reproduce the bug:
1/ Setup an sipp in UAC mode, with the following test headers :
Foobar: body1
Foobar: body2
2/ configure kamailio.cfg to print $(hdr(Foobar)[0]), $(hdr(Foobar)[1]) and $(hdr(Foobar)[*])
3/ result :
[Sep 29 11:52:21][24006] [1-1-463][INVITE/1] request: Header Foobar 1 is body1
[Sep 29 11:52:21][24006] [1-1-463][INVITE/1] request: Header Foobar 2 is body2
[Sep 29 11:52:21][24006] ERROR:core:pv_get_hdr: local buffer length exceeded
[Sep 29 11:52:21][24006] [1-1-463][INVITE/1] request: Header Foobar * is <null>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2135713&group_id=139143
More information about the Devel
mailing list