[Home]

Summary:ASTERISK-16339: [patch] wrong SRV query for TLS connection
Reporter:Marcello Ceschia (marcelloceschia)Labels:
Date Opened:2010-07-09 02:01:22Date Closed:2010-07-29 15:44:37
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/TCP-TLS
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan-sip_asterisk18b1_srvQuery.patch
( 1) chan-sip_srvQuery.patch
( 2) chan-sip_Trunk_srvQuery.patch
Description:chan_sip generates wrong service records queries to dns.
it queries to _sip._TLS.example.com, instead of _sips._tcp.example.com
Comments:By: Marcello Ceschia (marcelloceschia) 2010-07-16 03:49:50

patch according to RFC 3263 section 4.1

By: Stefan Tichy (st) 2010-07-20 10:23:49

minor modifications so that patch applies to trunk.

By: Paul Belanger (pabelanger) 2010-07-26 09:14:45

This patch seems to duplicate the functionality of get_transport().  You could also make these functions more generic so other parts of chan_sip can reference the  "sip", "sips", "udp" and "tcp" strings, then update the other functions to use them.

By: Marcello Ceschia (marcelloceschia) 2010-07-26 10:00:24

@pabelanger it does not duplicate the functionality of get_transport.
get_transport is used for debug output and for sip header (transport part). In all these parts the get_transport is correct.

But transport != protocol and tls is not a valide protocol for srv wuery.

How can we fix this?



By: Paul Belanger (pabelanger) 2010-07-26 10:10:29

Yes, your are correct, I miss read the function. Maybe change get_srv_protocol() and get_srv_service() default to "unknown" if the switch statement fails?

By: Marcello Ceschia (marcelloceschia) 2010-07-26 10:24:43

@pabelanger do you think return UNKNOWN is a good fallback?
Both parts has a default value shouldn't we use this?

By: Digium Subversion (svnbot) 2010-07-29 15:42:28

Repository: asterisk
Revision: 280551

U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r280551 | dvossel | 2010-07-29 15:42:28 -0500 (Thu, 29 Jul 2010) | 11 lines

fixes wrong SRV query for TLS connection

(closes issue ASTERISK-16339)
Reported by: marcelloceschia
Patches:
     chan-sip_srvQuery.patch uploaded by marcelloceschia (license 1079)
     chan-sip_Trunk_srvQuery.patch uploaded by st (license 907)
     chan-sip_asterisk18b1_srvQuery.patch uploaded by marcelloceschia (license 1079)
Tested by: marcelloceschia, st, pabelanger


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280551

By: Digium Subversion (svnbot) 2010-07-29 15:43:46

Repository: asterisk
Revision: 280552

_U  branches/1.8/
U   branches/1.8/channels/chan_sip.c

------------------------------------------------------------------------
r280552 | dvossel | 2010-07-29 15:43:46 -0500 (Thu, 29 Jul 2010) | 17 lines

Merged revisions 280551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
 r280551 | dvossel | 2010-07-29 15:42:29 -0500 (Thu, 29 Jul 2010) | 11 lines
 
 fixes wrong SRV query for TLS connection
 
 (closes issue ASTERISK-16339)
 Reported by: marcelloceschia
 Patches:
       chan-sip_srvQuery.patch uploaded by marcelloceschia (license 1079)
       chan-sip_Trunk_srvQuery.patch uploaded by st (license 907)
       chan-sip_asterisk18b1_srvQuery.patch uploaded by marcelloceschia (license 1079)
 Tested by: marcelloceschia, st, pabelanger
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280552

By: Digium Subversion (svnbot) 2010-07-29 15:44:36

Repository: asterisk
Revision: 280553

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r280553 | dvossel | 2010-07-29 15:44:35 -0500 (Thu, 29 Jul 2010) | 24 lines

Merged revisions 280552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r280552 | dvossel | 2010-07-29 15:43:47 -0500 (Thu, 29 Jul 2010) | 17 lines
 
 Merged revisions 280551 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ........
   r280551 | dvossel | 2010-07-29 15:42:29 -0500 (Thu, 29 Jul 2010) | 11 lines
   
   fixes wrong SRV query for TLS connection
   
   (closes issue ASTERISK-16339)
   Reported by: marcelloceschia
   Patches:
         chan-sip_srvQuery.patch uploaded by marcelloceschia (license 1079)
         chan-sip_Trunk_srvQuery.patch uploaded by st (license 907)
         chan-sip_asterisk18b1_srvQuery.patch uploaded by marcelloceschia (license 1079)
   Tested by: marcelloceschia, st, pabelanger
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280553