Re: [SR-Users] dlg_manage() and dlg_flag

2018-03-24 Thread Alex Balashov
On Sat, Mar 24, 2018 at 01:42:41PM +0100, Henning Westerholt wrote:

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

Is this meant to imply that calling dlg_manage() upon relay of initial
INVITE implicitly sets the flag internally?

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dlg_manage() and dlg_flag

2018-03-24 Thread Henning Westerholt
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



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] dlg_manage() and dlg_flag

2018-03-23 Thread Daniel-Constantin Mierla
Hello,

indeed the dlg_flag modparam should be made optional, or even removed.

Cheers,
Daniel


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
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dlg_manage() and dlg_flag

2018-03-23 Thread Alex Balashov
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

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users