Hi,

I tried using dialog module and was throwing the following error. dialog module was loaded after  tm and rr modules.

Kamailio 4.1.7

ERROR: dialog [dialog.c:524]: mod_init(): no dlg flag set!!
ERROR: <core> [sr_module.c:970]: init_mod(): init_mod(): Error while initializing module dialog (/usr/local/lib64/kamailio/modules/dialog.so)

ll /usr/local/lib64/kamailio/modules/dialog.so
-rwxr-xr-x 1 root root 679638 Jan 30  2015 /usr/local/lib64/kamailio/modules/dialog.so

Configuration

modparam("dialog", "hash_size", 2048)
modparam("dialog", "timeout_avp", "$avp(i:10)")
modparam("dialog", "default_timeout", 21600)

request_route {
..
dlg_manage();
        if(is_method("INVITE") && !has_totag())
        {
                if(get_profile_size("caller","$fu","$avp(size)")) {
                
                        if($avp(size) >= 2) {
                                send_reply("403", "Too many active calls");
                                exit;
                        }
                        else
                        {
                                set_dlg_profile("caller","$fu");
                        }
                }
        }

        # dispatch destinations to LOADBALANCE
        #!ifdef WITH_LOADBALANCE
if($rU=~"^([0-9]{10}|1[0-9]{10}|3706[0-9]{10}|37051[0-9]{10})$")
        {
                route(LOADBALANCE);
        }
#!endif
        route(LOCATION);
        route(RELAY);
        
}
reply_route {
        unset_dlg_profile("caller","$fu");
}


Thanks & Regards
Cibin




On 16-Dec-2016, at 8:56 PM, Cibin Paul <paul_cibin@me.com> wrote:

Thanks Alex,

I will try your suggestion and update here.

Regards
Cibin




On 16-Dec-2016, at 8:38 PM, Alex Balashov <abalashov@evaristesys.com> wrote:

The dialog module (dialog, not dialog_ng) would be a cleaner and more
natural solution, since it handles most possible eventualities of dialog
state transition for you more cleanly than if you keep state yourself
via htable.

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC

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

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users