Fixed the error "SIP/2.0 481 Call leg unavailable" returned by the server when
commit352acd6624c7161707c6fe379ce68fbf43b28afa
authorAnibal Avelar <avelar@gmail.com>
Mon, 1 Mar 2010 16:02:48 +0000 (1 10:02 -0600)
committerAnibal Avelar <avelar@gmail.com>
Mon, 1 Mar 2010 16:02:48 +0000 (1 10:02 -0600)
tree36f202efec5b6a4b6ced0fcbe3b1245801aed6be
parent434e4444e55f39735efffdb9ff41bb5df570036a
Fixed the error "SIP/2.0 481 Call leg unavailable" returned by the server when
the Routes changed in a session with already dialog. It happens with Windows Messenger 5.5 and sometimes with our own SIPE (old versions).

The server gives this reason:
ms-diagnostics: 1004;reason="Route set is no longer valid";source="myserver.org"
;ErrorType="Connection identifier encoded into the route set references a
connection instance that no longer exists"

The problem is related to the headers "Route:", I can't reproduce it, but
I think happens when:
+ John Doe send us a message
+ I give an answer and leave open the chat window
+ John Doe send us again a message after some time
+ I try to give an answer but I got the message: "This message was not delivered
 to John Doe because one or more recipients are offline".

I fixed it deleting all routes for the dialog and recording the new list.
src/core/sipe-dialog.c
src/core/sipe-dialog.h
src/core/sipe.c