[Devel] Route types
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon Aug 22 21:08:36 CEST 2005
Hi there,
I just made some delicate changes into OpenSER: so far the route type
(REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE) was known only by TM
module and was quite overhand for other modules to access it (by
importing TM module as LCR and CPL-C does).
Secondly, since default ONREPLY route was added in core , things got
broken - that route was executed as REQUEST_ROUTE actually, since TM was
the one to change the route type.
As solution, I moved the route type variable into core - route_type; it
will be set to defaults values REQUEST_ROUTE if a request is received
and to ONREPLY_ROUTE if reply. The type will be also visible for all
callbacks (like script, TM, RR, USRLOC).
For module which executes special routes (like TM for FAILURE_ROUTE),
the modules will have the liberty to set the corresponding route type.
Ex: before running failure route and TM failure handlers, TM will
push the FAILURE_ROUTE value into route_type variable; once done, it
will restore it to initial value.
Same mechanism will be used for BRANCH_ROUTE.
regards,
Bogdan
More information about the Devel
mailing list