Bug #195
CID rules operator
| Status: | Closed | Start: | 10/11/2009 | |
|---|---|---|---|---|
| Priority: | Urgent | Due date: | 10/16/2009 | |
| Assigned to: | patrick_elx | % Done: | 100% |
|
| Category: | - | |||
| Target version: | Caller ID Superfecta v 2.2.1 Maintenance Release |
Description
when I'm using the | and + operator I have the following problem.
If I'm using the following pattern:
33+0|ZXXXXXXXX
everything is working fine.
Now if I'm using
0|33+ZXXXXXXXX
The number is properly matched and transformed, however in the debug window I have numbers written between
"CID matching enabled..." and "Valid CID:"
The debug "Returned Result would be:" is correct however, in non debug mode, the CID name is prefixed with the series of number that were displayed between "CID matching enabled..." and "Valid CID:"
I haven't investigated further yet.
But as for now, I would recommend to only use the | before the + in the CID rules (maybe modify the help fly by text).
History
Updated by tshif over 2 years ago
- Due date set to 10/16/2009
- Status changed from New to Reviewed
- Assigned to set to jacobsj
- Target version set to Caller ID Superfecta v 2.2.1 Maintenance Release
Patrick - with luck Jeremy will have time to look into this also. I think this is important enough to hold release for if we cant get it fixed quite in time. I `assigned` to Jeremy so it will show up on his "my projects" screen - but you of course are welcome to continue to work on it.
Updated by jacobsj over 2 years ago
Ok, I couldn't find an Asterisk pattern matching function written in PHP anywhere, so I made my own from scratch. Not being a pattern matching expert, I expected for bugs to be found in it.
I have a question though, when doing pattern matching, isn't it a left to right search or do certain elements (or characters/functions) receive priority?
If it is strictly left to right, then the second pattern you specified should never work because it would be looking to drop a leading zero followed by "33", then adding some numbers.
Does the second variant of the function work elsewhere in asterisk?
Updated by patrick_elx over 2 years ago
asterisk accepts both pattern. But I have no problem if we restrict the pattern to have the | before the +. We just need to change the help comment to explain it.
Updated by tshif over 2 years ago
- Status changed from Reviewed to Assigned
- % Done changed from 0 to 60
I am comfortable with that limitation - provided we update the flyby text as Patrick suggests.
Thats not to say that it wouldnt be nice for it to perfectly mimic Asterisks behavior - because it would be, but its not worth holding release for - if we ever make the change at all.
Updated by jacobsj over 2 years ago
- Status changed from Assigned to QA Testing
- % Done changed from 60 to 80
Ok, apparently today is the day I find all my retarded mistakes. The cause of this appears to be a print statement in my pattern matching function that was used for debugging and I forgot to remove when finished.
Updated by tshif over 2 years ago
- Assigned to changed from jacobsj to patrick_elx
Updated by tshif over 2 years ago
- Priority changed from High to Urgent
Updated by patrick_elx over 2 years ago
- Status changed from QA Testing to Closed
- % Done changed from 80 to 100
It's working for me.
Thanks