[sr-dev] ideas on dialog spiral distinction

Timo Reimann timo.reimann at 1und1.de
Wed Aug 24 14:45:37 CEST 2011


Hey,


On 24.08.2011 13:38, marius zbihlei wrote:
> On 08/24/2011 02:32 PM, Jason Penton wrote:
>> Hi Guys,
>>
>> Have been playing around with the dialog module and spiralling and one
>> thing I have noticed is that if you spiral and dont have
>> detect_spirals enabled the dialog module will create 2 dialogs. This
>> is great and 'expected' in this case. However, as it stands there is
>> no way of distinguishing between the 2 dialogs. So for example, a BYE
>> could come in from either 'side' of the spiral and the first dialog is
>> matched - not necessarily the correct one. this is because the match
>> is purely done on callid, from and to tags (if using RFC3261 matching).

And for the record: It doesn't help if you switch to cookie-based
matching (dlg_match_mode 0 or 1). Since cookies are implemented as
hashed Call-IDs, two different dialogs spawn from a spiral situation
still map to the same entry in the hash table.


>> My initial thought is to have some sort of direction identifiers
>> stored in the dialog structure itself. Then using Via and contact
>> headers we can make a pretty good assumption as to which 'end' of the
>> spiral and therefore choose the correct dialog in the match algorithm.

I am not quite sure if I understand how the "ends" of a spiral and the
available dialog structures in the hash table relate to each other. From
a technical perspective, the result of an (undetected) spiraled call is
just a second transaction on the same proxy mapping to the same call. No
matter whether a request arrives from one end (caller) or the other
(callee), the message will transition both transactions and thus relate
to the same dialog. AFAICS, that's no different to a non-spiraled call.

If what you're interested in is simply the direction the request came
from you may evaluate the "dir" variable programmatically which is
passed as part of each dialog callback parameter structure.


>> some may say just enable spiral_detection. Actually, in some cases it
>> is nice to be able to track a spiral in different dialogs, which most
>> likely why the option to enable or disable spiral detection in the
>> first place

In order to get a better feel for what you wish to accomplish, could you
give an example of such a case?


Cheers,

--Timo



More information about the sr-dev mailing list