<html><head><style type='text/css'>p { margin: 0; }</style><style type='text/css'>body { font-family: 'Arial'; font-size: 12pt; color: #000000}</style></head><body><P>Hi,</P>
<P> </P>
<P>I have not changed res_rtp_asterisk.c Its just that I have put the debug prints in that file. </P>
<P>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(). </P>
<P> </P>
<P>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). </P>
<P> </P>
<P>Please find attached the code snippet of handle_request_invite.</P>
<P> </P>
<P> </P>
<P> </P>
<P>Regards,</P>
<P>Shalu</P>
<P><BR><BR>----- Original Message -----<BR>From: asterisk-users-request@lists.digium.com<BR>To: asterisk-users@lists.digium.com<BR>Sent: Thursday, January 19, 2012 10:50:07 AM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi<BR>Subject: asterisk-users Digest, Vol 90, Issue 43<BR><BR>Send asterisk-users mailing list submissions to<BR> asterisk-users@lists.digium.com<BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR> http://lists.digium.com/mailman/listinfo/asterisk-users<BR>or, via email, send a message with subject or body 'help' to<BR> asterisk-users-request@lists.digium.com<BR><BR>You can reach the person managing the list at<BR> asterisk-users-owner@lists.digium.com<BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of asterisk-users digest..."<BR><BR><BR><BR><BR><BR>------------------------------<BR><BR>Message: 9<BR>Date: Wed, 18 Jan 2012 15:13:28 -0600<BR>From: "Kevin P. Fleming" <kpfleming@digium.com><BR>Subject: Re: [asterisk-users] Failed to Allocate port for RTP<BR> instance<BR>To: asterisk-users@lists.digium.com<BR>Message-ID: <4F1735F8.2070403@digium.com><BR>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR><BR>On 01/18/2012 01:44 AM, shalu dhamija wrote:<BR>> Hello,<BR>><BR>> I am trying to deposit a voicemail message(using voicemail()<BR>> application) for a subscriber using asterisk-1.8.7.1. But i am facing<BR>> aproblem in the rtp port allocation for a session due to which '488 Not<BR>> Acceptable' response is sent towards the client end. Following are error<BR>> messages:<BR>><BR>> [Jan 18 12:43:59] ERROR[19164] res_rtp_asterisk.c: Failed to Allocate<BR>> port 7660 for RTP instance '0x1a75ab98'<BR>> [Jan 18 12:43:59] ERROR[19164] res_rtp_asterisk.c: Oh dear... we<BR>> couldn't allocate a port (x=7662)7660 for RTP instance '0x1a75ab98'.<BR>> errno 99<BR>> [Jan 18 12:43:59] DEBUG[19164] rtp_engine.c: Engine 'asterisk' failed to<BR>> setup RTP instance '0x1a75ab98'<BR>> [Jan 18 12:43:59] DEBUG[19164] rtp_engine.c: Destroyed RTP instance<BR>> '0x1a75ab98'<BR>> [Jan 18 12:43:59] DEBUG[19164] chan_sip.c: ERROR: failed to allocate rtp<BR>> instance<BR>> [Jan 18 12:43:59] DEBUG[19164] chan_sip.c: Could not initialize RTP<BR>> instance for dialog: 800E51A5-1140-E111-A216-001A4B4698C3@10.34.77.90<BR>> <mailto:800E51A5-1140-E111-A216-001A4B4698C3@10.34.77.90><BR>><BR>> Please find attached the log file for more information.<BR><BR>The messages you've posted above don't appear to match what is in the <BR>Asterisk source code; if you've modified res_rtp_asterisk.c, then we <BR>can't tell you what is wrong if your changes are at fault.<BR><BR>However, on the surface this looks very simple: there aren't any RTP <BR>ports available for the channel Asterisk was trying to setup. Either you <BR>need to increase the block of ports defined in rtp.conf to make more <BR>ports available, or you need to ensure that no other application on the <BR>system is using the same ports, or both.<BR><BR>-- <BR>Kevin P. Fleming<BR>Digium, Inc. | Director of Software Technologies<BR>Jabber: kfleming@digium.com | SIP: kpfleming@digium.com | Skype: kpfleming<BR>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<BR>Check us out at www.digium.com & www.asterisk.org<BR><BR><BR><BR>------------------------------<BR><BR></P></body></html>