Asterisk 13 with FreePBX 13.0.197.28 ’
I’ve been struggling for some hours trying to test whether the caller’s name (retrieved from the phonebook) ends in an asterisk. Would appreciate some help please. I’ve tried 2 methods:
- REGEX
pattern="\*$"
same => n,GotoIf($[${REGEX(${pattern} ${CALLERID(name)})}]?day:accept)
For this I’ve tried various permutations of enclosing items within “” but to no avail. All fail the test and branch to accept. I know the pattern works by using an online testing tool (I’m presuming Asterisk REGEX works like Python etc). For the benefit of doubt, my log shows the caller’s name has been correctly retrieved.
- Extracting and matching the last letter
same => n,GotoIf($["${CALLERID(name):${LEN(${CALLERID(name)})}-1:1}"="*"]?day:accept)
B TW. Is there anyway to reduce the log to show just my dialplan execution steps? It would help find the errors amidst 1000s of log lines that get generated on just one call.
Thanks for reading
Alan