Juha Heinanen writes:
wiki was this related to $(hdr(name)[N]):
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. In case of a
comma-separated multi-body headers, it returns all the bodies,
comma-separated.
i don't understand the last sentence. how can i get all bodies of all
headers of name=x as a comma separated list?
perhaps the above "In case" sentence should read:
In case of comma-separated multi-body headers, $(hdr(name)[*]) returns
all the bodies, comma-separated.
while testing this, i found a bug. when incoming request has
Test: <sip:user1@foo.bar>.
Test: <sip:user2@foo.bar>,<sip:user3@foo.bar>.
xlog("L_INFO", "Test '$(hdr(test)[*])'\n");
produces:
Apr 25 17:11:37 siika /usr/sbin/sip-proxy[9801]: INFO: Test
'<sip:user1@foo.bar>, <sip:user2@foo.bar>,<sip:user3@foo.bar>'
the bug is the extra space char after first comma.
-- juha