[SR-Users] dlg_manage() and dlg_flag

Henning Westerholt hw at kamailio.org
Sat Mar 24 13:42:41 CET 2018


Am Samstag, 24. März 2018, 04:09:10 CET schrieb Daniel-Constantin Mierla:
> indeed the dlg_flag modparam should be made optional, or even removed.

Hello,

I had a quick look to the code, there are also additional code changes 
necessary if we want to remove this flag. Just making it optional in 
mod_init() will probably not work.


dlg_onreq() is installed as TM callback and if its match the dlg_flag a new 
dialog is created. Not sure if there will be a match if we set it to -1, the 
current default value. Setting it to 0 will not work, as then it would match 
this flag set in the cfg (if an user set this for some other logic).

Best regards,

Henning

 
> On 23.03.18 19:49, Alex Balashov wrote:
> > Hi,
> > 
> > One aspect of the dialog module that is very confusing to newbies is the
> > relationship between the dlg_flag modparam and dlg_manage().
> > 
> > According to the documentation, dlg_manage() effectively seems to
> > 
> > obsolete the requirement for a flag[1]:
> >    Process current SIP request with dialog module. It is an
> >    alternative to setting dialog flag for initial INVITE and
> >    Route-parameter-callback execution for within-dialog requests.
> > 
> > Yet, if one does not set a dlg_flag modparam, the dialog module fails to
> > 
> > load:
> >    Mar 23 15:42:29 evaristesys-legacy /usr/local/sbin/kamailio[2900]:
> >    ERROR: dialog [dialog.c:500]: mod_init(): invalid dlg flag -1!!> 
> > Perhaps the flag modparam should be made optional, and any arguments for
> > using one over the other more clearly explained in the documentation.
> > I'd make the latter contribution, but unfortunately am not entirely sure
> > what those are.
> > 
> > Cheers,
> > 
> > -- Alex
> > 
> > [1]
> > https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.f.dlg_
> > manage





More information about the sr-users mailing list