[Home]

Summary:ASTERISK-14276: [patch] CLI NOTIFY always tries to use UDP, even if the peer is connected via TCP
Reporter:Jonathan Thurman (jthurman)Labels:
Date Opened:2009-06-07 02:51:36Date Closed:2009-06-09 15:54:11
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sip-notify-tcp-svn199728.patch
Description:When sending a notification from the console to a sip peer using transport=tcp, only a TCP notification is attempted.

Here is the error on the console:

ERROR[11426]: chan_sip.c:4963 create_addr_from_peer: 'UDP' is not a valid transport for '1000'. we only use 'TCP'! ending call.

****** ADDITIONAL INFORMATION ******

I took a look at issue 13710 (MWI Notify always uses UDP) but haven't found a patch that works yet.

This has been tested with 1.6.1.0, 1.6.1 SVN 199478, and SVN trunk 199478.
Comments:By: Jonathan Thurman (jthurman) 2009-06-08 20:04:26

Set the socket.type = 0 before the call to create_addr in sip_cli_notify and the issue went away.  Similar to the MWI notification fix.

Tested with peers configured for TCP only and UDP only.

By: Jonathan Thurman (jthurman) 2009-06-09 00:42:10

After looking at 13865, I think this could be rolled into that patch.  The patch as it exists does not correct this issue.  However, it appears as if a single change in that patch could resolve this issue.  Posted the change to the review.

By: Digium Subversion (svnbot) 2009-06-09 15:47:58

Repository: asterisk
Revision: 199818

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r199818 | dvossel | 2009-06-09 15:47:58 -0500 (Tue, 09 Jun 2009) | 11 lines

CLI NOTIFY sending wrong transport type.

SIP's cli NOTIFY command only used UDP rather than copying the transport type from the peer.

(closes issue ASTERISK-14276)
Reported by: jthurman
Patches:
     sip-notify-tcp-svn199728.patch uploaded by jthurman (license 614)
Tested by: jthurman, dvossel


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

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

By: Digium Subversion (svnbot) 2009-06-09 15:48:58

Repository: asterisk
Revision: 199819

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

------------------------------------------------------------------------
r199819 | dvossel | 2009-06-09 15:48:58 -0500 (Tue, 09 Jun 2009) | 17 lines

Merged revisions 199818 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r199818 | dvossel | 2009-06-09 15:47:57 -0500 (Tue, 09 Jun 2009) | 11 lines
 
 CLI NOTIFY sending wrong transport type.
 
 SIP's cli NOTIFY command only used UDP rather than copying the transport type from the peer.
 
 (closes issue ASTERISK-14276)
 Reported by: jthurman
 Patches:
       sip-notify-tcp-svn199728.patch uploaded by jthurman (license 614)
 Tested by: jthurman, dvossel
........

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

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

By: Digium Subversion (svnbot) 2009-06-09 15:50:11

Repository: asterisk
Revision: 199820

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

------------------------------------------------------------------------
r199820 | dvossel | 2009-06-09 15:50:11 -0500 (Tue, 09 Jun 2009) | 17 lines

Merged revisions 199818 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r199818 | dvossel | 2009-06-09 15:47:57 -0500 (Tue, 09 Jun 2009) | 11 lines
 
 CLI NOTIFY sending wrong transport type.
 
 SIP's cli NOTIFY command only used UDP rather than copying the transport type from the peer.
 
 (closes issue ASTERISK-14276)
 Reported by: jthurman
 Patches:
       sip-notify-tcp-svn199728.patch uploaded by jthurman (license 614)
 Tested by: jthurman, dvossel
........

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

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

By: Digium Subversion (svnbot) 2009-06-09 15:54:11

Repository: asterisk
Revision: 199821

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

------------------------------------------------------------------------
r199821 | dvossel | 2009-06-09 15:54:11 -0500 (Tue, 09 Jun 2009) | 17 lines

Merged revisions 199818 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r199818 | dvossel | 2009-06-09 15:47:57 -0500 (Tue, 09 Jun 2009) | 11 lines
 
 CLI NOTIFY sending wrong transport type.
 
 SIP's cli NOTIFY command only used UDP rather than copying the transport type from the peer.
 
 (closes issue ASTERISK-14276)
 Reported by: jthurman
 Patches:
       sip-notify-tcp-svn199728.patch uploaded by jthurman (license 614)
 Tested by: jthurman, dvossel
........

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

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