Hi,
while testing TLS at SIPit 24 I encoutered the following problem:
Two UAs were successfully registered via TLS connections and they had
Contacts with just IP addresses and the transport parameter set to TLS.
If one UA tried to call the other the INVITE was rejected by the TM
module with the following log message:
ERROR: uri2dst: bad transport for sips uri: 3
So when I looked up which is transport 3 I was surprised to see the 3 is
actually TLS. Which is absolutely the right transport for a SIPS URI.
The if condition before this error message checks if the transport is
equal to TCP. This makes no sense to me.
Thus I assume that this if condition was just a typo and created the
attached patch which fixes this issue in 3 places in ut.h.
Please let me know if I can commit the attached patch.
Cheers
Nils
Index: ut.h
===================================================================
RCS file: /cvsroot/ser/sip_router/modules/tm/ut.h,v
retrieving revision 1.26
diff -a -u -r1.26 ut.h
--- ut.h 11 Aug 2008 17:41:16 -0000 1.26
+++ ut.h 21 May 2009 08:13:24 -0000
@@ -123,7 +123,7 @@
}
if (parsed_uri.type==SIPS_URI_T){
- if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
+ if ((parsed_uri.proto!=PROTO_TLS) && (parsed_uri.proto!=PROTO_NONE)){
LOG(L_ERR, "ERROR: uri2proxy: bad transport for sips uri: %d\n",
parsed_uri.proto);
return 0;
@@ -181,7 +181,7 @@
}
if (parsed_uri.type==SIPS_URI_T){
- if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
+ if ((parsed_uri.proto!=PROTO_TLS) && (parsed_uri.proto!=PROTO_NONE)){
LOG(L_ERR, "ERROR: get_uri_send_info: bad transport for"
" sips uri: %d\n", parsed_uri.proto);
return -1;
@@ -254,7 +254,7 @@
}
if (parsed_uri.type==SIPS_URI_T){
- if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
+ if ((parsed_uri.proto!=PROTO_TLS) && (parsed_uri.proto!=PROTO_NONE)){
LOG(L_ERR, "ERROR: uri2dst: bad transport for sips uri: %d\n",
parsed_uri.proto);
return 0;