[Home]

Summary:ASTERISK-17500: chan_h323.c: Unable to create RTP session: Address family not supported by protocol
Reporter:sybasesql (sybasesql)Labels:
Date Opened:2011-03-03 04:12:42.000-0600Date Closed:2011-09-19 08:34:40
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_h323
Versions:1.8.3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace.2011-03-03T12:28:59+0300.txt
Description:Dear All!

OS: Linux CentOS 5.5 x86_64
Asterisk: Asterisk 1.8.2.4 built by root @ localhost.localdomain on a x86_64 running Linux on 2011-02-22 19:10:13 UTC

I have another segmentation fail on asterisk 1.8.2.4 x86_64.


[Mar  3 12:28:54] WARNING[12599] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:54] WARNING[12599] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:54] VERBOSE[12599] chan_h323.c:     -- Requested transfer capability: 0x00 - SPEECH
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
[Mar  3 12:28:55] WARNING[12600] res_rtp_asterisk.c: Unable to allocate RTP socket: Address family not supported by protocol
[Mar  3 12:28:55] WARNING[12600] chan_h323.c: Unable to create RTP session: Address family not supported by protocol
[Mar  3 12:28:55] ERROR[12600] chan_h323.c: No RTP stream is available for call ip$localhost/32063 (32063)[Mar  3 12:28:55] VERBOSE[12600] ast_h323.cxx:
  ERROR: on_external_rtp_create failure
Comments:By: Gregory Hinton Nietsky (irroot) 2011-03-03 06:50:33.000-0600

Duplicate of ASTERISK-17278

By: Leif Madsen (lmadsen) 2011-03-03 14:04:11.000-0600

I'm acknowledging this issue, but there is very little support for chan_h323. I suggest you try migrating to chan_ooh323 in Asterisk 1.8 which has significantly more support from the community.

By: Gregory Hinton Nietsky (irroot) 2011-03-04 02:04:10.000-0600

More than happy to lend a hand with this have a feature set on RB for it that works closing few bugs i like the way it interacts with gnugk this bug can be closed its a trivial over sight when implementing ipv6 in res_rtp see patch in ASTERISK-17278 ready for next rc

By: Fabian Borot (fborot) 2011-09-09 13:15:02.085-0500

Hi, I was testing H323 today and found the same issue.
I am using asterisk 1.8.5 and as suggested by /usr/src/asterisk-1.8.5.0/channels/h323/README I installed pwlib_v1_10_0 and openh323_v1_18_0.

I found that the line printing the error was:
426:   ast_log(LOG_WARNING, "Unable to allocate %s socket: %s\n", type, strerror(errno));

So, since the call to "socket" was returning < 0, I set "af" to PF_INET (IPV4) and it works now. For some reason the function is called with af=-1.

I added this 3 lines at the beginning of the fucntion

static int create_new_socket(const char *type, int af)
{
       ast_verbose("af is: %d. Setting it to PF_INET.\n",af); /* added FB */
       af = PF_INET;  /* added FB */
       int sock = socket(af, SOCK_DGRAM, 0);
       ast_verbose("sock returned %d.\n",sock); /* added FB */


now when the call comes, on the console I see this, showing that "af" was -1, and that after setting it to PF_INET then sock is assigned a valid socket handle.

af is: -1. Setting it to PF_INET.
sock returned 42.

and the call is able to progress on the dial plan.

I hope this helps
Fabian