[asterisk-users] Failed to Allocate port for RTP instance

shalu dhamija shalu.dhamija at rancoretech.com
Wed Jan 18 23:38:36 CST 2012



Hi, 



I have not changed res_rtp_asterisk.c Its just that I have put the debug prints in that file. 

In asterisk 1.8.7.1 the allocation of rtp session is done in check_user_full() function called from handle_request_invite. Since we are not handling the authentication of the user I have called function dialog_initialize_rtp() from handle_request_invite(). 



I have tried increasing the port ranges but it failed. And the port which asterisk allocates for rtp session is not used by the system(I have checked it using netstat). 



Please find attached the code snippet of handle_request_invite. 







Regards, 

Shalu 



----- Original Message ----- 
From: asterisk-users-request at lists.digium.com 
To: asterisk-users at lists.digium.com 
Sent: Thursday, January 19, 2012 10:50:07 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi 
Subject: asterisk-users Digest, Vol 90, Issue 43 

Send asterisk-users mailing list submissions to 
        asterisk-users at lists.digium.com 

To subscribe or unsubscribe via the World Wide Web, visit 
        http://lists.digium.com/mailman/listinfo/asterisk-users 
or, via email, send a message with subject or body 'help' to 
        asterisk-users-request at lists.digium.com 

You can reach the person managing the list at 
        asterisk-users-owner at lists.digium.com 

When replying, please edit your Subject line so it is more specific 
than "Re: Contents of asterisk-users digest..." 





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

Message: 9 
Date: Wed, 18 Jan 2012 15:13:28 -0600 
From: "Kevin P. Fleming" <kpfleming at digium.com> 
Subject: Re: [asterisk-users] Failed to Allocate port  for RTP 
        instance 
To: asterisk-users at lists.digium.com 
Message-ID: <4F1735F8.2070403 at digium.com> 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed 

On 01/18/2012 01:44 AM, shalu dhamija wrote: 
> Hello, 
> 
> I am trying to deposit a voicemail message(using voicemail() 
> application) for a subscriber using asterisk-1.8.7.1. But i am facing 
> aproblem in the rtp port allocation for a session due to which '488 Not 
> Acceptable' response is sent towards the client end. Following are error 
> messages: 
> 
> [Jan 18 12:43:59] ERROR[19164] res_rtp_asterisk.c: Failed to Allocate 
> port 7660 for RTP instance '0x1a75ab98' 
> [Jan 18 12:43:59] ERROR[19164] res_rtp_asterisk.c: Oh dear... we 
> couldn't allocate a port (x=7662)7660 for RTP instance '0x1a75ab98'. 
> errno 99 
> [Jan 18 12:43:59] DEBUG[19164] rtp_engine.c: Engine 'asterisk' failed to 
> setup RTP instance '0x1a75ab98' 
> [Jan 18 12:43:59] DEBUG[19164] rtp_engine.c: Destroyed RTP instance 
> '0x1a75ab98' 
> [Jan 18 12:43:59] DEBUG[19164] chan_sip.c: ERROR: failed to allocate rtp 
> instance 
> [Jan 18 12:43:59] DEBUG[19164] chan_sip.c: Could not initialize RTP 
> instance for dialog: 800E51A5-1140-E111-A216-001A4B4698C3 at 10.34.77.90 
> <mailto:800E51A5-1140-E111-A216-001A4B4698C3 at 10.34.77.90> 
> 
> Please find attached the log file for more information. 

The messages you've posted above don't appear to match what is in the 
Asterisk source code; if you've modified res_rtp_asterisk.c, then we 
can't tell you what is wrong if your changes are at fault. 

However, on the surface this looks very simple: there aren't any RTP 
ports available for the channel Asterisk was trying to setup. Either you 
need to increase the block of ports defined in rtp.conf to make more 
ports available, or you need to ensure that no other application on the 
system is using the same ports, or both. 

-- 
Kevin P. Fleming 
Digium, Inc. | Director of Software Technologies 
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming 
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA 
Check us out at www.digium.com & www.asterisk.org 



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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120119/94fee23c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: handle_request_invite.rar
Type: application/octet-stream
Size: 11212 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120119/94fee23c/attachment.obj>


More information about the asterisk-users mailing list