SOLVED Specific outbound rules

Status
Not open for further replies.

albert-g

Member
Aug 11, 2020
83
2
8
43
Hello,
I have two outbound routes, one of it to call with international codes like (0033.. FR, or 0041 SW), and also have one rule with 10 digit, so I can call not using international code in my country, and with 041.. (France) directly, I think I can use such rule, because I am using siptrunk from my country, so this calls can be handled, but what if one my customer from another country, and he want to call with internal codes (like in Switzerland it is 0225...), and not use international code (in same Switz. 0041 225...). Can I somehow create such route, specific for my customers.
I suspect, maybe the logic should be "If I call 0225.. change this to 0041 225 and then send to siptrunk", so my siptrunk operator can handle this. Or if there is another way, please advise.
 

albert-g

Member
Aug 11, 2020
83
2
8
43
I do not fully understand your question, but I think you may find the answer in some creative regex for your outbound route. The post below may give you some inspiration:

https://www.pbxforums.com/threads/regex-for-one-single-outbound-route-uk.3819/
Thanks Adrian, I'll take a look.
But to be understood, let me explain by example.

My siptrunk operator is from France, customer-1 from France, customer-2 from Switzerland. France international code is +33 (0033) then number, Switzerland +41 (0041). I have two outbound routes, first allow to call by international codes to everywhere, second allow me to call in France, not using international code (for ex. instead of 0033 656565656, I can call 0656565656). customer-1 from France and he dont have a problem, he can call in France using internal number (without internation code), and he also can call everywhere using international codes.
1600411310729.png
But customer-2, from Switzerland, also can call everywhere, using their international codes, my question was, can I somehow allow him to call in Switzerland not using international codes and using internal number, like customer-1 who is in France. (instead of 0041 232323232, call to 0232323232).
In the end I should have some route/or group of routes, which will allow, my customers from different countries, call in their country without international codes, but using the same siptrunk.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,388
364
83
Ok, I understand. Yes, probably the simplest way is in the domain for the Swiss customer, set the out bound routes up in the same way that you have for France substituting the 33 for 44, and then in the route that allows 0232323232 put 0041 in front of the $1 in the bridge statement. Example screenshot below (not tested) :

Screenshot from 2020-09-18 10-03-57.png
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
43
The thing is that I dont change anything, and nowhere I set 33 to change to 41. I just created two default routes with 10digits, and d917. And when I adding 0041 that you showed, in my 10 digit route, it stop working.

This one is allow me to call by international codes.
1600423534537.png

This one to call internally, but only in France numbers case.
1600423588713.png

Wherever I added 0041, it is stop working :(
 

albert-g

Member
Aug 11, 2020
83
2
8
43
The problem was solved, once again you helped me , everything working as expected.
Thank you so much.
 
Status
Not open for further replies.