Skip to content
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

fix hotornot crash when caller_id_numbers is in filter_list #6633

Closed
wants to merge 2 commits into from

Conversation

kageds
Copy link

@kageds kageds commented Sep 25, 2020

Fix hotornot crash when caller_id_names is present in system_config/hotornot/filter_list

Before fix:

[root@d1k1 ~]# sup hotornot_maintenance rates_for_did 00447800000000 
Candidates:
                                     RATE NAME |   COST | INCREMENT |   MINIMUM | SURCHARGE |    WEIGHT |          PREFIX |   RATEDECK NAME |         VERSION |
                            outbound_GB_447891 | 0.0102 |        60 |        60 |       0.0 |        59 |          447891 |        ratedeck |                 |
                              outbound_GB_4478 | 0.2237 |        60 |        60 |       0.0 |        18 |            4478 |        ratedeck |                 |
                                outbound_GB_44 | 0.0035 |        60 |        60 |       0.0 |        20 |              44 |        ratedeck |                 |
                                 inbound_UK_44 |    0.0 |        60 |        60 |       0.0 |        20 |              44 |        ratedeck |                 |
Command failed: {'EXIT',{function_clause,[{knm_converters,normalize,[undefined],[{file,"src/converters/knm_converters.erl"},{line,101}]},{hon_util,matching_rate,3,[{file,"src/hon_util.erl"},{line,213}]},{lists,'-filter/2-lc$^0/1-0-',2,[{file,"lists.erl"},{line,1286}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{hotornot_maintenance,rates_for_did,4,[{file,"src/hotornot_maintenance.erl"},{line,83}]},{sup,in_kazoo,4,[{file,"src/sup.erl"},{line,98}]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,197}]}]}}

After fix:

[root@d1k1 ~]# sup hotornot_maintenance rates_for_did 00447800000000 
Candidates:
                                     RATE NAME |   COST | INCREMENT |   MINIMUM | SURCHARGE |    WEIGHT |          PREFIX |   RATEDECK NAME |         VERSION |
                            outbound_GB_447891 | 0.0102 |        60 |        60 |       0.0 |        59 |          447891 |        ratedeck |                 |
                              outbound_GB_4478 | 0.2237 |        60 |        60 |       0.0 |        18 |            4478 |        ratedeck |                 |
                                outbound_GB_44 | 0.0035 |        60 |        60 |       0.0 |        20 |              44 |        ratedeck |                 |
                                 inbound_UK_44 |    0.0 |        60 |        60 |       0.0 |        20 |              44 |        ratedeck |                 |
Matching:
                                     RATE NAME |   COST | INCREMENT |   MINIMUM | SURCHARGE |    WEIGHT |          PREFIX |   RATEDECK NAME |         VERSION |
                          * outbound_GB_447891 | 0.0102 |        60 |        60 |       0.0 |        59 |          447891 |        ratedeck |                 |
                              outbound_GB_4478 | 0.2237 |        60 |        60 |       0.0 |        18 |            4478 |        ratedeck |                 |
                                 inbound_UK_44 |    0.0 |        60 |        60 |       0.0 |        20 |              44 |        ratedeck |                 |
                                outbound_GB_44 | 0.0035 |        60 |        60 |       0.0 |        20 |              44 |        ratedeck |                 |
ok

@jamesaimonetti
Copy link
Member

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants