Summary: | ASTERISK-08713: FIELDQTY() does not parse as expected | ||
Reporter: | Leif Madsen (lmadsen) | Labels: | |
Date Opened: | 2007-02-01 12:55:33.000-0600 | Date Closed: | 2007-02-01 15:23:53.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Functions/func_strings |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 8965.patch | |
Description: | While trying to determine the number of fields passed back from the HASHKEYS() function, I found that it will always return 0 when it should return a number greater than 0. Example: exten => s,n,Set(HASH(access_control)=${ACCESS_CONTROL_DATA(${USER_ID})}) exten => s,n,Set(NUM_FIELDS=${FIELDQTY(HASHKEYS(access_control)|\,)}) ${NUM_FIELDS} == 0 exten => s,n,Set(MY_VAR=foo\,bar) exten => s,n,Set(NUM_FIELDS=${FIELDQTY(MY_VAR|\,)}) ${NUM_FIELDS} == 2 exten => s,n,Set(X=1) exten => s,n,Set(HASH(access_control)=${ACCESS_CONTROL_DATA(${USER_ID})}) exten => s,n,Verbose(1|${CUT(HASHKEYS(access_control),\,,${X})}) CUT() works as expected (returns value of first field in HASHKEYS) | ||
Comments: | By: Tilghman Lesher (tilghman) 2007-02-01 13:38:42.000-0600 Fixed in 53069,53070,53071. |