Retrying the dlrs from the store

If you’re using an external DB for dlr storage, there’s a slight chance that the carrier’s response to your MT (with the dlr information) would arrive after the dlr itself. If this happens, Kannel won’t be able to find the dlr (because it’s not there yet).

This patch implements an sleep and retry mechanism when calling dlr_get(). This aims to solve that problem.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr? Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying? Default: 0

So, if you don’t set these parameters the behaviour remains as it was before patching. However, if you, for instance, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR’s still missing, Kannel will display a warning as usual.

Download the patch from here: kannel-dlr-retry

Please try it and let me know what you think.

Regards,

Alex

Comments (6)

joshSeptember 23rd, 2010 at 8:56 pm

excuse me, I’m new here; where placed this patch ??? and you can explain me if this will update table of dlr o which?

Julian OFebruary 14th, 2011 at 3:31 pm

Hi Alex,

Thanks for this – but why has it not been thrown into 1.5.0?

RamujoshJuly 27th, 2011 at 8:06 am

Hi Alex,
Excellent. thank you for sharing knowledge.

SharifSeptember 29th, 2011 at 6:24 am

Group ‘core’ may not contain field ‘dlr-retry-delay’

Rafael CavalcantiJanuary 27th, 2012 at 8:36 am

Hi Alex,
It would be possible to show the process of applying the patch kannel 1.4.3 (stable)?
Thanks

[…] it is solved by this patch: http://www.blogalex.com/archives/132. Haven’t tried it yet but it’s the best (only) solution I’ve found so […]

Leave a comment

Your comment