Summary:ASTERISK-07381: [patch][post 1.4] Add SIP_HEADER_COUNT function and enhance SIP_HEADER to accept an index
Reporter:Anthony Minessale (anthm)Labels:
Date Opened:2006-07-21 09:33:17Date Closed:2006-08-22 10:45:32
Versions:Frequency of
Environment:Attachments:( 0) chan_sip.diff
Description:This patch adds the SIP_HEADER_COUNT(<header_name>) dialplan function.
That will return the number of times <header_name> appears in the sip headers of the given sip channel.

It also adds an optinal [,index] to the existing SIP_HEADER so you can access a paticular occurance of headers that may appear mutiple times.


Meet us at ClueCon http://www.cluecon.com/

Comments:By: Serge Vecher (serge-v) 2006-07-21 10:00:53

moving for consideration to trunk when 1.4 is branched of. In the meanwhile, it would be great to get some tests. hint, hint key2

By: Tilghman Lesher (tilghman) 2006-08-21 15:58:50

No need for this patch, as ASTERISK-7368 was merged.

By: Anthony Minessale (anthm) 2006-08-22 10:45:32

For the record:

Notice mine also had an header count function as well.
so you know if you need to look for one with a specific index or not.

static struct ast_custom_function sip_header_count_function = {
.synopsis = "Counts the instances of the specified SIP header",
.syntax = "SIP_HEADER_COUNT(<name>)",
.read = func_header_read_count,

Let the world see the arrogance of the glorious asterisk "developers" who will take thier own patch with *less* functionality any day......

Also be aware that the guy who reported this issue was shunned for asking about it and told to get out of the #asterisk-dev channel as if he was insane for wanting such a thing.  The eventual creation and adoptation of 7653 is an admission of guilt for this offense.