Solved Help needed for routing outbound traffic to the correct provider

Status
Not open for further replies.

Mohamed Bile

Forum User
Joined
Jan 5, 2022
Messages
6
Reaction score
1
Hello everyone,

I have set up a 3cx on our promise and connected to Dinstar UC2000-VF gateway with 16 SIM ports, I am a newbie here as this is my first time using 3cx. At the moment, I have 4 sim cards on the gateway from two local providers(2 sim cards each). Inbound calls are working as expected but outbound calls are not routed correctly. for example, when I want to call a number from operator 1 and dial the number (i.e 0615139440) from 3cx web client, it is routed to operator 2 sim cards and I get the number is not valid(as the two operators are not interconnected, they can not call each other) and vice versa. If it helps, the only difference is the third digit for example numbers from operator 1 start with 061, and the numbers of operator 2 start with 062, the length is the same (10 digits each, when it is local format). I have tried to create two different outbound and two different trunks but it does not seem to be working. I have tried to search online and on the forum but to no avail. All I want is to be routed all calls to operator 1 to sim cards belonging to operator 1 and vice versa. Any help would be much appreciated.

Thank you in advance.
 
Not having used that gateway, I don't know it's capabilities. To be able to route to a specific SIM, you would have to create an individual trunk, on both the gateway, and in 3CX , for each SIM.

For that to happen, the gateway must allow each to be assigned a different local port, to allow calls to be routed to each. There are some gateways (Grandstream PSTN) that allow a different prefix to be sent when "selecting" which line that call will go out on. You'd have to check to see if that option is available on your gateway.

Once you have created individual trunks, you can then create outbound rules, for each, based on the number dialed.

It sounds as if you currently have it set as 4 SIMs per trunk, and the gateway is choosing which SIM to use.
 
Last edited:
Not having used that gateway, I don't know it's capabilities. To be able to route to a specific SIM, you would have to create an individual trunk, on both the gateway, and in 3CX , for each SIM.

For that to happen, the gateway must allow each to be assigned a different local port, to allow calls to be routed to each. There are some gateways (Grandstream PSTN) that allow a different prefix to be sent when "selecting" which line that call will go out on. You'd have to check to see if that option is available on your gateway.

Once you have created individual trunks, you can then create outbound rules, for each, based on the number dialed.

It sounds as if you currently have it set as 2 SIMs per trunk, and the gateway is choosing which SIM to use.
Hi leejor, Thank you for the response. I will try to configure two trunks on the 3cx and the gateway.
 
Yes. One trunk = two SIMs from Provider A, and second trunk = two SIMs from Provider B
 
Yes. One trunk = two SIMs from Provider A, and second trunk = two SIMs from Provider B
Do I need also need to create two outbound rules? Or one is enough for the outbound rules?
 
You will need as many outbound rules as you have different destinations. So if you want all numbers starting with 061 to go to one provider, then that is one rule. You'd then need another rule for number starting with 062., to route to the other provider.

You would also have to consider any other number format, that people might dial, including emergency numbers, then direct them to the appropriate trunk.

Remember that rules are read from the top down, and will match to the first one, the call encounters. So if you also dial numbers that start with 06, and another digit, you will want to place that rule below the other, specific rules.

If the GSM gateway is your only outside trunking, and some numbers can route on either, then you can use both trunks in the same rule, where one will be used if the other is all busy. To load balance, you may want to reverse the order in some rules.

This link deals with rules, in an older 3CX version (and really needs to be updated), but might help...

https://www.3cx.com/blog/voip-howto/outbound-rules-a-complete-example/
 
Last edited:
Thank you @leejor for the help and guidance. I was able to resolve the issue.
 
Great, Glad to hear it worked out for you.
 
  • Love
Reactions: Mohamed Bile
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,475
Latest member
lastshadow