Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: v5.0
-
Labels:
-
Reproducibility:always
-
Category:Functional
-
Edition:Community
Description
Hello team!
the problem occurs when using package and localization. For example. I want to have a package of 1000 free minutes to Argentina Mobile. the e.164 format for that destination is 549xxxxxxxxxx (54 AR country code and 9 for mobiles).
This is the prefix we have either in origination and termination rates. the customers does not dial in e.164 format of course, they dial like 1530571422 for a local Buenos Aires mobile and after passing the localization that number becomes 5491130571422 (e.164 format) and then, to the gateway...
Now the problem is when we want to use package. As you now, the package uses the prefixes defined in the origination rate, in this case 549 form AR Mobile...
Seeing the debug in FS, you have the following:
2021-10-13 13:54:22.560093 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_PACKAGE_INFO] Query :SELECT *,P.id as package_id,P.product_id as product_id FROM packages_view as P inner join package_patterns as PKGPTR on P.product_id = PKGPTR.product_id WHERE (patterns = '^1530571422.' OR patterns = '^153057142.' OR patterns = '^15305714.' OR patterns = '^1530571.' OR patterns = '^153057.' OR patterns = '^15305.' OR patterns = '^1530.' OR patterns = '^153.' OR patterns = '^15.' OR patterns = '^1.' OR patterns ='--') AND accountid = 15 ORDER BY LENGTH(PKGPTR.patterns) DESC
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Package ID : 4
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Product ID : 2
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Package Type : 1 Call Direction : outbound [0:inbound,1:outbound,2:both]
2021-10-13 13:54:22.560093 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_COUNTER_INFO] Query :SELECT used_seconds FROM counters WHERE accountid = 15 AND package_id = 4 AND status=1 LIMIT 1
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Remaining minutes : 999
2021-10-13 13:54:22.560093 [NOTICE] switch_cpp.cpp:1365 [ASTPP] package_id : 4
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] =============== Account Information ===================
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] User id : 15
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Account code : 5270874382
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Balance : 746
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Type : 1 [0:prepaid,1:postpaid]
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] Ratecard id : 4
2021-10-13 13:54:22.560093 [INFO] switch_cpp.cpp:1365 [ASTPP] ========================================================
2021-10-13 13:54:22.560093 [DEBUG] switch_cpp.cpp:1365 [ASTPP] [GET_LOCALIZATION] Query :SELECT id,in_caller_id_originate,out_caller_id_originate,number_originate FROM localization WHERE id = 1 AND status=0 limit 1
2021-10-13 13:54:22.560093 [NOTICE] switch_cpp.cpp:1365 [ASTPP] [DONUMBERTRANSLATION] Before Localization CLI/DST : 1530571422
2021-10-13 13:54:22.560093 [NOTICE] switch_cpp.cpp:1365 [ASTPP] [DONUMBERTRANSLATION] After Localization CLI/DST : 5491130571422
As you can see, package match occurs before localization and it does not find any coincidence. The question is: Is there any way to do the package match after the localization [DONUMBERTRANSLATION]?
Thank you!!