FYI: A new ser module which could probably easily ported to openser too (if someone needs this feature)
regards klaus
-------- Original Message -------- Subject: [Serdev] Contributing new module "prefix_route" to SER Date: Wed, 25 Apr 2007 16:52:39 +0200 From: Alfred E. Heggestad aeh@db.org To: serdev@iptel.org
Hi
Here is a contribution to the SER community; a new module called "prefix_route" that does prefix-based routing from rules stored in the database.
The work was sponsored by my employer, Telio Telecom.
The source code is attached, and can also be downloaded from here:
http://aeh.db.org/patch/prefix_route-20070425.tar.gz
The module has been tested with ser-0.9.6 and ser-0.9.7-pre8 from CVS. It could also be ported to SER 2.0 if there is any interest.
The idea with this module is to move the logic of selecting PSTN gateway from ser.cfg to the database. In the database you will have a table called e.g. "prefix_route" which has one entry per rule, matching a prefix to a route number:
prefix route ------ -----
0045 -> route 3 0046 -> route 4 0047 -> route 5
for incoming requests, you can call the prefix_route() function in your ser.cfg - it will then try to match the username part of the request-uri to the "best" prefix, i.e. closest match. if there is a match, it will jump to that routing block in ser.cfg. all referenced route numbers must be declared in ser.cfg, otherwise it will not load. The prefix_route table is populated from the DB at boot or with the "prefix_reload" FIFO command, into a RAM-based tree that is used in execution time.
For more documentation, please see the README file ;)
I hope that this module will be useful for you, any feedback will be appreciated!
/alfred
_______________________________________________ Serdev mailing list Serdev@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serdev
On Montag, 30. April 2007, Klaus Darilion wrote:
FYI: A new ser module which could probably easily ported to openser too (if someone needs this feature)
I did a quick look into this module. The fifo functions needs to be changed to the mi interface, and the module interface must be a little bit adapted, but otherwise a porting should not so difficult. Its a small module after all.
Cheers,
Henning