Hey Timo,<br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 1:10 PM, Timo Reimann <span dir="ltr">&lt;<a href="mailto:timo.reimann@1und1.de">timo.reimann@1und1.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On <a href="tel:25.08.2011%2012" value="+12508201112">25.08.2011 12</a>:07, Jason Penton wrote:<br>
&gt; Thanks guys, good points indeed - let me play around and see what I can<br>
&gt; come up with.<br>
&gt;<br>
&gt; The question is: if we find a clean solution would you be ok with adding<br>
&gt; it into the repo? I suppose initially we could even implement with<br>
&gt; compile time flag like &quot;SPIRAL_UNIQUE_DLG&quot; for example. Although, I<br>
&gt; don&#39;t particularly like doing this sort of thing.<br>
&gt;<br>
&gt; I think the question is: would everyone accept having to call<br>
&gt; get_dlg(callid, ftag, ttag, branch) when according to RFC3261 a dialog<br>
&gt; should be identifiable by only the 3 (cid, ftag, ttag).<br>
&gt;<br>
&gt; IMO, this would be a good feature to add to Kamailio, so hopefully it<br>
&gt; can be approved?<br>
<br>
</div>The fact that we require a different dialog ID than the one given in RFC<br>
3261 certainly indicates that we might not have the best approach at<br>
hand (and that&#39;s what my guts tell me as well).<br>
<br>
Thinking about your example scenario again, Jason: Wouldn&#39;t it be enough<br>
for you to use a single dialog only (by means of spiral detection) and<br>
check the direction flow to tell if you&#39;re in &#39;originating&#39; or<br>
&#39;terminating&#39; more? As mentioned before, this should be rather easy to<br>
add to the existing code.<br></blockquote><div><br>this is an option, yes and one we did consider. However, one thing we liked about the 2 different dialogs was it being easier to manage state against the individual &#39;legs&#39; - for example there is a PCC (policy charging control) session attached to each leg in the diameter_rx module we have written. But, we could possibly use the dlg_var/rivet infrastructure to attach this information with different keys.<br>
<br>Let me play around with the different options and revert back to you all. <br><br>Thanks alot for the discussion anyhow - I think we have a number of options at our disposal. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
<br>
--Timo<br>
<div class="im"><br>
<br>
<br>
&gt; On Thu, Aug 25, 2011 at 11:29 AM, Klaus Darilion<br>
</div>&gt; &lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a> &lt;mailto:<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     Am <a href="tel:25.08.2011%2011" value="+12508201111">25.08.2011 11</a> &lt;tel:25.08.2011%2011&gt;:16, schrieb Timo Reimann:<br>
&gt;     &gt; On <a href="tel:25.08.2011%2010" value="+12508201110">25.08.2011 10</a> &lt;tel:25.08.2011%2010&gt;:31, Klaus Darilion wrote:<br>
&gt;     &gt;&gt; &gt; Am <a href="tel:25.08.2011%2010" value="+12508201110">25.08.2011 10</a> &lt;tel:25.08.2011%2010&gt;:14, schrieb Jason Penton:<br>
<div><div></div><div class="h5">&gt;     &gt;&gt;&gt; &gt;&gt;<br>
&gt;     &gt;&gt;&gt; &gt;&gt; From some initial work and testing I can confirm that this<br>
&gt;     works ONLY<br>
&gt;     &gt;&gt;&gt; &gt;&gt; when using the top Via *without* branch tags. Not sure what<br>
&gt;     impact this<br>
&gt;     &gt;&gt;&gt; &gt;&gt; could have?<br>
&gt;     &gt;&gt;&gt; &gt;&gt; This is because a BYE results in a different set of branch<br>
&gt;     tags from the<br>
&gt;     &gt;&gt;&gt; &gt;&gt; original set of invite branches - I am investigating why and<br>
&gt;     how this<br>
&gt;     &gt;&gt;&gt; &gt;&gt; works now.<br>
&gt;     &gt;&gt; &gt;<br>
&gt;     &gt;&gt; &gt; Sure. the branch tag is a transaction identifier and must be<br>
&gt;     unique in<br>
&gt;     &gt;&gt; &gt; space and time. Thus, BYE must have another tag. That&#39;s why I<br>
&gt;     said you<br>
&gt;     &gt;&gt; &gt; have to put some data into RR cookies - this is the only data which<br>
&gt;     &gt;&gt; &gt; stays the same during the dialog (except tags and call-id).<br>
&gt;     &gt;&gt; &gt;<br>
&gt;     &gt;&gt; &gt; If you only want to know if an in-dialog request is from<br>
&gt;     orig-&gt;term or<br>
&gt;     &gt;&gt; &gt; from term-&gt;orig, then the is_direction function is already<br>
&gt;     sufficient.<br>
&gt;     &gt;&gt; &gt;<br>
&gt;     &gt;&gt; &gt; If you want to detect a certain spiral leg in dialog module,<br>
&gt;     IMO you<br>
&gt;     &gt;&gt; &gt; have to add another matching parameter (besides tags and<br>
&gt;     call-id) to<br>
&gt;     &gt;&gt; &gt; dialog module which will be set as RR-cookie and retrieved from<br>
&gt;     Route<br>
&gt;     &gt;&gt; &gt; header for in-dialog requests. Every time the initial requests<br>
&gt;     spirals<br>
&gt;     &gt;&gt; &gt; through the proxy, you have to add such a cookie which of<br>
&gt;     course must be<br>
&gt;     &gt;&gt; &gt; different to the previous inserted cookie (therefore ftag is not<br>
&gt;     &gt;&gt; &gt; sufficient anymore) - either generate a random identifier or<br>
&gt;     reuse some<br>
&gt;     &gt;&gt; &gt; data from the message (e.g. you could copy branch-tag to RR<br>
&gt;     header as it<br>
&gt;     &gt;&gt; &gt; should be unique)<br>
&gt;     &gt; Let me emphasize that you don&#39;t need to add a new RR cookie: You can<br>
&gt;     &gt; re-use the existing one that implements DID mode and simply extend the<br>
&gt;     &gt; hash function to cover that extra value you choose. (Random number or<br>
&gt;     &gt; branch parameter, as Klaus mentioned; see my comments below though.)<br>
&gt;<br>
&gt;     Indeed - I have not thought about this parameter. If it would be<br>
&gt;     extended to be unique it should work - as long as the DID value in<br>
&gt;     in-dialog requests is correct. Thus, DID_FALLBACK mode would not work<br>
&gt;     anymore.<br>
&gt;<br>
&gt;     regards<br>
&gt;     Klaus<br>
</div></div></blockquote></div><br>