Sarat Vemuri
2005-Feb-24 07:51 UTC
[Asterisk-Users] Bug in SUBSCRIBE handling : running out of RTP ports
While trying to deploy a bunch of Polycom IP 500 phones, I ran in to the following. I limited the RTP ports from 8000-8050 to limit holes in firewall. Pretty soon Asterisk ran out of RTP ports. Traced the problem back to how * is handling SUBSCRIBE. A sip structure is allocated as soon as a request is received, which also allocates RTP ports. Normally, this is not a problem as the structure is released as soon as the request is answered, which is pretty quick. However, SUBSCRIBE has an expiry header, till which time * keeps around the call structure and hence hanging on to those RTP ports. (SUBSCRIBE doesn't even need an RTP port). This problem is amplified by Polycom "Buddy Lists" as each phone subscribes to changes in extension status of all the "buddy" up to 7 extensions. I just added few lines in handle_request functions to release RTP ports if it is a subscribe. Seem to work fine.. Should I send this to Dev list or somewhere? Hope this helps some one running in to similar problems. Thanks Sarat. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050224/507716db/attachment.htm
Olle E. Johansson
2005-Feb-24 09:25 UTC
[Asterisk-Users] Bug in SUBSCRIBE handling : running out of RTP ports
Sarat Vemuri wrote:> While trying to deploy a bunch of Polycom IP 500 phones, I ran in to the > following. I limited the RTP ports from 8000-8050 to limit holes in > firewall. Pretty soon Asterisk ran out of RTP ports. Traced the > problem back to how * is handling SUBSCRIBE. A sip structure is > allocated as soon as a request is received, which also allocates RTP > ports. Normally, this is not a problem as the structure is released as > soon as the request is answered, which is pretty quick. However, > SUBSCRIBE has an expiry header, till which time * keeps around the call > structure and hence hanging on to those RTP ports. (SUBSCRIBE doesn't > even need an RTP port). This problem is amplified by Polycom "Buddy > Lists" as each phone subscribes to changes in extension status of all > the "buddy" up to 7 extensions. > > I just added few lines in handle_request functions to release RTP ports > if it is a subscribe. Seem to work fine.. Should I send this to Dev > list or somewhere?Please add your patch to the bug tracker! http://bugs.digium.com Thank you for contributing. /Olle
Apparently Analagous Threads
- Provider with GA DIDs and LNP
- Polycom IP 500 : Displaying digits dialed after connection
- How to know the environment (development/test/production) inside a worker
- Using ActiveRecord in FXRuby application
- How to know the environment (development/test/production) inside a worker - FIXED