Patches item #1689036, was opened at 2007-03-27 17:50 Message generated for change (Comment added) made by osochebol You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1689036&group_id=139143
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: modules Group: ver devel Status: Closed Resolution: Accepted Priority: 5 Private: No Submitted By: Carsten Bock (carstenbock) Assigned to: Daniel-Constantin Mierla (miconda) Summary: Enhanced dispatcher-module Initial Comment: Hi everybody, I have attached a modified OpenSER 1.1 dispatcher-module. This modified version has the following, additional functionalities: - a method called ds_is_domain([group]): This function allows to check if a domain is in a specific group (e.g. ds_is_domain("1") for checking if a host is in group 1) or if it exists in the list at all (e.g. ds_is_domain()). This function reduces the configuration complexity, because we only have to add a host to the dispatcher-list instead of editing for example a check for specific hosts in the routing logic (e.g. to disable the PIKE-Check for hosts in that list). - some new methods for choosing a gateway/proxy: a) You may now do a hash over the authentication-username (or round-robin, if no authentication-username was found) b) You can prefix the value you want to generate the hash on. This prefix will then be removed. - a new state for a gateway: You may now set a gateway to a probing mode (after a definable threshhold) by calling ds_mark_dst("p"). If a gateway/proxy fails several times (per default three times), it will be removed from the routing and be probed: The Proxy will send an OPTIONS-Request to the proxy/gateway and if it receives a "successful" reply (200 OK or 501 Not implemented) it will be automatically reactivated. We accept "501 Not implemented" as well, because some Cisco gateways do not support the OPTIONS-Request and reply with a "501 Not implemented". This functionality requires the TM-Module and can be disabled in the makefile. The documentation (SGML-Files) has been updated to this extended functionality. In the following weeks i will port/merge it to OpenSER 1.2/SVN-latest. Carsten ---------------------------------------------------------------------- Comment By: osochebol (osochebol) Date: 2007-05-09 23:08 Message: Logged In: YES user_id=1764464 Originator: NO Dear Carsten, Do you implement this feature for dispatcher: If you know the available channel of the asterisk server, and you want you use that statictis to logic compare and dispatch to another server. Do you implement that? Thanks and best regards, Ngo ---------------------------------------------------------------------- Comment By: Daniel-Constantin Mierla (miconda) Date: 2007-05-09 22:55 Message: Logged In: YES user_id=1246013 Originator: NO Committed to SVN - comments changed from //... to /* ... */ - comments about the changes are reflected in history part only - re-formatted to fit 80char terminals with tab of 4 spaces ---------------------------------------------------------------------- Comment By: Carsten Bock (carstenbock) Date: 2007-05-08 20:43 Message: Logged In: YES user_id=1488991 Originator: YES Hi Daniel, Attached the modified patch. I have made some changes to my original implementation: - renamed ds_is_domain to ds_is_from_list (to explain the functionality better, thanks axlh) - renamed probing_threshhold to ds_probing_threshhold (to make all dispatcher-parameters look the same) - ds_is_from_list should now work for both IPV4 and IPV6 addresses (not tested, but it compiled ok) - removed the username-prefix hashing method (i will think about something better) - the pinging can now be disabled by setting the timer to 0 or below - fixed some typos - A valid response to the probe is now also a 403, as it is replied by Aastra-Gateways (additional to the 200 OK and the 501 [Cisco]; maybe anything except a local 408 could be accepted) The patch is against the current SVN-Version of today. Regards, Carsten File Added: dispatcher.patch ---------------------------------------------------------------------- Comment By: Carsten Bock (carstenbock) Date: 2007-04-18 01:50 Message: Logged In: YES user_id=1488991 Originator: YES Hi Daniel, your right about the IPv4 and IPv6 issue. Currently it works only for IPv4 addresses (which is totally fine for me ;-) but you're right, i should make it although IPv6 compatible. I on holiday for the next 2,5 weeks (no SIP unless i find an cheap WiFi-AP, jubi!), so it might take a while until i can change this. I will take a look at the sources you mentioned. About the second: Maybe we could write the value to be hashed into an AVP. This would make it flexible and generic. What do you think? Third: I guess it makes sense to change the function name of "ds_is_domain" to "ds_is_from_domain" in order to make more clear what is beeing checked here. Soo, enough to do when i am returning from my holiday! ;-) Carsten ---------------------------------------------------------------------- Comment By: Daniel-Constantin Mierla (miconda) Date: 2007-04-18 00:15 Message: Logged In: YES user_id=1246013 Originator: NO Hello Carsten, I reviewed the patch and I have some observations. First is related to new ds_is_domain() functions. Seems to be valid for IPv4 only. Should be ipv6 as well, so it is better keep IP address as struct ip_addr and use ip_addr_cmp() macro for comparison (see ip_addr.h). Second, less significant, is related to the hash over username prefix. I am thinking to a more generic variant where the value to do hash over it is given somehow as parameter. So, I might not commit this new algorithm in first place. Daniel ---------------------------------------------------------------------- Comment By: axlh (axlh) Date: 2007-04-05 21:31 Message: Logged In: YES user_id=1212856 Originator: NO May I suggest you rename ds_is_domain to ds_is_from_host or ds_is_from_domain or similar to make clear it checks the from domain. Or make it more flexible by passing the domain as an argument: ds_is_domain(pseudo_variable [,group]) ---------------------------------------------------------------------- Comment By: Carsten Bock (carstenbock) Date: 2007-04-05 21:02 Message: Logged In: YES user_id=1488991 Originator: YES Hi, Here is my ported/merged Version to OpenSER 1.2 (my extensions merged into the OpenSER 1.2 dispatcher-module). Since i have seen no changes happen to the dispatcher module in SVN, i guess it should also work with the current development version. I have also added documentation for the ds_mark_dst("state") function, since this function was not in the docs. Carsten File Added: dispatcher.tar.gz ---------------------------------------------------------------------- Comment By: Carsten Bock (carstenbock) Date: 2007-03-28 00:46 Message: Logged In: YES user_id=1488991 Originator: YES Hi Daniel, You are totally right about the deactivation at runtime, based on wheter tm is loaded or not. In my port to OpenSER 1.2 i have implemented this already. I have now merged my changes into the OpenSER 1.2-Version of the dispatcher-module. I will do some testing; if everythings works fine, will upload the new module to the tracker. Carsten ---------------------------------------------------------------------- Comment By: Daniel-Constantin Mierla (miconda) Date: 2007-03-27 18:37 Message: Logged In: YES user_id=1246013 Originator: NO The enhancements are very interesting. Once you will upload the SVN-based version, I will integrate them in the code. We can deactivate TM at runtime, based on whether tm is loaded or not. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1689036&group_id=139143 _______________________________________________ Devel mailing list Devel@openser.org http://openser.org/cgi-bin/mailman/listinfo/devel