there is a problem with the transaction matching code. If Yxa receives
an INVITE request over TCP and CANCEL over UDP, then Yxa is not able to
find the INVITE transaction and instead forwards the CANCEL in a new
transaction. This new transaction in turn receives a 481 response, since
it didn't match the INVITE Yxa sent earlier.

I think the problem is in the sipheader:via_sentby/1, which should
ignore the transport protocol since there is no guaranteed that the
INVITE and CANCEL are received over the same transport protocol. The
sender might have switched to TCP for the INVITE because of its size,
and defaults to UDP for CANCEL.

Patch included.


diff --git a/src/sipheader.erl b/src/sipheader.erl
index fa00c7f..097fe9a 100644
--- a/src/sipheader.erl
+++ b/src/sipheader.erl
@@ -815,11 +815,10 @@ dialogid(Header) when is_record(Header, keylist) ->
 %% @spec    (Via) ->
-%%            {Proto, Host, Port}
+%%            {Host, Port}
 %%            Via = #via{}
-%%            Proto = string()
 %%            Host  = string()
 %%            Port  = integer()
@@ -827,7 +826,7 @@ dialogid(Header) when is_record(Header, keylist) ->
 %% @end
 via_sentby(Via) when is_record(Via, via) ->
-    {Via#via.proto, Via#via.host, Via#via.port}.
+    {Via#via.host, Via#via.port}.
 %% @spec    (Request) ->
Yxa-devel mailing list

Reply via email to