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:us...@foo.bar>.
Test: <sip:us...@foo.bar>,<sip:us...@foo.bar>.

xlog("L_INFO", "Test '$(hdr(test)[*])'\n");

produces:

Apr 25 17:11:37 siika /usr/sbin/sip-proxy[9801]: INFO: Test 
'<sip:us...@foo.bar>, <sip:us...@foo.bar>,<sip:us...@foo.bar>'

the bug is the extra space char after first comma.

-- juha

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to