[sr-dev] git:master: modules_k/dispatcher: Added new feature that enables routes to be run when destinations fail/ recover

Peter Dunkley peter.dunkley at crocodile-rcs.com
Tue Aug 16 16:51:33 CEST 2011


Hi Daniel,

I have a couple of other jobs I am working on right now, but I will try
and get these changes done this week in time for the code freeze.

Thanks,

Peter

On Tue, 2011-08-16 at 16:15 +0200, Daniel-Constantin Mierla wrote:

> Hi Peter,
> 
> thanks for this enhancement, I find it very useful.
> 
> I have few remarks for potentially a better integration with available code:
> 
> a) lib/kcore/faked_msg.{c,h} offers already a way to get a fake SIP msg. 
> It should be used instead of building a new one inside dispatcher 
> module. The Makefile of the module has to be updated to link against 
> internal libkcore
> 
> b) instead of using route blocks with names, I think it is better to 
> define two new event_route blocks to be executed when a destination is 
> un/available. There are several modules that are still running route 
> blocks for non-sip message events, because they were developed long time 
> ago, but for new implementations, whenever one needs to execute a block 
> of actions from config file on an event which is not related to SIP 
> message routing, should be done via event_route.
> 
> In this case, for example, can be used event_route[dispatcher:dst-down] 
> and event_route[dispatcher:dst-up]. If they are defined, they will be 
> executed. Checking for existence of these event routes can be done at 
> startup, so no new module parameters are needed -- the names of the 
> event routes will be "known" and reserved in the future. You can see 
> inside htable module how event_route[htable:mod-init] is looked up and 
> executed.
> 
> Using an event route instead of a route block will also clearly indicate 
> that is not about SIP routing, therefore not all of the functions 
> exported by modules work properly there.
> 
> Cheers,
> Daniel
> 
> On 8/16/11 12:27 PM, Peter Dunkley wrote:
> > Module: sip-router
> > Branch: master
> > Commit: 085638299508ef6bf0c96673a663453da76d0a4f
> > URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=085638299508ef6bf0c96673a663453da76d0a4f
> >
> > Author: pd<peter.dunkley at crocodile-rcs.com>
> > Committer: pd<peter.dunkley at crocodile-rcs.com>
> > Date:   Tue Aug 16 11:24:44 2011 +0100
> >
> > modules_k/dispatcher: Added new feature that enables routes to be run when destinations fail/recover
> >
> > - Two new exported parameters ds_dst_unavailable_route and
> >    ds_dst_available_route allow you to specify routes to run when
> >    a destination is marked PROBING and unmarked PROBING respectively.
> >
> >    This is useful for integration with NMC and alarms equipment as
> >    these routes can be used to trigger/log these status changes.
> >
> > ---
> >
> >   modules_k/dispatcher/README                   |  114 ++++++++++++++++++-------
> >   modules_k/dispatcher/dispatch.c               |   64 ++++++++++++--
> >   modules_k/dispatcher/dispatch.h               |    5 +-
> >   modules_k/dispatcher/dispatcher.c             |   94 ++++++++++++++++++++
> >   modules_k/dispatcher/doc/dispatcher_admin.xml |   64 ++++++++++++++-
> >   5 files changed, 299 insertions(+), 42 deletions(-)
> >
> > Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=085638299508ef6bf0c96673a663453da76d0a4f
> >
> > _______________________________________________
> > sr-dev mailing list
> > sr-dev at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 


-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110816/2996c997/attachment-0001.htm>


More information about the sr-dev mailing list