<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [sr-dev] Proposal: New Dialog Module Design</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>&gt; Hi, due to the long thread about &quot;improving the dialog module&quot;<BR>
&gt; (<A HREF="http://lists.sip-router.org/pipermail/sr-dev/2010-March/006378.html">http://lists.sip-router.org/pipermail/sr-dev/2010-March/006378.html</A>)<BR>
&gt; I've decided to create a wiki page in Kamailio's web site in order to<BR>
&gt; propose a new design for the module.<BR>
&gt;<BR>
&gt; This is just a proposal so comments and questions are really welcome :)<BR>
<BR>
Two remarks:<BR>
<BR>
(1) Under &quot;dialog_out table&quot;, the following is stated:<BR>
<BR>
&quot;A response arrives to the proxy and TM modules invokes the Dialog module callback for the previously generated dialog.<BR>
<BR>
*Such callback ignores the response if its Call-ID or From-tag doesn't match the entry in dialog_in table with same hash_id*[...]&quot;<BR>
<BR>
I do not think the module has to check whether the response's Call-ID and From-tag match the entry in the dialog_in table because a mismatch should never happen: When the tm callback to dlg_reply() was registered in dlg_onreq(), the hash ID of the very dialog created during dlg_onreq() was passed as argument to tm's registration function. And since the tm module makes sure that you cannot receive a response-based callback for a different transaction than the one the registration was carried out from, the dialog that the response-triggered callback will point to must be the right one.<BR>
<BR>
<BR>
(2) The &quot;Spiral&quot; example only shows one possible implementation with two dialog states created for an effectively single dialog. However, during the thread on the mailing list that started off the re-design proposal, we discussed another approach where a single dialog state is maintained for spirals only (denoted &quot;dialog continuation&quot; by myself).<BR>
<BR>
Is there a reason why this approach isn't taken into consideration on the wiki page? If it's just a matter of time and effort, I'd be glad to add some text and another example in order to let people comment on this further.<BR>
Like I said before, I really consider having dialog callback users deal with module deficits the worse choice if a better option is available.<BR>
<BR>
<BR>
Cheers,<BR>
<BR>
--Timo</FONT>
</P>

</BODY>
</HTML>