[Kamailio-Users] How can I access dialog attributes from within timeout route?
Daniel-Constantin Mierla
miconda at gmail.com
Thu Oct 1 10:58:40 CEST 2009
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?
Cheers,
Daniel
--
Daniel-Constantin Mierla
* Kamailio SIP Masterclass, Nov 9-13, 2009, Berlin
* http://www.asipto.com/index.php/sip-router-masterclass/
More information about the Users
mailing list