-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.3.caller id numbers #6655
base: 4.3
Are you sure you want to change the base?
4.3.caller id numbers #6655
Conversation
RegexList -> | ||
try | ||
RE = "^\\^\\\\\\+\\?(.*)\\\.\\+\\$", | ||
<<":", ColonList/binary>> = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would look at using kz_binary:join([convert_regex_to_caller_id()], <<":">>)
instead of the fold, personally.
@@ -68,7 +68,7 @@ caller_id_numbers(Doc) -> | |||
|
|||
-spec caller_id_numbers(doc(), Default) -> binary() | Default. | |||
caller_id_numbers(Doc, Default) -> | |||
kz_json:get_binary_value([<<"caller_id_numbers">>], Doc, Default). | |||
kz_json:get_list_value([<<"caller_id_numbers">>], Doc, Default). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec needs updating if you're fetching a list here.
Selecting a rate for an inbound call with caller_id_numbers filter was failing here:
kazoo/applications/hotornot/src/hon_util.erl
Line 258 in 1fbde96
kzd_rates:caller_id_numbers(Rate, [<<".">>]) should be returning the list of regexes but it was returning a binary instead.
Also fixed up the CSV import/export so now the export CSV has the same format as the import CSV.
When we exported a ratedeck the caller_id_numbers in the CSV were in the internal regex format and so if that file was then imported back the field was corrupted and the filter no longer worked.
The CSV format of the caller_id_numbers should be ':' seperated list of prefixes in both import and export files