[SR-Users] dialog module - set_dlg_profile won't work

Ben WIlliams benwilliams at joobworld.com
Thu Jan 5 01:33:25 CET 2012


Hi,
can anyone see why this code wouldn't work? In the log is shows this
message after set_dlg_profile called -  dialog [dlg_hash.c:523]: no
dialog callid='...' found
Dialogs are being saved to dialog table ok but nothing is in dialog_vars table.

modparam("dialog", "dlg_flag", DLGFLAG)
modparam("dialog", "hash_size", 128)
modparam("dialog", "default_timeout", 14400)
modparam("dialog", "dlg_match_mode", 0)
modparam("dialog", "table_name", "dialog")
modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_update_period", 10)
modparam("dialog", "profiles_with_value", "caller ; allcalls")
...
    if (is_method("INVITE")) {
        setflag(FLT_ACC); # do accounting
        setflag(DLGFLAG);  ## add to dialog list

        $var(callcnt) = 0;
        get_profile_size("caller", "$fu", "$var(callcnt)");
        xlog("$fu has $var(callcnt) concurrent calls\n");
        if ($var(callcnt) >= 2) {
            sl_send_reply("503", "Simultaneous calls limit reached");
            exit;
        }
        set_dlg_profile("caller","$fu");
    }

--
Thanks
Ben



More information about the sr-users mailing list