[ASTPPCOM-543] Number Translation on Switch - Gateway menu Created: 12/Aug/19  Updated: 27/Oct/19  Resolved: 26/Oct/19

Status: Done
Project: ASTPP Community
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature
Reporter: horselessname Assignee: Samir Doshi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have two gateways from two different providers, both using Tech Prefix for auth.
If i use the menu "Carriers - Trunk" and set the second one as "Failover GW ASTPPCOM-2" it'll not work because Number Translation is set for the first try only, and the Tech Prefix for the second try is different from the first one...

The only option i could think of is "Dialplan Variable" but i added 55/TechPrefix55 like i did on Number Translation for the trunk and did'nt work.

Help ?



 Comments   
Comment by Samir Doshi [ 26/Aug/19 ]

Hi [~HorselessName]

In your case, you will require to setup 2 trunks and under each trunk set 1 gateway and in rate group select both trunks.

For number translation, you can use prepend and strip field in termination rates or use localization concept and select it in provider.

That will resolve your issue.

Comment by horselessname [ 16/Sep/19 ]

Hello... [~smrdoshi]
Unfortunately the prepend field will not help in this scenario.
For example, i need to call to 5541991919191 and the first try goes to one provider...
The failover goes to another provider...

Even if i insert the tech prefix for the first provider, let's say 91915541991919191, if the call fails and goes to the second provider on the failover, the number that'll go to that provider is 91915541991919191, and that prefix is different from the prefix of that provider.

It would be nice if we could add a prefix directly to the provider... If we have multiple providers with different prefixes, we aren't going to be able to differ which is which...

Comment by Mike (Inactive) [ 16/Sep/19 ]

Hello,

[~smrdoshi] is right, I've been using on version v3.6 without a problem. Setting up number translation at each trunk and setting multiple trunks in rate groups does the fail-over with correct prefix for each provider. I don't know if it's the same on the latest version.

Comment by horselessname [ 17/Sep/19 ]

Mike It is'nt doing the fail-over here...
I configured three trunks with specific number translation on each ( Each trunk is configured to do one try only on the provider gateway tho, since each provider gave me one ip only ), and selected them all in the same rate group, but the call does'nt pass to the next selected trunk when the call fails...

If i remove the number translation and set multiple trunks on one gateway, the failover works. It goes to the second try but the provider receives the wrong tech prefix...

How did you do that? Mike Each trunk you have is trying one time only, right?
Like this:
First trunk: https://i.imgur.com/WccVF0z.png
Second trunk: https://i.imgur.com/3kyBAqP.png
Rate Group with both selected: https://i.imgur.com/2iRTL0Q.png

What can i do?

Comment by horselessname [ 17/Sep/19 ]

First trunk:

Second trunk:

Rate group with both selected:

Comment by Mike (Inactive) [ 17/Sep/19 ]

Hello [~HorselessName] ,

As I said, I only tried this on version 3.6 and it's working correctly. I assume that hasn't changed in v+4.
One thing I suggest doing is to check on your freeswitch logs, in the linux console "fs_cli", you can easily check if it's working as the logs clearly state if translation is happening on each call.
Also, I noticed something that could be make a difference. The number translation format you use does not have "". You could try adding them to see if it makes a difference. For example:

"1/3223ASTPPCOM-1"

If you need multiple translations, separate with commas like this:

"1/3223ASTPPCOM-1","9999/3223#"

I have this currently working so I know it works on v3.6. I hope nothing changed on +v4

Comment by horselessname [ 19/Sep/19 ]

Mike @smrdoshi
Ok. I tried selecting the two trunks and i also tried using the way you said, using "" and , to separate the prefixes...

I found the problem. When the ASTPP receives 503 Service Unavailable, the Failover works... It jumps correctly to the next termination.
But if the termination sends 603 Declined, the failover does'nt happen.
When a termination returns to the ASTPP 603, the system does a hangup...

Is there a place on FreeSwitch or ASTPP where i can add more codes for the failover proccess?

Comment by horselessname [ 19/Sep/19 ]

Below a image of my monitoring (Ignore the REJECTED message, i just configured a test on my Asterisk to check what codes the ASTPP needs to receive in order to make the failover):

Generated at Sat Feb 10 07:18:07 CET 2024 using Jira 8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a.