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_man...