<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm kind of under the impression that&nbsp;$(hdr(name)[N]) will return the body of the Nth instance of the header. &nbsp;At least that's what the documentation states.<div><font class="Apple-style-span" color="#666666" face="'Trebuchet MS', sans-serif, Verdana, Arial" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 21px;"><b><br></b></span></font></div><div><span class="Apple-style-span" style="color: rgb(24, 86, 98); font-family: 'Trebuchet MS', sans-serif, Verdana, Arial; font-size: 14px; font-weight: bold; line-height: 21px; ">3.82&nbsp;SIP Headers</span></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Verdana, Arial; color: rgb(102, 102, 102); font-size: 13px; font-weight: bold; line-height: 21px; "><span class="Apple-style-span" style="font-weight: normal; "><strong>$(hdr(name)[N])</strong>&nbsp;- 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.</span></span></div><div><font class="Apple-style-span" color="#666666" face="'Trebuchet MS', sans-serif, Verdana, Arial" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: 21px;"><b><br></b></span></font></div><div><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Verdana, Arial; color: rgb(102, 102, 102); font-size: 13px; font-weight: bold; line-height: 21px; "><span class="Apple-style-span" style="font-weight: normal; "></span>&nbsp;</span><br><div><div>On Feb 24, 2010, at 5:42 PM, <a href="http://SourceForge.net">SourceForge.net</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Bugs item #2958254, was opened at 2010-02-24 17:42<br>Message generated for change (Tracker Item Submitted) made by rshpount<br>You can respond by visiting: <br><a href="https://sourceforge.net/tracker/?func=detail&amp;atid=1086410&amp;aid=2958254&amp;group_id=232389">https://sourceforge.net/tracker/?func=detail&amp;atid=1086410&amp;aid=2958254&amp;group_id=232389</a><br><br>Please note that this message will contain a full copy of the comment thread,<br>including the initial issue submission, for this request,<br>not just the latest update.<br>Category: core<br>Group: None<br>Status: Open<br>Resolution: None<br>Priority: 5<br>Private: No<br>Submitted By: Roman Shpount (rshpount)<br>Assigned to: Nobody/Anonymous (nobody)<br>Summary: Comma separated headers are not parsed by $hdr<br><br>Initial Comment:<br>When comma separated headers, such as "Allow: INVITE, ACK, CANCEL, BYE" are accessed using $hdr script variable, they are presented as a single header. In other words, $hdr(Allow) returns "INVITE, ACK, CANCEL, BYE" and $(hdr(Allow)[1]) returns &lt;null&gt;. Expected behavior is to return "INVITE" and "ACK" respectively.<br><br>To reproduce, see the output of<br><br>xlog("L_INFO", "TRACE:TEST: $hdr(Allow)\n");<br>xlog("L_INFO", "TRACE:TEST: $(hdr(Allow)[1])\n");<br><br>while processing almost any Register message.<br><br><br>----------------------------------------------------------------------<br><br>You can respond by visiting: <br>https://sourceforge.net/tracker/?func=detail&amp;atid=1086410&amp;aid=2958254&amp;group_id=232389<br><br>_______________________________________________<br>Devel mailing list<br>Devel@lists.opensips.org<br>http://lists.opensips.org/cgi-bin/mailman/listinfo/devel<br></div></blockquote></div><br></div></body></html>