Courtesy of Henning Westerholt and 1&1, carrierroute module got a bunch of new features that makes the module more flexible than ever and also fixed a few annoyances in the module usage:
1. Improved routing data loading
The module supports now the partioned loading of routing data during startup and reloads. In the past when one want to load big route set it was necessary to increase the private memory pool size, as the data was stored temporarily there. Now this is not necessary anymore, its possible to load route sets with e.g. 400.000 rules in the standard (private memory) configuration.
2. Efficient matching of domains and carriers
In the old implementation a simple linear list was used, this was replaced with a fast binary search function. The module can now look up carrier and domains in most cases with O(log n), which makes it more scalable when a big number of carriers and/ or domains are involved. Only when a dynamic string is used in the config script a full list search is needed.
3. Support for non-numerical prefix matching
Carrierroute now supports also the prefix matching with non-numerical characters. Its possible to use the entire standard ascii charset for route matching. This is configurable with a module parameter, the default implementation is still the know digit matching method. Please keep in mind that memory demands will increase somewhat when the extended matching is used. This additonal flexibility will probably bring a small overhead with it, as some additional logic is involved during the routing deciscion. But this will not be noticable on today standard servers.
4. Extensive refactoring and cleanups
Restructured and refactored the code in most areas, to make the module implementation and structure more understandable, maintainable and extensible. Replaced the usage of custom datatypes and fixup functions with the standard core implementation, switched to the autogenerated DB interface and use now standard glibc functions e.g. for the list search. Changed certain structures to not store the full name of carriers and domains in memory to save space and got finally rid of this mismatch between internal and external carrier ID.
More details about the new implementation can be found in the documentation at:
Porting hints, e.g. for the new database structure are provided at:
Track the new features introduced in Kamailio devel at: