On the Customer side I use a default localization to find the origination rate
CUT 011 ADD (nothing)
On the provider side I use provider specific localization e.g. Silver, Gold, etc…
Silver CUT * ADD 00123 (provider prefix)
Gold CUT * ADD 99907 (provider prefix)
If the call works with the silver route, there is no problem
SILVER (OK)
[DONUMBERTRANSLATION] Before Localization CLI/DST : 01149891234567
[DONUMBERTRANSLATION] After Localization CLI/DST : 0012349891234567
However, if the call fails over to the secondary gold route, gold route localization starts with the number created AFTER localization during the silver route call attempt.
Is this a bug? How do I remove the 00123 silver prefix and add the 99907 gold prefix
GOLD failover
[DONUMBERTRANSLATION] Before Localization CLI/DST : 0012349891234567
[DONUMBERTRANSLATION] After Localization CLI/DST : 999070012349891234567
Do I really have to cut on the termination side all prefixes of any provider in the system? Would that even work?
I worked on this a bit more. As far as I can tell, I have to remove the previous localization everytime the calls fails over to a new route. So if
carrier A adds prefix 999
carrier B adds prefix 888
carrier C adds prefix 777
and the call skips A and jumps to carrier B then I need to cut 999 and add 888
If the call fails both A, B and jumps to carrier C, then I cut 999, 888 and add 777
I am thinking this might be easier to accomplish with the prepend string in the rates.
Any comments?
1 Like
Nope. That doesn’t work. There is something inherently wrong with localization. It seems to go in a loop and adds the prefix multiple times.
Before Localization CLI/DST : 09990215614443333
After Localization CLI/DST : 001110315614443333
→ should stop here but it continues!
Before Localization CLI/DST : 001110315614443333
After Localization CLI/DST : 0011103001110315614443333
@dcitelecom share the complete call log in pastbin. We will check it out.
How is it supposed to work when a call fails over to the next route? Is there a special syntax required in localization to account for multiple providers? Maybe I am doing something wrong since I can’t be the only one using multiple providers failing over to the next route?
I have 3 providers defined, each with their own localization. In the rate group I assigned the 3 provider trunks and if a call fails with provider A it tries to use provider B or C. However, it does not correct the localization from one provider to another. This behaviour should be easy to duplicate as well.
OK. Resolved. The ‘do number translation’ code in astpp.functions.lua was repeating steps 7 to 11 for each element in the tmp
table and by translating each entry it caused the doubling of prefixes. To make it work (for my case) I stop the loop after the first successful wildcard translation
by checking the variable ‘local translated’’ before translation (see below)
‘if (prefix == tmp_str[1] or tmp_str[1] == ‘*’) and not translated then’
Still testing but seems ok now.