Caller id issue: SOLVED

ou812

Member
Nov 2, 2016
115
13
18
63
FSpbx 1.9.6

On 1 sub domain half the phones can not call out, I found it to be a caller id issue, all phones are set with the same caller id number & name but when some of the phones call out the caller id number is set for the extension number and not external number, the other phones use the external number.

I have deleted the extensions and recreated inserting the original sip passwords so phones will reregister, set the caller id, flushed the cache and reloaded the xml but they still use extension number as outbound cid number ?

This started after an update last night, maybe somehow the database is a bit off.
 
Not sure why but making a change to the outbound routes fixed the issue. I had set Route Options - Toll Allow - domestic. removing domestic fixed the cid issue ?
 
@ou812 I find the whole "toll allow" thing to be unnecessarily confusing. I've ended up beating my head against the wall until I just removed all entries in the toll allow fields on extensions. I suspect a serious study of documentation would grant more insight for me, but it really isn't needed in my environment.

I think the bottom line is that if you put a toll allow class on a route, you have to have that on the extension as well. You can have multiple toll allow types on each extension if they needed somethings like domestic, international for example. You'd have to modify the rules or directly modify the XML for the route to match the toll-allow class you set up since the route GUI does not directly address the toll-allow field except possibly through the rules screen.

This FusionPBX document explains it to a degree: https://docs.fusionpbx.com/en/latest/additional_information/toll_allow.html

@pbxgeek, how do you handle toll allow to limit extension access to routes? The route screen could be a lot easier if there was a table-driven drop-down selection of things like: internal-only, local, toll, international and so forth. Said table could be set up by the administrator in terms they decide and would be selectable in multiples on an extension and for the outbound routes. Am I missing something here or does that function not exist as an easy GUI selection? I see it is there when you create an outbound route but changing it after creating the route is pretty much manual.
 
Last edited:
@pbxgeek here is a little AI assisted design to set up a table for various toll restriction/toll-allow tables and use a resulted total value of all types selected for the route to do a simple <= or >= against the numeric result to determine which calls can pass on the outbound route. Obviously, the more types of toll allow are added, the higher the value for the additional selections. Using numeric values would be more efficient to test than trying to match text.

This is a classic bit-flag (or bitmask) design. Assign each row a distinct power of 2. When any combination of rows is selected, you simply add (or bitwise-OR) their values; the resulting number uniquely identifies exactly which rows were chosen.

Recommended values​

SequenceDescriptionValue
1Internal Only1
2Local2
3Toll-Free4
4Toll8
5International16
Using 1, 2, 4, 8, 16 is the conventional and most convenient approach.

How it works​

  • Single selections are just the value itself.
  • Multiple selections → sum (or ) the values. Examples:
    • Local + Toll-Free → 2 + 4 = 6
    • Internal Only + International → 1 + 16 = 17
    • Local + Toll + International → 2 + 8 + 16 = 26
    • All five → 1+2+4+8+16 = 31
Because every number from 0–31 has a unique binary representation, you can always recover exactly which flags were set:
text
value & 1 → Internal Only selected
value & 2 → Local selected
value & 4 → Toll-Free selected
value & 8 → Toll selected
value & 16 → International selected
 
I agree this has always been mind boggling.

End users really just want thing - a tick box with "allow all, allow local, allow internal" only. I am sure that making that work under the hood is tricky because outbound routes are not standard. We for example have 2 routes for international - one that uses grey routing where a user dials 00 first to indicate international, and another one that invokes a normal route upstream. For that, customer dial a prefix before the 00.
 
There have been no changes to how Caller ID works for extensions in over a year.
If you set it up on the extension itself, those are the values passed unless you override them in your dialplan. I tested with the vanilla dialplan that ships with FS PBX just now and received an expected result.

If you don't set one up on the extension and it uses "Main Company number," then it will use the one set up in the dialplan - DEFAULT CALLER ID.
@pbxgeek, how do you handle toll allow to limit extension access to routes?
We haven't touched on this subject just yet. In my imagination, it would require storing regex for domestic and international phone numbers. For each country, domestic vs international may differ a lot. For US calling, Europe is considered international, but for someone in Europe, it might be a domestic call
 
it would require storing regex for domestic and international phone numbers.
Why would it if you have separate routes based on the number dialed. Like in the USA, typically a domestic toll number starts with "1". This separates the dial plan from local calls which are only 7-digits but don't start with"1". I know international numbers are non-standard but if you set up the routes to respond to particular toll-allow codes that the system admin can set up, on both the routes and extensions, it shouldn't be that hard to figure out. I've started studying the FreeSwitch toll-allow stuff and the only thing I dislike is that you have to use text descriptions that could be mistyped and mess things up. That's where a drop-down selection box that allows multiple selections could be very helpful. The drop down box would have text items the system admin has created.

For example, my outbound routes are pretty straight forward. I do not have 10-digit dialing since I am in a small area code that still has 7-digit calling. This way, it is easy to determine which route is needed for each number dialed. I even have a different route for toll-free because I get money back for toll-free calls from my vendor.

1785530599179.png
 
Last edited: