Step 1:
create a MSGcontext structure and move all non-sip_msg fields out of the struct sip_msg
Step 2:
move the branches (static global array) into the context
Step 3:
identify the core global variables that are related to sip_msg processing and move them into the msg context
Step 4:
same as above but for modules.
Question: what does it bring as facility to the configuration script. Could we imagine to have "contexts" a la Asterisk here routing rules could differ per class of users?