mickorz / rtmplite

Automatically exported from code.google.com/p/rtmplite
1 stars 0 forks source link

RTP sockets/ports are not closed in siprtmp #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Hakan Kocaman <Hakan.Kocaman@digame.de> on May 12, 2010

Hi,

we are using your sip<>rtmp-gateway in a prototype together with freeswitch.
We are very pleased with it, but now we are seeing that there are a
lot of open ports :
Netstat -punta
[..]
udp        0      0 0.0.0.0:43595           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:25675           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:57803           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:19275           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:51148           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:51149           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:12494           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:38606           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:12495           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:38607           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:56016           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:62416           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:56017           0.0.0.0:*
         10076/python
udp        0      0 0.0.0.0:62417           0.0.0.0:*
         10076/python
[..]

There are at the moment 166 open ports, although there is no activity
from our flash-client.
Is this expected behavior ? Is their something like a garbagecollector
involved ?
I must admit, that there is no python-specialist in our team for this project,
so we don't know is this is OK.
We would appreciate any help we can get from your site.

Best regards from germany

Freundliche Grüße

Hakan Kocaman
Software-Development

---

Hi Hakan,

Thanks for trying out siprtmp.

These port numbers are related to RTP/RTCP socket that are opened for
media stream.
I have a close() method in the voip.py::MediaSession and
rfc3550::RTPNetwork classes. The close
method of RTPNetwork gets called from MediaSession.close(), but I
guess the siprtmp is not calling the close() method.

I will try to look at the siprtmp.py's cleanup code to make sure that
it correctly closes the SIP and RTP sessions.

---

Thank you for your swift reply!

Thanks a lot for having a look at it.
Indeed, I believe that we suffer from unclean session aborts here.
The software we're using siprtmp against is freeswitch which uses
nokia's sofia sip implementation. If you feel that the aborted sessions
are owed to a bug in freeswitch or sofia sip, let me know and I'll hook
you up with the right person for the problem over at the freeswitch
project.

Original issue reported on code.google.com by voiprese...@gmail.com on 3 Feb 2011 at 10:51