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).

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.

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

What are your thoughts?