[asterisk-addons-commits] objsys: branch 1.2 r371 - in
/branches/1.2/asterisk-ooh323c: ./ src/
asterisk-addons-commits at lists.digium.com
asterisk-addons-commits at lists.digium.com
Fri Apr 20 13:49:53 MST 2007
Author: objsys
Date: Fri Apr 20 15:49:53 2007
New Revision: 371
URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=371
Log:
Added H.225 port range setting option
Modified:
branches/1.2/asterisk-ooh323c/FAQ.html
branches/1.2/asterisk-ooh323c/src/chan_h323.c
Modified: branches/1.2/asterisk-ooh323c/FAQ.html
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/FAQ.html?view=diff&rev=371&r1=370&r2=371
==============================================================================
--- branches/1.2/asterisk-ooh323c/FAQ.html (original)
+++ branches/1.2/asterisk-ooh323c/FAQ.html Fri Apr 20 15:49:53 2007
@@ -149,11 +149,30 @@
<td width="769"> </td>
</tr>
<tr>
+ <td width="31"><b>Q.</b></td>
+ <td width="769"><b>Asterisk RTP port range problem after sometime usage of
+ day or long?</b></td>
+ </tr>
+ <tr>
+ <td width="31" valign="top"><b>A.</b></td>
+ <td width="769">
+ <p>By default, ooh323 uses H.225 setup channel port range from 12030 to
+ 12230. The default range for RTP in Asterisk's rtp.conf file is to use
+ 10000-20000. So after you have been using asterisk in a production environment
+ for some time, the RTP port usage clashes with the H.225 setup, which
+ subsequently fails. </p>
+ <p> Workaround: Change port range in rtp.conf or ooh323.conf file.</p>
+ <p>The ooh323.conf file uses h225portrange=12030,12230 option to set the
+ H.225 channel port range.</p>
+ <p> </p>
+ </td>
+ </tr>
+ <tr>
<td width="31"> </td>
<td width="769"> </td>
</tr>
<tr>
- <td colspan="2">
+ <td colspan="2">
<hr>
</td>
</tr>
Modified: branches/1.2/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/src/chan_h323.c?view=diff&rev=371&r1=370&r2=371
==============================================================================
--- branches/1.2/asterisk-ooh323c/src/chan_h323.c (original)
+++ branches/1.2/asterisk-ooh323c/src/chan_h323.c Fri Apr 20 15:49:53 2007
@@ -221,6 +221,11 @@
static int gOutgoingLimit = 4;
OOBOOL gH323Debug = FALSE;
+static struct ooh323_config
+{
+ int mTCPPortStart;
+ int mTCPPortEnd;
+}ooconfig;
/** Asterisk RTP stuff*/
static struct sched_context *sched;
@@ -1879,6 +1884,8 @@
strcpy(gContext, DEFAULT_CONTEXT);
gAliasList = NULL;
gMediaWaitForConnect = 0;
+ ooconfig.mTCPPortStart = 12030;
+ ooconfig.mTCPPortEnd = 12230;
v = ast_variable_browse(cfg, "general");
while(v) {
@@ -1889,6 +1896,27 @@
else if (!strcasecmp(v->name, "bindaddr")) {
strncpy(gIP, v->value, sizeof(gIP)-1);
}
+ else if (!strcasecmp(v->name, "h225portrange")) {
+ char* endlimit = 0;
+ char temp[512];
+ strncpy(temp, v->value, sizeof(temp) - 1);
+ //char *temp = ast_strdupa(v->value);
+ endlimit = strchr(temp, ',');
+ if (endlimit) {
+ *endlimit = '\0';
+ endlimit++;
+ ooconfig.mTCPPortStart = atoi(temp);
+ ooconfig.mTCPPortEnd = atoi(endlimit);
+
+ if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart,
+ ooconfig.mTCPPortEnd) == OO_FAILED) {
+ ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
+ }
+ }
+ else {
+ ast_log(LOG_ERROR, "h225portrange: Invalid format, seperate port range with \",\"\n");
+ }
+ }
else if (!strcasecmp(v->name, "gateway")) {
gIsGateway = ast_true(v->value);
}
@@ -2310,6 +2338,8 @@
ast_cli(fd, "\nObjective Open H.323 Channel Driver's Config:\n");
sprintf(value, "%s:%d", gIP, gPort);
ast_cli(fd, "%-20s%s\n", "IP:Port: ", value);
+ ast_cli(fd, "%-20s%d-%d\n", "TCP port range: ",
+ ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd);
ast_cli(fd, "%-20s%s\n", "FastStart", gFastStart?"yes":"no");
ast_cli(fd, "%-20s%s\n", "Tunneling", gTunneling?"yes":"no");
ast_cli(fd, "%-20s%s\n", "CallerId", gCallerID);
More information about the asterisk-addons-commits
mailing list