[Kamailio-Users] How can I access dialog attributes from within timeout route?

Nathan Angelacos nangel at nothome.org
Thu Oct 1 19:46:38 CEST 2009


Hello,

Daniel-Constantin Mierla wrote:
> Hello,
> 
>>>
>>> Nathan Angelacos wrote:
>>>> Hi,
>>>>
>>>> In kamailio 1.5.2-notls, I'm trying to get the CallID of a dialog 
>>>> that has timed out:
>>>>
>>>> if (is_method( "INVITE" ) && !has_totag())
>>>>                 {
>>>>                 $dlg_ctx(timeout_route) = 21;
>>>>                 }
>>>> ...
>>>> route[21] {
>>>>     xlog ("L_WARN", "Dead dialog: $dlg(callid)");
>>>>     exit;
>>>>     }
>>>>
>>>>
>>>> However, syslog says:
>>>>
>>>>  daemon.warn /usr/sbin/kamailio[6578]: Dead Dialog: <null>
>>>>  daemon.warn /usr/sbin/kamailio[6578]: WARNING:dialog:dlg_ontimeout: 
>>>> timeout for dlg with CallID \
>>>>     '8b2eb5e3-20493c20-14e681d at 192.168.1.1' and tags 
>>>> '87F489DA-922DF157' '2XrwB5OcEJ2zQvyiTUIh-l2Zd1wjL51M'
>>>>
>>>> dlg_handlers.c leads me to believe that the context is loaded before 
>>>> calling the route(21), and the dialog
>>>> timeout handler is nice enough to report it in syslog just after my 
>>>> script fails.
>>>>
>>>> Am I missing something fundamental, or is this just not possible?
> since my trip hasn't ended yet, I couldn't create a test environment, 
> so, looking at source code the dlg should be available,. Can you try to 
> print in the timeout route:
> 
> $dlg_ctx(set)
> $dlg(h_id)
> $dlg(h_entry)
> 
> and send the output here?

Thanks for taking the time to look at it

The timeout route is now:

route[21] {
         xlog ("L_WARN", "Dead Dialog Handler ctx says: $dlg_ctx(set)");
         xlog ("L_WARN", "set: $dlg_ctx(set)   h_id: $dlg(h_id)  h_entry: $dlg(h_entry) ");
         exit;
}

Results:

/usr/sbin/kamailio[31440]: Dead Dialog Handler ctx says: 0
/usr/sbin/kamailio[31440]: set: 0   h_id: <null>  h_entry: <null>
/usr/sbin/kamailio[31442]: WARNING:dialog:bye_reply_cb: inconsitent dlg timer data on dlg 0x4bb5bb70 [745:1489288150] ...

Sorry.

Let me know if I can do anything to assist.

Thanks!




More information about the Users mailing list