Hi to all, I am playing with cidlookcup.
I put this in dialplan (order 99):
caller_id_name=${cidlookup(${caller_id_number})}
It works (looking in fusionpbx contacts and from external sources), but if the caller_id_number is unknown, of course it show UNKNOWN as caller_id_name.
In case of unknown callers, I would like to set effective_caller_id_name to caller_id_number (effective_caller_id_name=${caller_id_number}).
So, I created a dialplan rule to manage the caller name rewriting, but I dont know the right regular expression to put in the condition field in dialplan.
I tried things like (UNKNOWN) and other regex without success.
If I use regex (\w+), it works but, of course, matches any word, while I need to match only the names that containing the word UNKNOWN.
Can someone help me?
Thanks.
Edit: I reached my goal by changing the cidlookup answer, but I am still interested in understanding how regex works in fusionpbx.
I put this in dialplan (order 99):
caller_id_name=${cidlookup(${caller_id_number})}
It works (looking in fusionpbx contacts and from external sources), but if the caller_id_number is unknown, of course it show UNKNOWN as caller_id_name.
In case of unknown callers, I would like to set effective_caller_id_name to caller_id_number (effective_caller_id_name=${caller_id_number}).
So, I created a dialplan rule to manage the caller name rewriting, but I dont know the right regular expression to put in the condition field in dialplan.
I tried things like (UNKNOWN) and other regex without success.
If I use regex (\w+), it works but, of course, matches any word, while I need to match only the names that containing the word UNKNOWN.
Can someone help me?
Thanks.
Edit: I reached my goal by changing the cidlookup answer, but I am still interested in understanding how regex works in fusionpbx.
Last edited: