[Home]

Summary:ASTERISK-14046: Asterisk's not handling BYE sip-tls messages
Reporter:Juan Manuel Coronado Z. (jmacz)Labels:
Date Opened:2009-04-30 18:02:01Date Closed:2009-05-06 09:15:49
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/TCP-TLS
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Asterisk is not handling BYE messages when SIP peers are configured with "transport=tls" after one of the parties hangs up [1].

This occurs either from Polycom SoundPoint IP 320 (FW 2.2.0.0047 BootRom 4.0.0.0423) to/from Eyebeam V1.5.7 or between two Polycom SP IP 320 phones.

Debugging both peers only shows OPTIONS SIP messages and no BYE messages [2].

Both ends have to hang up for the conversation to close but neither of the channels closes properly and new calls just end up opening lots of channels between the same endpoints, as shown in "core show channels" [3].

Asterisk's running above a Debian Lenny 5.0 box with 2.6.26-1-686 kernel and OpenSSl v0.9.8.


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

[1] Relevant entries in sip.conf:

[general]
language=es
maxexpiry=3600
defaultexpiry=120
disallow=all
limitonpeers=yes
allow=ulaw
allow=alaw
allow=gsm
allow=speex
allow=g729
nat=no
canreinvite=yes
t38pt_udptl=yes
tlsenable=yes
tlscertfile=/etc/asterisk/asterisk.pem
tlscafile=/etc/asterisk/cafile.pem

[phone1]
type=friend
qualify=yes
md5secret=xxxxxxxxxxxxxxxx
host=dynamic
dtmfmode=auto
context=phones
callerid="Phone1" <101>
callgroup=1
pickupgroup=1
nat=yes
call-limit=20
canreinvite=yes
transport=tls

[phone2]
type=friend
qualify=yes
md5secret=xxxxxxxxxxxxxxxx
host=dynamic
dtmfmode=auto
context=phones
callerid="Phone2" <102>
callgroup=1
pickupgroup=1
nat=yes
call-limit=20
canreinvite=yes
transport=tls

--/--/--/--/--/--/--/--/--/--/--/--

[2] Sip set debug peer phoneX output:

*CLI> Reliably Transmitting (NAT) to 172.30.0.33:1510:
OPTIONS sip:phone1@172.30.0.33:1510;transport=TLS;rinstance=4b9dce6b9e9438e6 SIP/2.0
Via: SIP/2.0/TLS 172.30.0.32:5060;branch=z9hG4bK1eb7891b;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@172.30.0.32:5060>;tag=as1790bc26
To: <sip:phone1@172.30.0.33:1510;transport=TLS;rinstance=4b9dce6b9e9438e6>
Contact: <sip:asterisk@172.30.0.32:5060;transport=TLS>
Call-ID: 3bae98325da23104039d99445c784126@172.30.0.32
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.0.9
Date: Thu, 30 Apr 2009 17:41:35 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Length: 0


---

<--- SIP read from TLS://172.30.0.33:1510 --->
SIP/2.0 200 OK
Via: SIP/2.0/TLS 172.30.0.32:5060;branch=z9hG4bK1eb7891b;rport=5061
Contact: <sip:172.30.0.33:21743>
To: <sip:phone1@172.30.0.33:1510;transport=TLS;rinstance=4b9dce6b9e9438e6>;tag=7d10be55
From: "asterisk"<sip:asterisk@172.30.0.32:5060>;tag=as1790bc26
Call-ID: 3bae98325da23104039d99445c784126@172.30.0.32
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: eyeBeam release 1003s stamp 31159
Content-Length: 0

--/--/--/--/--/--/--/--/--/--/--/--

[3] Core show channels of "stucked" SIP/TLS channels:

*CLI> core show channels
Channel              Location             State   Application(Data)
SIP/phone2-09eb0ca8      (None)               Up      AppDial((Outgoing Line))
SIP/phone1-09e8c9a s@macro-dial-std-ext Up      Dial(SIP/phone2,25,TtWwr)
SIP/phone2-09e92e20      (None)               Up      AppDial((Outgoing Line))
SIP/phone1-09e50a7 s@macro-dial-std-ext Up      Dial(SIP/phone2,25,TtWwr)
SIP/phone1-09e76c6 (None)               Up      AppDial((Outgoing Line))
SIP/phone2-09e55118      s@macro-dial-std-ext Up      Dial(SIP/phone1,25,TtWwr)
SIP/phone1-09e6773 (None)               Up      AppDial((Outgoing Line))
SIP/phone2-09e567a8      s@macro-dial-std-ext Up      Dial(SIP/phone1,25,TtWwr)
8 active channels
4 active calls
5 calls processed
*CLI>            
Comments:By: Kristijan Vrban (vrban) 2009-04-30 20:18:19

hello jmacz, look to the bug report: 13865 it looks similar. you can try the tls_port_v5.patch

By: Juan Manuel Coronado Z. (jmacz) 2009-05-01 16:22:21

OK, I'll try the patch and see if it works for me. Already had read that bug before submitting this one but didn't pay attention to the lack of BYE in SIP/TLS issue at the end of the report.

Just finished reading the whole conversation.

By: Juan Manuel Coronado Z. (jmacz) 2009-05-05 18:35:45

I finally tried the tls_port_v5.patch, but now I'm having the 481 message issue shown in bug ASTERISK-13040 when the hardphone isn't the one which ends the call (no problem with the softphone).

I'll continue following bug ASTERISK-13040, so I suggest we close this one which seems redundant.

By: Kristijan Vrban (vrban) 2009-05-06 01:47:46

ok, please attach a full sip debug to 13865, and also try with 1.6.1/1.6.2 or trunk with the tls_port_v5.patch