[Kamailio-Devel] Patch: dialog module / is_known_dlg().

Jerome Martin jmartin at longphone.fr
Thu Nov 13 00:07:36 CET 2008


Alex,

On Wed, 2008-11-12 at 12:32 -0500, Alex Balashov wrote:
> Hello,
> 
> I have attached a very simple patch to provide a new exported function 
> from the dialog module - is_known_dlg().  This can be used from script 
> to determine if the message being processed is part of an existing 
> dialog tracked by the dialog module, irrespective of the use of profiles.
> 
> Because the dialog module is plugged into the RR / TMCB event loop it is 
> aware of all dialogs regardless of whether profiles are used.  Thus, 

I think this needs double checking, because the callback as registered
in the dialog module might not make dialog matching available before
t_relay or loose_route / record route is called ... I am saying this
from memory because I had to patch my dialog module in-house at some
point to make the dialog matching available upon entering the script
config (thus registering an other callback like this:
register_script_cb( dlg_onreqprescript, PRE_SCRIPT_CB|REQ_TYPE_CB,0)).
This is counter intuitive because the tmcb TMCB_REQUEST_IN, dlg_onreq
event, if I remember correctly, happens a bit later than what
intuitively expected, aka after t_relay I think. Again I haven't checked
this recently and might be wrong, just quoting from memory. 

> this function will return positively if any message is part of a known 
> existing dialog.
> 
> I have included documentation changes in doc/dialog_admin.xml.
> 
> This patch is against the kamailio-1.4.1-notls release tarball, not 
> trunk.  I apologise for that.  If a patch against trunk is desired, I 
> can resubmit;  however, the 1) the patch is very simple and 2) the 
> dialog code is unlikely to have changed from 1.4.1 to trunk, so it 
> should apply anyhow.
> 
> Please let me know if there is some other procedure I should have 
> followed with regards to submitting the patch.  I could have just 
> uploaded it to the tracker but wanted to invite additional review seeing 
> as it is my first patch.
> 
> Thanks,
> 
> -- Alex
> 
> _______________________________________________
> Devel mailing list
> Devel at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel




More information about the Devel mailing list