Hi

I'm trying to change the lifetime timer on a KDMQ dialog message before
handing it with dmq_handle_message();

if(has_body("application/json") && $fU == 'dialog')
{
                        if (jansson_get("lifetime", $rb, "$var(lifetime)"))
                        {
                                xlog("L_INFO", "$cfg(route): DIALOG JSON 
action: $var(action) state: $var(state) lifetime: $var(lifetime)\n");
                                $var(new_lifetime) = $var(lifetime) + 60;
                                $var(newrb) = $rb;
                                jansson_set("integer", "lifetime", 
$var(new_lifetime), "$var(newrb)");
                                xlog("L_INFO", "$cfg(route): DIALOG JSON NEW: 
$var(newrb)\n");
                                set_body("$var(newrb)","application/json");
                                msg_apply_changes();
                        }
}
                        dmq_handle_message();
                        exit;

The JSON string looks good after that manipulation, it contains the
updated lifetime.

But dmq_handle_message() does not seem to get the body anymore. So I
wonder what set_body() exactly does. Is it replacing the body or
appending to it?

Is there a way to crank up debug output in the dialog and/or dmq module?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G    -    Leiter Commerce Kunden
______________________________________________________

Zurlindenstrasse 29             Tel  +41 61 826 93 00
CH-4133 Pratteln                Fax  +41 61 826 93 01
Schweiz                         Web  http://www.imp.ch
______________________________________________________
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to