Hi Jan,

On Fri, Jul 24, 2009 at 11:07 AM, Jan Janak <jan@ryngle.com> wrote:

Wow, that's a bold move! Knowing that it is relatively easy to migrate
such stuff to sip-router is very encouraging, thanks.

This in the modules' Makefile:

ifeq ($(CFG_NAME),sip-router)
    DEFS+=-DSER_MOD_INTERFACE
endif   

and then changes in the code based on the #ifdef SER_MOD_INTERFACE did it quite nicely. Also love the new modules partitioning as I got into a big mess before with just one directory.
 

>  * enum - support for query on the originating side, useful in PSTN
>    inbound processing

Could you send this patch to the mailing list and cc Juha?
 Attached.... but... this is one of our crazy-experimental stuff. I mean I haven't yet figured it our what to do with multiple response or what is the final list of things to change in the message, so it looks a bit messy to be merged in the master now.

As a bit of background info, this thing is useful when you have some sort of PSTN access gateway that would proxy all calls towards a SIP network. The node in charge of deciding the what-next part is called in IMS related terminology a TRansit Control Function (TRC or TRCF) and I have also attached a sample cfg for such a node. The advantage of doing also enum_orig() is that this node can decide, based on ENUM configuration, whether to trigger or not an originating leg processing in an originating domain proxy. Or putting it in another way, this provides the glue to have originating SIP services for PSTN UEs.



>  * ratelimit - a much extended ratelimit module, with multiple
>    queues, dynamic limiting capabilities based on internal/external
>    indicators, random retry-after capabilities, etc; which although
>    sent towards the SER trunk, never made it

I think your improvements made it to the kamailio version which now
resides in sip-router/modules_k/ratelimit. Please try to see if it
contains everything that you need. If yes then we can adopt the
kamailio version of the module and junk the ser version (and move the
module from modules_k to modules directory).
yes, the kamailio version includes our changes and actually more. It should be then pretty safe to drop the ser version if the original owner won't complain. I guess the original functionality is still usable from there anyway.
 

>  * tls - some hashing functions

I'd be happy to see how we can integrate it into the tls module if you
send me a patch.
Will come soon, but first I want to check it one more time as they are about 2 years old.

Yeah, we would be happy to host your code in our git repository on
sip-router, I think that this is a good idea, having all the stuff
available through git would make it much easier to integrate stuff.

First of all I suggest that we start by importing the whole openims
svn tree into a standalone project in our git repository. We can setup
scripts that will track the svn tree for a while and import any
changes done by your developers there until you announce that the
project migrated. Having the whole SVN repository imported this way
would allow us to merge selected parts (i.e. openims modules) into the
main repository with full history. That would be the first step. I
volunteer to set this up if you send me berlios usernames, full names
and email addresses (needed to convert svn commit usernames to git
commit logs with full names and emails) of all developers.
This sounds great. Will do. We also have some branches, but I think that those would be too much to import.

Then I hope that we could keep all the openimscore changes localized just to modules as really the core does not need to be different for IMS.
 


After that we can decide how to integrate it with sip-router. Let me
just enumerate all the options that come to my mind:
 1) We keep openims as a standalone project within our git repository
 2) We import all the patches and extra modules on a separate branch
within the main
    repository.
 3) We add all extra openims modules into to the master branch into a
new module
    directory such as modules_o and commit patches that those modules needs.
 4) We drop new openims modules into the directory modules and
integrate patches.

I think that there is no single best option, what would work best
depends on the nature of the changes that we need to do to existing
code (i.e. patches to sip-router core and modules) and also on your
long term goals with the openims project.

Option 1) would work well if you plan to keep openims as a standalone
project that draws code from sip-router. This option would give you
considerable freedom to do changes to the code (even extensive ones)
and yet remain synchronized with the main sip-router tree. We would
setup a new project for openims in our git repository and set it up in
such a way that it becomes easy to pull changes from the sip-router
repository into the openims repository. Whenever you have something
that is ready to be integrated into the main sip-router tree, you
could simply let us know that there is something we should pull and
once we do, the change would eventually propagate from sip-router to
openims next time you pull. Git makes this mode of operation
relatively painless, this is also roughly the model that the Linux
kernel uses. 
I guess we don't really need this much liberty. Plus that the past experience with ser/ser_ims shows that we only once pulled the ser over our changes. Yes, it was probably harder to pull it with cvs/svn, but we've done our changes at the core already, mainly to have Diameter support, so the differences are not that big and hopefully reconcilable.
 

Option 2) would give you the same amount of freedom as 1), but it
would probably be difficult to maintain a large number of changes on a
separate branch for extended periods of time (my own experience). In
my opinion this would only be suitable if the long term goal is to
fully integrate openims with sip-router, but we are unsure how long it
will take to integrate all necessary changes and patches.
Agree. Then from our side we'd just like to maintain a bunch of experimental modules, which hopefully would donate code to the base sr modules if necessary. We're not really building a commercially usable IMS thingy, so we also don't have the resource to maintain it properly in such scenarios.
 


Option 3) (a new module directory), I am not sure whether we really
need to put openims modules into a separate module directory. Having
two module directories is a temporary measure because we have two
versions of most modules, but our long term goal was to migrate them
where possible. I suppose that all openims modules are new, so we can
either put them in "modules" directory right away, or in "modules_s"
or "modules_k", depending on which version of existing modules their
require.
But... it's so nice :-p. I really liked this because it really lets me have a separate experimental directory, which also adds some sense to what is for what. And then I just added my crazy-enum module there too and it did not interfere with the normal stable one. It looks and feels like a branch, but it's easier for development.
 


Option 3) and 4) are suitable if your long term goals is to merge
openims modules into sip-router and make them part of the sip-router
project. Note that this means that openims developers would have to
follow the sip-router way o development (releases, testing, code
integration), no matter how bad or good it is :-).
errrm ... can't really do unfortunately. So I would rather stick with the experimental flag and keep it separated so that you could also just ignore any complaints on the lists about crashes or issues when using this. We don't have any releases now as we can't really aford them. Our trunk is supposed to be "stable" and then we have branches for which there is absolutely no waranty.

Our long term goals are:
- to merge back with the SER from which we diverged long time ago. We had some changes that we needed quickly and could not wait for them to be stabilized, accepted and pushed to SER. Now we know that some were useless, some not, some were accepted already and some are still on the waiting list. Hopefully we'll reconcile on the core changes and then just have all the IMS stuff in the additional modules.
- to merge with Kamailio, because it's quite dumb some time that you need to keep and maintain several different ser binaries and configuration files for doing very similar tasks. For example, most of our users use also the Kamailio presence server, so they also have to checkout that and care about.
- to upgrade to the latest interfaces for modules, databases and so on as to take advantage of the new features
- to eliminate the sr sync issues so that our users could immediately benefit from the latest sr changes, without having to go through syncs every few months.
- to keep being experimental and to try crazy stuff like the RFC5031 ;-) and hopefully provide some code for future stable modules.



I would personally favor 1) if you want to continue on your own or 4)
if you want to integrate your stuff with sip-router, but let's see
what other have to say. In any case we can start with importing svn
into git, that's something we will need anyway.
So I guess then that we'd need something like 1, which would be great if the sync would be done automatically. Sure it would be lighter on our support efforts if we'd just pull regularly with the sr releases, but this did not work so well before.

I was thinking about some sort of reversed svn:externals solution, where we could have a branch like in 1, but all the parts around the modules_ims would be pulled on checkout from the master or from some link to whatever last release that was good enough for our purposes.


Thanx&Cheers,
-Dragos