juice.org.ua - Kannel LDAP MSISDN provisioning patch beta

The Kannel patch info has grown, so I've decided to dedicate a page to it )

Features list:


You can download the patch here

Short summary of the patch contents: added ldap/ldap_acct.{c,h}, added a call to ldap_acct_get_msisdn() near radius_acct_get_msisdn() in gw/wap-appl.c with a preprocessor switch, added a config definition to gwlib/cfg.def; modified some lines in the Redhat init script :D and added #ifndef LDAP_PROVISIONING where needed. Also, added a small bash script with an mk() function to compile wapbox quickly, if only ldap_acct.{c,h} files were modified. //useful for the coding process )



Feel free to express your opinions about how badly the code is written to < mail at this.domain >. Frankly saying, this was my first program in `C' (not c ;). Many parts of the code are bad, and I know it (some other are bad too, but I'm not aware of that or care ;)

A small config `retries_{x,y,z}', `dummy_request_ip' and other WEIRD options explanation:

This provisioning when being developed was supposed to match the client application requirements from our carrier partner. Thus, it includes a powerful failover scheme:
x,y and z are names to different errors, each retries_* number means the number of retries before switching to the next server (yes, `servers' is a list of servers ;)
x - timeout when receiving answer to a ldap search (assumes a successful bind)
y - timeout/error when binding
z - timeout when connecting (TCP timeout)
When the provisioning module is running not on the 'first' (clearer: more primary //relating to the next one/) server in the servers list it runs a dummy check in a separate thread, to ensure reversal to the previous server, which has a higher priority, when it's back up again. dummy_request_ip option means the ip used for the search of the dummy process / can be absolutely anything, because receiving an empty result is also accepted as success.
dummy_request_interval option is quite self-explanatory.
lookup_table_size - a size (in items ;) of the ip<->msisdn cache (formally - a hash table) cache_stale_time - a time (in seconds) for the cache entry to get expired.

Have fun! #JJ


Update: the process of putting the code into the CVS tree got stuck from the very beginning and is at this state for several years already. I suppose, the problem is in Kannel's too bureaucratic "code standards", but also it is partially my fault in a missing desire for cooperation. Anyway, the code was never used in production, and everyone lost interest in it. Please note this kind of provisioning is (is it still?) used for Verizon's contractor (reseller) companies, so the patch is not totally worthless - it can help you cut the cost of your MVNO (i.e. not overpay for services of special companies in this market).