mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
o Update to 1.4.6;
o make it possible to build port when asterisk has been compiled with codec negotiation patch. Approved by: MAINTAINER
This commit is contained in:
parent
aa5001039f
commit
0d531af6c8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=208392
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= asterisk-addons
|
||||
PORTVERSION= 1.4.2
|
||||
PORTVERSION= 1.4.6
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://ftp.digium.com/pub/asterisk/releases/
|
||||
|
||||
@ -32,6 +32,12 @@ PLIST_SUB+= SAMPLE_CONFIG=""
|
||||
PLIST_SUB+= SAMPLE_CONFIG="@comment "
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
if ${GREP} -sq fixup_codecs ${LOCALBASE}/include/asterisk/channel.h; \
|
||||
then \
|
||||
${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/codecnego.diff; \
|
||||
fi
|
||||
|
||||
post-install:
|
||||
.if defined(WITH_SAMPLE_CONFIG)
|
||||
@cd ${WRKSRC} && ${GMAKE} samples
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (asterisk-addons-1.4.2.tar.gz) = c080b02e6ddc81dab6a64691af890805
|
||||
SHA256 (asterisk-addons-1.4.2.tar.gz) = 6d12a1a73cfe0cb14c960e422d0d3c261740857d2a86785f08cf89d44574cc82
|
||||
SIZE (asterisk-addons-1.4.2.tar.gz) = 1000286
|
||||
MD5 (asterisk-addons-1.4.6.tar.gz) = e9240dfbcbeca8c60d5f9704d1135e14
|
||||
SHA256 (asterisk-addons-1.4.6.tar.gz) = af7c0258837a9f211ecbb58c47cd1a793e943577f37e8e47155e8d07b0c93a73
|
||||
SIZE (asterisk-addons-1.4.6.tar.gz) = 798869
|
||||
|
215
net/asterisk-addons/files/codecnego.diff
Normal file
215
net/asterisk-addons/files/codecnego.diff
Normal file
@ -0,0 +1,215 @@
|
||||
--- channels/chan_ooh323.c.orig 2007-07-21 15:17:52.000000000 +0800
|
||||
+++ channels/chan_ooh323.c 2008-02-13 15:37:17.000000000 +0800
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
|
||||
/* Channel Definition */
|
||||
-static struct ast_channel *ooh323_request(const char *type, int format,
|
||||
- void *data, int *cause);
|
||||
+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *format, void *data, int *cause);
|
||||
+
|
||||
static int ooh323_digit_begin(struct ast_channel *ast, char digit);
|
||||
static int ooh323_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
|
||||
static int ooh323_call(struct ast_channel *ast, char *dest, int timeout);
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
static enum ast_rtp_get_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
|
||||
static enum ast_rtp_get_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
|
||||
-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp,
|
||||
- struct ast_rtp *vrtp, int codecs, int nat_active);
|
||||
+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp, const struct ast_codec_pref *codecs, int nat_active);
|
||||
|
||||
static void print_codec_to_cli(int fd, struct ast_codec_pref *pref);
|
||||
static void ast_ooh323c_exit();
|
||||
@@ -244,6 +243,7 @@
|
||||
{
|
||||
struct ast_channel *ch = NULL;
|
||||
int fmt;
|
||||
+ int cap;
|
||||
if(gH323Debug)
|
||||
ast_log(LOG_DEBUG, "--- ooh323_new - %s\n", host);
|
||||
|
||||
@@ -258,10 +258,11 @@
|
||||
ast_mutex_lock(&ch->lock);
|
||||
ch->tech = &ooh323_tech;
|
||||
|
||||
- ch->nativeformats = i->capability;
|
||||
-
|
||||
+ ast_codec_pref_init(&ch->nativeformats);
|
||||
+ ast_codec_pref_append_missing2(&ch->nativeformats, i->capability);
|
||||
|
||||
- fmt = ast_best_codec(ch->nativeformats);
|
||||
+ cap = ast_codec_pref_bits(&ch->nativeformats);
|
||||
+ fmt = ast_best_codec(cap);
|
||||
|
||||
ch->fds[0] = ast_rtp_fd(i->rtp);
|
||||
ch->fds[1] = ast_rtcp_fd(i->rtp);
|
||||
@@ -451,8 +452,7 @@
|
||||
/*
|
||||
Possible data values - peername, exten/peername, exten@ip
|
||||
*/
|
||||
-static struct ast_channel *ooh323_request(const char *type, int format,
|
||||
- void *data, int *cause)
|
||||
+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *formats, void *data, int *cause)
|
||||
|
||||
{
|
||||
struct ast_channel *chan=NULL;
|
||||
@@ -461,22 +461,11 @@
|
||||
char *dest = NULL;
|
||||
char *ext = NULL;
|
||||
char tmp[256];
|
||||
- char formats[512];
|
||||
- int oldformat;
|
||||
char *sport = NULL;
|
||||
int port = 0;
|
||||
|
||||
if(gH323Debug)
|
||||
- ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data,
|
||||
- ast_getformatname_multiple(formats,512,format) );
|
||||
-
|
||||
- oldformat = format;
|
||||
- format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1);
|
||||
- if (!format) {
|
||||
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format "
|
||||
- "'%d'\n", format);
|
||||
- return NULL;
|
||||
- }
|
||||
+ ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data, ast_codec_pref_dump(tmp, sizeof(tmp), formats) );
|
||||
|
||||
p = ooh323_alloc(0,0); /* Initial callRef is zero */
|
||||
|
||||
@@ -536,8 +525,8 @@
|
||||
if(ext)
|
||||
strncpy(p->exten, ext, sizeof(p->exten)-1);
|
||||
|
||||
- if(peer->capability & format)
|
||||
- p->capability = peer->capability & format;
|
||||
+ if(peer->capability & formats->audio_bits)
|
||||
+ p->capability = peer->capability & formats->audio_bits;
|
||||
else{
|
||||
p->capability = peer->capability;
|
||||
}
|
||||
@@ -971,11 +960,11 @@
|
||||
|
||||
if(f->frametype == AST_FRAME_VOICE)
|
||||
{
|
||||
- if(!(f->subclass & ast->nativeformats))
|
||||
+ if(!(f->subclass & ast->nativeformats.audio_bits))
|
||||
{
|
||||
ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native "
|
||||
"formats is %d (read/write = %d/%d)\n",
|
||||
- f->subclass, ast->nativeformats, ast->readformat,
|
||||
+ f->subclass, ast->nativeformats.audio_bits, ast->readformat,
|
||||
ast->writeformat);
|
||||
return 0;
|
||||
}
|
||||
@@ -2219,12 +2208,12 @@
|
||||
int x, codec;
|
||||
|
||||
for(x = 0; x < 32 ; x++) {
|
||||
- codec = ast_codec_pref_index(pref, x);
|
||||
+ codec = ast_codec_pref_index_audio(pref, x);
|
||||
if (!codec)
|
||||
break;
|
||||
ast_cli(fd, "%s", ast_getformatname(codec));
|
||||
- ast_cli(fd, ":%d", pref->framing[x]);
|
||||
- if (x < 31 && ast_codec_pref_index(pref, x + 1))
|
||||
+ ast_cli(fd, ":%d", pref->audio_framing[x]);
|
||||
+ if (x < 31 && ast_codec_pref_index_audio(pref, x + 1))
|
||||
ast_cli(fd, ",");
|
||||
}
|
||||
if (!x)
|
||||
@@ -3020,13 +3009,13 @@
|
||||
(ooCallData *call, struct ast_codec_pref *prefs)
|
||||
{
|
||||
int i=0;
|
||||
- int codec = ast_codec_pref_index(prefs, i);
|
||||
+ int codec = ast_codec_pref_index_audio(prefs, i);
|
||||
|
||||
ooResetCapPrefs(call);
|
||||
while(codec)
|
||||
{
|
||||
ooAppendCapToCapPrefs(call, ooh323_convertAsteriskCapToH323Cap(codec));
|
||||
- codec = ast_codec_pref_index(prefs, ++i);
|
||||
+ codec = ast_codec_pref_index_audio(prefs, ++i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3058,7 +3047,7 @@
|
||||
|
||||
static int ooh323_set_rtp_peer
|
||||
(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp,
|
||||
- int codecs, int nat_active)
|
||||
+ const struct ast_codec_pref *codecs, int nat_active)
|
||||
{
|
||||
/* XXX Deal with Video */
|
||||
struct ooh323_pvt *p;
|
||||
@@ -3106,7 +3095,7 @@
|
||||
strncpy(mediaInfo.lMediaIP, ast_inet_ntoa(us.sin_addr), sizeof(mediaInfo.lMediaIP)-1);
|
||||
mediaInfo.lMediaPort = ntohs(us.sin_port);
|
||||
mediaInfo.lMediaCntrlPort = mediaInfo.lMediaPort +1;
|
||||
- for(x=0; 0 != (format=ast_codec_pref_index(&p->prefs, x)); x++)
|
||||
+ for(x=0; 0 != (format=ast_codec_pref_index_audio(&p->prefs, x)); x++)
|
||||
{
|
||||
strcpy(mediaInfo.dir, "transmit");
|
||||
mediaInfo.cap = ooh323_convertAsteriskCapToH323Cap(format);
|
||||
@@ -3250,10 +3239,11 @@
|
||||
/* We already hold the channel lock */
|
||||
if (f->frametype == AST_FRAME_VOICE)
|
||||
{
|
||||
- if (f->subclass != p->owner->nativeformats)
|
||||
+ if (!(f->subclass & p->owner->nativeformats.audio_bits))
|
||||
{
|
||||
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
|
||||
- p->owner->nativeformats = f->subclass;
|
||||
+ ast_codec_pref_append(&p->owner->nativeformats, f->subclass);
|
||||
+ p->capability |= f->subclass;
|
||||
ast_set_read_format(p->owner, p->owner->readformat);
|
||||
ast_set_write_format(p->owner, p->owner->writeformat);
|
||||
}
|
||||
--- channels/ooh323cDriver.c.orig 2007-01-20 06:27:05.000000000 +0800
|
||||
+++ channels/ooh323cDriver.c 2008-02-11 16:47:24.000000000 +0800
|
||||
@@ -66,7 +66,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding capabilities to H323 endpoint\n");
|
||||
|
||||
- for(x=0; 0 != (format=ast_codec_pref_index(prefs, x)); x++)
|
||||
+ for(x=0; 0 != (format=ast_codec_pref_index_audio(prefs, x)); x++)
|
||||
{
|
||||
if(format & AST_FORMAT_ULAW)
|
||||
{
|
||||
@@ -172,14 +172,14 @@
|
||||
ret |= ooCallEnableDTMFH245Signal(call);
|
||||
|
||||
|
||||
- for(x=0; 0 !=(format=ast_codec_pref_index(prefs, x)); x++)
|
||||
+ for(x=0; 0 !=(format=ast_codec_pref_index_audio(prefs, x)); x++)
|
||||
{
|
||||
if(format & AST_FORMAT_ULAW)
|
||||
{
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g711 ulaw capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = prefs->framing[x];
|
||||
+ txframes = prefs->audio_framing[x];
|
||||
ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
|
||||
grxframes, OORXANDTX,
|
||||
&ooh323c_start_receive_channel,
|
||||
@@ -192,7 +192,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g711 alaw capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = prefs->framing[x];
|
||||
+ txframes = prefs->audio_framing[x];
|
||||
ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
|
||||
grxframes, OORXANDTX,
|
||||
&ooh323c_start_receive_channel,
|
||||
@@ -206,7 +206,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g729A capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = (prefs->framing[x])/10;
|
||||
+ txframes = (prefs->audio_framing[x])/10;
|
||||
ret= ooCallAddG729Capability(call, OO_G729A, txframes, 24,
|
||||
OORXANDTX, &ooh323c_start_receive_channel,
|
||||
&ooh323c_start_transmit_channel,
|
@ -1,11 +1,11 @@
|
||||
--- Makefile.orig Mon Apr 2 22:05:57 2007
|
||||
+++ Makefile Mon Apr 2 22:07:31 2007
|
||||
@@ -16,7 +16,7 @@
|
||||
--- Makefile.orig Thu Feb 14 00:58:11 2008
|
||||
+++ Makefile Fri Feb 22 19:17:58 2008
|
||||
@@ -27,7 +27,7 @@
|
||||
# Overwite config files on "make samples"
|
||||
OVERWRITE:=y
|
||||
|
||||
-CFLAGS+=-fPIC
|
||||
+CFLAGS+=-fPIC -I${PREFIX}/include
|
||||
-ASTCFLAGS+=-fPIC
|
||||
+ASTCFLAGS+=-fPIC -I${PREFIX}/include
|
||||
|
||||
#NOISY_BUILD=yes
|
||||
|
||||
# If the file .asteriskaddons.makeopts is present in your home directory, you can
|
||||
# include all of your favorite menuselect options so that every time you download
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- asterisk-ooh323c/Makefile.in.orig Wed May 17 12:50:02 2006
|
||||
+++ asterisk-ooh323c/Makefile.in Mon Apr 2 22:38:02 2007
|
||||
@@ -93,7 +93,7 @@
|
||||
libchan_h323_la_LDFLAGS = -L$(top_builddir)/ooh323c/src -version-info 1:1:0
|
||||
libchan_h323_la_SOURCES = src/chan_h323.h src/chan_h323.c src/ooh323cDriver.h src/ooh323cDriver.c ooh323c/src/ooCmdChannel.h ooh323c/src/ooCmdChannel.c ooh323c/src/ooLogChan.h ooh323c/src/ooLogChan.c ooh323c/src/ooUtils.c ooh323c/src/ooUtils.h ooh323c/src/ooGkClient.h ooh323c/src/ooGkClient.c ooh323c/src/context.c ooh323c/src/ooCommon.h ooh323c/src/ooDateTime.h ooh323c/src/ooDateTime.c ooh323c/src/decode.c ooh323c/src/dlist.c ooh323c/src/encode.c ooh323c/src/errmgmt.c ooh323c/src/memheap.c ooh323c/src/memheap.h ooh323c/src/ooasn1.h ooh323c/src/ootrace.h ooh323c/src/ootrace.c ooh323c/src/oochannels.c ooh323c/src/oochannels.h ooh323c/src/ooh245.c ooh323c/src/ooh245.h ooh323c/src/oohdr.h ooh323c/src/ooper.h ooh323c/src/ooports.c ooh323c/src/ooports.h ooh323c/src/ooq931.c ooh323c/src/ooq931.h ooh323c/src/ooCapability.c ooh323c/src/ooCapability.h ooh323c/src/ooSocket.c ooh323c/src/ooSocket.h ooh323c/src/ootypes.h ooh323c/src/perutil.c ooh323c/src/eventHandler.c ooh323c/src/eventHandler.h ooh323c/src/ooCalls.c ooh323c/src/ooCalls.h ooh323c/src/ooStackCmds.c ooh323c/src/ooStackCmds.h ooh323c/src/ooh323.c ooh323c/src/ooh323.h ooh323c/src/ooh323ep.c ooh323c/src/ooh323ep.h ooh323c/src/printHandler.c ooh323c/src/printHandler.h ooh323c/src/rtctype.c ooh323c/src/rtctype.h ooh323c/src/ooTimer.c ooh323c/src/ooTimer.h ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c ooh323c/src/h323/H235-SECURITY-MESSAGES.h ooh323c/src/h323/H323-MESSAGES.c ooh323c/src/h323/H323-MESSAGESDec.c ooh323c/src/h323/H323-MESSAGESEnc.c ooh323c/src/h323/H323-MESSAGES.h ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
|
||||
|
||||
-INCLUDES = -I$(top_builddir)/ooh323c/src -I$(top_builddir)/ooh323c/src/h323
|
||||
+INCLUDES = -I$(top_builddir)/ooh323c/src -I$(top_builddir)/ooh323c/src/h323 -I$(includedir)
|
||||
|
||||
libchan_h323_la_LIBADD = -lpthread
|
||||
|
||||
@@ -1239,7 +1239,7 @@
|
||||
$(MAKE) "CFLAGS = -g -DGNU -D_GNU_SOURCE -D_REENTRANT $(DEBUG_THREADS)" all
|
||||
|
||||
install:
|
||||
- cp .libs/libchan_h323.so.1.0.1 $(DESTDIR)/usr/lib/asterisk/modules/chan_ooh323.so
|
||||
+ cp .libs/libchan_h323.so ${PREFIX}/lib/asterisk/modules/chan_ooh323.so
|
||||
|
||||
sample:
|
||||
cp h323.conf.sample $(DESTDIR)/etc/asterisk/ooh323.conf
|
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= asterisk-addons
|
||||
PORTVERSION= 1.4.2
|
||||
PORTVERSION= 1.4.6
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://ftp.digium.com/pub/asterisk/releases/
|
||||
|
||||
@ -32,6 +32,12 @@ PLIST_SUB+= SAMPLE_CONFIG=""
|
||||
PLIST_SUB+= SAMPLE_CONFIG="@comment "
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
if ${GREP} -sq fixup_codecs ${LOCALBASE}/include/asterisk/channel.h; \
|
||||
then \
|
||||
${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/codecnego.diff; \
|
||||
fi
|
||||
|
||||
post-install:
|
||||
.if defined(WITH_SAMPLE_CONFIG)
|
||||
@cd ${WRKSRC} && ${GMAKE} samples
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (asterisk-addons-1.4.2.tar.gz) = c080b02e6ddc81dab6a64691af890805
|
||||
SHA256 (asterisk-addons-1.4.2.tar.gz) = 6d12a1a73cfe0cb14c960e422d0d3c261740857d2a86785f08cf89d44574cc82
|
||||
SIZE (asterisk-addons-1.4.2.tar.gz) = 1000286
|
||||
MD5 (asterisk-addons-1.4.6.tar.gz) = e9240dfbcbeca8c60d5f9704d1135e14
|
||||
SHA256 (asterisk-addons-1.4.6.tar.gz) = af7c0258837a9f211ecbb58c47cd1a793e943577f37e8e47155e8d07b0c93a73
|
||||
SIZE (asterisk-addons-1.4.6.tar.gz) = 798869
|
||||
|
215
net/asterisk14-addons/files/codecnego.diff
Normal file
215
net/asterisk14-addons/files/codecnego.diff
Normal file
@ -0,0 +1,215 @@
|
||||
--- channels/chan_ooh323.c.orig 2007-07-21 15:17:52.000000000 +0800
|
||||
+++ channels/chan_ooh323.c 2008-02-13 15:37:17.000000000 +0800
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
|
||||
/* Channel Definition */
|
||||
-static struct ast_channel *ooh323_request(const char *type, int format,
|
||||
- void *data, int *cause);
|
||||
+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *format, void *data, int *cause);
|
||||
+
|
||||
static int ooh323_digit_begin(struct ast_channel *ast, char digit);
|
||||
static int ooh323_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
|
||||
static int ooh323_call(struct ast_channel *ast, char *dest, int timeout);
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
static enum ast_rtp_get_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
|
||||
static enum ast_rtp_get_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
|
||||
-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp,
|
||||
- struct ast_rtp *vrtp, int codecs, int nat_active);
|
||||
+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp, const struct ast_codec_pref *codecs, int nat_active);
|
||||
|
||||
static void print_codec_to_cli(int fd, struct ast_codec_pref *pref);
|
||||
static void ast_ooh323c_exit();
|
||||
@@ -244,6 +243,7 @@
|
||||
{
|
||||
struct ast_channel *ch = NULL;
|
||||
int fmt;
|
||||
+ int cap;
|
||||
if(gH323Debug)
|
||||
ast_log(LOG_DEBUG, "--- ooh323_new - %s\n", host);
|
||||
|
||||
@@ -258,10 +258,11 @@
|
||||
ast_mutex_lock(&ch->lock);
|
||||
ch->tech = &ooh323_tech;
|
||||
|
||||
- ch->nativeformats = i->capability;
|
||||
-
|
||||
+ ast_codec_pref_init(&ch->nativeformats);
|
||||
+ ast_codec_pref_append_missing2(&ch->nativeformats, i->capability);
|
||||
|
||||
- fmt = ast_best_codec(ch->nativeformats);
|
||||
+ cap = ast_codec_pref_bits(&ch->nativeformats);
|
||||
+ fmt = ast_best_codec(cap);
|
||||
|
||||
ch->fds[0] = ast_rtp_fd(i->rtp);
|
||||
ch->fds[1] = ast_rtcp_fd(i->rtp);
|
||||
@@ -451,8 +452,7 @@
|
||||
/*
|
||||
Possible data values - peername, exten/peername, exten@ip
|
||||
*/
|
||||
-static struct ast_channel *ooh323_request(const char *type, int format,
|
||||
- void *data, int *cause)
|
||||
+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *formats, void *data, int *cause)
|
||||
|
||||
{
|
||||
struct ast_channel *chan=NULL;
|
||||
@@ -461,22 +461,11 @@
|
||||
char *dest = NULL;
|
||||
char *ext = NULL;
|
||||
char tmp[256];
|
||||
- char formats[512];
|
||||
- int oldformat;
|
||||
char *sport = NULL;
|
||||
int port = 0;
|
||||
|
||||
if(gH323Debug)
|
||||
- ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data,
|
||||
- ast_getformatname_multiple(formats,512,format) );
|
||||
-
|
||||
- oldformat = format;
|
||||
- format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1);
|
||||
- if (!format) {
|
||||
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format "
|
||||
- "'%d'\n", format);
|
||||
- return NULL;
|
||||
- }
|
||||
+ ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data, ast_codec_pref_dump(tmp, sizeof(tmp), formats) );
|
||||
|
||||
p = ooh323_alloc(0,0); /* Initial callRef is zero */
|
||||
|
||||
@@ -536,8 +525,8 @@
|
||||
if(ext)
|
||||
strncpy(p->exten, ext, sizeof(p->exten)-1);
|
||||
|
||||
- if(peer->capability & format)
|
||||
- p->capability = peer->capability & format;
|
||||
+ if(peer->capability & formats->audio_bits)
|
||||
+ p->capability = peer->capability & formats->audio_bits;
|
||||
else{
|
||||
p->capability = peer->capability;
|
||||
}
|
||||
@@ -971,11 +960,11 @@
|
||||
|
||||
if(f->frametype == AST_FRAME_VOICE)
|
||||
{
|
||||
- if(!(f->subclass & ast->nativeformats))
|
||||
+ if(!(f->subclass & ast->nativeformats.audio_bits))
|
||||
{
|
||||
ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native "
|
||||
"formats is %d (read/write = %d/%d)\n",
|
||||
- f->subclass, ast->nativeformats, ast->readformat,
|
||||
+ f->subclass, ast->nativeformats.audio_bits, ast->readformat,
|
||||
ast->writeformat);
|
||||
return 0;
|
||||
}
|
||||
@@ -2219,12 +2208,12 @@
|
||||
int x, codec;
|
||||
|
||||
for(x = 0; x < 32 ; x++) {
|
||||
- codec = ast_codec_pref_index(pref, x);
|
||||
+ codec = ast_codec_pref_index_audio(pref, x);
|
||||
if (!codec)
|
||||
break;
|
||||
ast_cli(fd, "%s", ast_getformatname(codec));
|
||||
- ast_cli(fd, ":%d", pref->framing[x]);
|
||||
- if (x < 31 && ast_codec_pref_index(pref, x + 1))
|
||||
+ ast_cli(fd, ":%d", pref->audio_framing[x]);
|
||||
+ if (x < 31 && ast_codec_pref_index_audio(pref, x + 1))
|
||||
ast_cli(fd, ",");
|
||||
}
|
||||
if (!x)
|
||||
@@ -3020,13 +3009,13 @@
|
||||
(ooCallData *call, struct ast_codec_pref *prefs)
|
||||
{
|
||||
int i=0;
|
||||
- int codec = ast_codec_pref_index(prefs, i);
|
||||
+ int codec = ast_codec_pref_index_audio(prefs, i);
|
||||
|
||||
ooResetCapPrefs(call);
|
||||
while(codec)
|
||||
{
|
||||
ooAppendCapToCapPrefs(call, ooh323_convertAsteriskCapToH323Cap(codec));
|
||||
- codec = ast_codec_pref_index(prefs, ++i);
|
||||
+ codec = ast_codec_pref_index_audio(prefs, ++i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3058,7 +3047,7 @@
|
||||
|
||||
static int ooh323_set_rtp_peer
|
||||
(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp,
|
||||
- int codecs, int nat_active)
|
||||
+ const struct ast_codec_pref *codecs, int nat_active)
|
||||
{
|
||||
/* XXX Deal with Video */
|
||||
struct ooh323_pvt *p;
|
||||
@@ -3106,7 +3095,7 @@
|
||||
strncpy(mediaInfo.lMediaIP, ast_inet_ntoa(us.sin_addr), sizeof(mediaInfo.lMediaIP)-1);
|
||||
mediaInfo.lMediaPort = ntohs(us.sin_port);
|
||||
mediaInfo.lMediaCntrlPort = mediaInfo.lMediaPort +1;
|
||||
- for(x=0; 0 != (format=ast_codec_pref_index(&p->prefs, x)); x++)
|
||||
+ for(x=0; 0 != (format=ast_codec_pref_index_audio(&p->prefs, x)); x++)
|
||||
{
|
||||
strcpy(mediaInfo.dir, "transmit");
|
||||
mediaInfo.cap = ooh323_convertAsteriskCapToH323Cap(format);
|
||||
@@ -3250,10 +3239,11 @@
|
||||
/* We already hold the channel lock */
|
||||
if (f->frametype == AST_FRAME_VOICE)
|
||||
{
|
||||
- if (f->subclass != p->owner->nativeformats)
|
||||
+ if (!(f->subclass & p->owner->nativeformats.audio_bits))
|
||||
{
|
||||
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
|
||||
- p->owner->nativeformats = f->subclass;
|
||||
+ ast_codec_pref_append(&p->owner->nativeformats, f->subclass);
|
||||
+ p->capability |= f->subclass;
|
||||
ast_set_read_format(p->owner, p->owner->readformat);
|
||||
ast_set_write_format(p->owner, p->owner->writeformat);
|
||||
}
|
||||
--- channels/ooh323cDriver.c.orig 2007-01-20 06:27:05.000000000 +0800
|
||||
+++ channels/ooh323cDriver.c 2008-02-11 16:47:24.000000000 +0800
|
||||
@@ -66,7 +66,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding capabilities to H323 endpoint\n");
|
||||
|
||||
- for(x=0; 0 != (format=ast_codec_pref_index(prefs, x)); x++)
|
||||
+ for(x=0; 0 != (format=ast_codec_pref_index_audio(prefs, x)); x++)
|
||||
{
|
||||
if(format & AST_FORMAT_ULAW)
|
||||
{
|
||||
@@ -172,14 +172,14 @@
|
||||
ret |= ooCallEnableDTMFH245Signal(call);
|
||||
|
||||
|
||||
- for(x=0; 0 !=(format=ast_codec_pref_index(prefs, x)); x++)
|
||||
+ for(x=0; 0 !=(format=ast_codec_pref_index_audio(prefs, x)); x++)
|
||||
{
|
||||
if(format & AST_FORMAT_ULAW)
|
||||
{
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g711 ulaw capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = prefs->framing[x];
|
||||
+ txframes = prefs->audio_framing[x];
|
||||
ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
|
||||
grxframes, OORXANDTX,
|
||||
&ooh323c_start_receive_channel,
|
||||
@@ -192,7 +192,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g711 alaw capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = prefs->framing[x];
|
||||
+ txframes = prefs->audio_framing[x];
|
||||
ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
|
||||
grxframes, OORXANDTX,
|
||||
&ooh323c_start_receive_channel,
|
||||
@@ -206,7 +206,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g729A capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = (prefs->framing[x])/10;
|
||||
+ txframes = (prefs->audio_framing[x])/10;
|
||||
ret= ooCallAddG729Capability(call, OO_G729A, txframes, 24,
|
||||
OORXANDTX, &ooh323c_start_receive_channel,
|
||||
&ooh323c_start_transmit_channel,
|
@ -1,11 +1,11 @@
|
||||
--- Makefile.orig Mon Apr 2 22:05:57 2007
|
||||
+++ Makefile Mon Apr 2 22:07:31 2007
|
||||
@@ -16,7 +16,7 @@
|
||||
--- Makefile.orig Thu Feb 14 00:58:11 2008
|
||||
+++ Makefile Fri Feb 22 19:17:58 2008
|
||||
@@ -27,7 +27,7 @@
|
||||
# Overwite config files on "make samples"
|
||||
OVERWRITE:=y
|
||||
|
||||
-CFLAGS+=-fPIC
|
||||
+CFLAGS+=-fPIC -I${PREFIX}/include
|
||||
-ASTCFLAGS+=-fPIC
|
||||
+ASTCFLAGS+=-fPIC -I${PREFIX}/include
|
||||
|
||||
#NOISY_BUILD=yes
|
||||
|
||||
# If the file .asteriskaddons.makeopts is present in your home directory, you can
|
||||
# include all of your favorite menuselect options so that every time you download
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- asterisk-ooh323c/Makefile.in.orig Wed May 17 12:50:02 2006
|
||||
+++ asterisk-ooh323c/Makefile.in Mon Apr 2 22:38:02 2007
|
||||
@@ -93,7 +93,7 @@
|
||||
libchan_h323_la_LDFLAGS = -L$(top_builddir)/ooh323c/src -version-info 1:1:0
|
||||
libchan_h323_la_SOURCES = src/chan_h323.h src/chan_h323.c src/ooh323cDriver.h src/ooh323cDriver.c ooh323c/src/ooCmdChannel.h ooh323c/src/ooCmdChannel.c ooh323c/src/ooLogChan.h ooh323c/src/ooLogChan.c ooh323c/src/ooUtils.c ooh323c/src/ooUtils.h ooh323c/src/ooGkClient.h ooh323c/src/ooGkClient.c ooh323c/src/context.c ooh323c/src/ooCommon.h ooh323c/src/ooDateTime.h ooh323c/src/ooDateTime.c ooh323c/src/decode.c ooh323c/src/dlist.c ooh323c/src/encode.c ooh323c/src/errmgmt.c ooh323c/src/memheap.c ooh323c/src/memheap.h ooh323c/src/ooasn1.h ooh323c/src/ootrace.h ooh323c/src/ootrace.c ooh323c/src/oochannels.c ooh323c/src/oochannels.h ooh323c/src/ooh245.c ooh323c/src/ooh245.h ooh323c/src/oohdr.h ooh323c/src/ooper.h ooh323c/src/ooports.c ooh323c/src/ooports.h ooh323c/src/ooq931.c ooh323c/src/ooq931.h ooh323c/src/ooCapability.c ooh323c/src/ooCapability.h ooh323c/src/ooSocket.c ooh323c/src/ooSocket.h ooh323c/src/ootypes.h ooh323c/src/perutil.c ooh323c/src/eventHandler.c ooh323c/src/eventHandler.h ooh323c/src/ooCalls.c ooh323c/src/ooCalls.h ooh323c/src/ooStackCmds.c ooh323c/src/ooStackCmds.h ooh323c/src/ooh323.c ooh323c/src/ooh323.h ooh323c/src/ooh323ep.c ooh323c/src/ooh323ep.h ooh323c/src/printHandler.c ooh323c/src/printHandler.h ooh323c/src/rtctype.c ooh323c/src/rtctype.h ooh323c/src/ooTimer.c ooh323c/src/ooTimer.h ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c ooh323c/src/h323/H235-SECURITY-MESSAGES.h ooh323c/src/h323/H323-MESSAGES.c ooh323c/src/h323/H323-MESSAGESDec.c ooh323c/src/h323/H323-MESSAGESEnc.c ooh323c/src/h323/H323-MESSAGES.h ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
|
||||
|
||||
-INCLUDES = -I$(top_builddir)/ooh323c/src -I$(top_builddir)/ooh323c/src/h323
|
||||
+INCLUDES = -I$(top_builddir)/ooh323c/src -I$(top_builddir)/ooh323c/src/h323 -I$(includedir)
|
||||
|
||||
libchan_h323_la_LIBADD = -lpthread
|
||||
|
||||
@@ -1239,7 +1239,7 @@
|
||||
$(MAKE) "CFLAGS = -g -DGNU -D_GNU_SOURCE -D_REENTRANT $(DEBUG_THREADS)" all
|
||||
|
||||
install:
|
||||
- cp .libs/libchan_h323.so.1.0.1 $(DESTDIR)/usr/lib/asterisk/modules/chan_ooh323.so
|
||||
+ cp .libs/libchan_h323.so ${PREFIX}/lib/asterisk/modules/chan_ooh323.so
|
||||
|
||||
sample:
|
||||
cp h323.conf.sample $(DESTDIR)/etc/asterisk/ooh323.conf
|
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= asterisk-addons
|
||||
PORTVERSION= 1.4.2
|
||||
PORTVERSION= 1.4.6
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://ftp.digium.com/pub/asterisk/releases/
|
||||
|
||||
@ -32,6 +32,12 @@ PLIST_SUB+= SAMPLE_CONFIG=""
|
||||
PLIST_SUB+= SAMPLE_CONFIG="@comment "
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
if ${GREP} -sq fixup_codecs ${LOCALBASE}/include/asterisk/channel.h; \
|
||||
then \
|
||||
${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/codecnego.diff; \
|
||||
fi
|
||||
|
||||
post-install:
|
||||
.if defined(WITH_SAMPLE_CONFIG)
|
||||
@cd ${WRKSRC} && ${GMAKE} samples
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (asterisk-addons-1.4.2.tar.gz) = c080b02e6ddc81dab6a64691af890805
|
||||
SHA256 (asterisk-addons-1.4.2.tar.gz) = 6d12a1a73cfe0cb14c960e422d0d3c261740857d2a86785f08cf89d44574cc82
|
||||
SIZE (asterisk-addons-1.4.2.tar.gz) = 1000286
|
||||
MD5 (asterisk-addons-1.4.6.tar.gz) = e9240dfbcbeca8c60d5f9704d1135e14
|
||||
SHA256 (asterisk-addons-1.4.6.tar.gz) = af7c0258837a9f211ecbb58c47cd1a793e943577f37e8e47155e8d07b0c93a73
|
||||
SIZE (asterisk-addons-1.4.6.tar.gz) = 798869
|
||||
|
215
net/asterisk16-addons/files/codecnego.diff
Normal file
215
net/asterisk16-addons/files/codecnego.diff
Normal file
@ -0,0 +1,215 @@
|
||||
--- channels/chan_ooh323.c.orig 2007-07-21 15:17:52.000000000 +0800
|
||||
+++ channels/chan_ooh323.c 2008-02-13 15:37:17.000000000 +0800
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
|
||||
/* Channel Definition */
|
||||
-static struct ast_channel *ooh323_request(const char *type, int format,
|
||||
- void *data, int *cause);
|
||||
+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *format, void *data, int *cause);
|
||||
+
|
||||
static int ooh323_digit_begin(struct ast_channel *ast, char digit);
|
||||
static int ooh323_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
|
||||
static int ooh323_call(struct ast_channel *ast, char *dest, int timeout);
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
static enum ast_rtp_get_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
|
||||
static enum ast_rtp_get_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp **rtp);
|
||||
-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp,
|
||||
- struct ast_rtp *vrtp, int codecs, int nat_active);
|
||||
+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp, const struct ast_codec_pref *codecs, int nat_active);
|
||||
|
||||
static void print_codec_to_cli(int fd, struct ast_codec_pref *pref);
|
||||
static void ast_ooh323c_exit();
|
||||
@@ -244,6 +243,7 @@
|
||||
{
|
||||
struct ast_channel *ch = NULL;
|
||||
int fmt;
|
||||
+ int cap;
|
||||
if(gH323Debug)
|
||||
ast_log(LOG_DEBUG, "--- ooh323_new - %s\n", host);
|
||||
|
||||
@@ -258,10 +258,11 @@
|
||||
ast_mutex_lock(&ch->lock);
|
||||
ch->tech = &ooh323_tech;
|
||||
|
||||
- ch->nativeformats = i->capability;
|
||||
-
|
||||
+ ast_codec_pref_init(&ch->nativeformats);
|
||||
+ ast_codec_pref_append_missing2(&ch->nativeformats, i->capability);
|
||||
|
||||
- fmt = ast_best_codec(ch->nativeformats);
|
||||
+ cap = ast_codec_pref_bits(&ch->nativeformats);
|
||||
+ fmt = ast_best_codec(cap);
|
||||
|
||||
ch->fds[0] = ast_rtp_fd(i->rtp);
|
||||
ch->fds[1] = ast_rtcp_fd(i->rtp);
|
||||
@@ -451,8 +452,7 @@
|
||||
/*
|
||||
Possible data values - peername, exten/peername, exten@ip
|
||||
*/
|
||||
-static struct ast_channel *ooh323_request(const char *type, int format,
|
||||
- void *data, int *cause)
|
||||
+static struct ast_channel *ooh323_request(const char *type, const struct ast_codec_pref *formats, void *data, int *cause)
|
||||
|
||||
{
|
||||
struct ast_channel *chan=NULL;
|
||||
@@ -461,22 +461,11 @@
|
||||
char *dest = NULL;
|
||||
char *ext = NULL;
|
||||
char tmp[256];
|
||||
- char formats[512];
|
||||
- int oldformat;
|
||||
char *sport = NULL;
|
||||
int port = 0;
|
||||
|
||||
if(gH323Debug)
|
||||
- ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data,
|
||||
- ast_getformatname_multiple(formats,512,format) );
|
||||
-
|
||||
- oldformat = format;
|
||||
- format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1);
|
||||
- if (!format) {
|
||||
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format "
|
||||
- "'%d'\n", format);
|
||||
- return NULL;
|
||||
- }
|
||||
+ ast_verbose("--- ooh323_request - data %s format %s\n", (char*)data, ast_codec_pref_dump(tmp, sizeof(tmp), formats) );
|
||||
|
||||
p = ooh323_alloc(0,0); /* Initial callRef is zero */
|
||||
|
||||
@@ -536,8 +525,8 @@
|
||||
if(ext)
|
||||
strncpy(p->exten, ext, sizeof(p->exten)-1);
|
||||
|
||||
- if(peer->capability & format)
|
||||
- p->capability = peer->capability & format;
|
||||
+ if(peer->capability & formats->audio_bits)
|
||||
+ p->capability = peer->capability & formats->audio_bits;
|
||||
else{
|
||||
p->capability = peer->capability;
|
||||
}
|
||||
@@ -971,11 +960,11 @@
|
||||
|
||||
if(f->frametype == AST_FRAME_VOICE)
|
||||
{
|
||||
- if(!(f->subclass & ast->nativeformats))
|
||||
+ if(!(f->subclass & ast->nativeformats.audio_bits))
|
||||
{
|
||||
ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native "
|
||||
"formats is %d (read/write = %d/%d)\n",
|
||||
- f->subclass, ast->nativeformats, ast->readformat,
|
||||
+ f->subclass, ast->nativeformats.audio_bits, ast->readformat,
|
||||
ast->writeformat);
|
||||
return 0;
|
||||
}
|
||||
@@ -2219,12 +2208,12 @@
|
||||
int x, codec;
|
||||
|
||||
for(x = 0; x < 32 ; x++) {
|
||||
- codec = ast_codec_pref_index(pref, x);
|
||||
+ codec = ast_codec_pref_index_audio(pref, x);
|
||||
if (!codec)
|
||||
break;
|
||||
ast_cli(fd, "%s", ast_getformatname(codec));
|
||||
- ast_cli(fd, ":%d", pref->framing[x]);
|
||||
- if (x < 31 && ast_codec_pref_index(pref, x + 1))
|
||||
+ ast_cli(fd, ":%d", pref->audio_framing[x]);
|
||||
+ if (x < 31 && ast_codec_pref_index_audio(pref, x + 1))
|
||||
ast_cli(fd, ",");
|
||||
}
|
||||
if (!x)
|
||||
@@ -3020,13 +3009,13 @@
|
||||
(ooCallData *call, struct ast_codec_pref *prefs)
|
||||
{
|
||||
int i=0;
|
||||
- int codec = ast_codec_pref_index(prefs, i);
|
||||
+ int codec = ast_codec_pref_index_audio(prefs, i);
|
||||
|
||||
ooResetCapPrefs(call);
|
||||
while(codec)
|
||||
{
|
||||
ooAppendCapToCapPrefs(call, ooh323_convertAsteriskCapToH323Cap(codec));
|
||||
- codec = ast_codec_pref_index(prefs, ++i);
|
||||
+ codec = ast_codec_pref_index_audio(prefs, ++i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3058,7 +3047,7 @@
|
||||
|
||||
static int ooh323_set_rtp_peer
|
||||
(struct ast_channel *chan, struct ast_rtp *rtp, struct ast_rtp *vrtp,
|
||||
- int codecs, int nat_active)
|
||||
+ const struct ast_codec_pref *codecs, int nat_active)
|
||||
{
|
||||
/* XXX Deal with Video */
|
||||
struct ooh323_pvt *p;
|
||||
@@ -3106,7 +3095,7 @@
|
||||
strncpy(mediaInfo.lMediaIP, ast_inet_ntoa(us.sin_addr), sizeof(mediaInfo.lMediaIP)-1);
|
||||
mediaInfo.lMediaPort = ntohs(us.sin_port);
|
||||
mediaInfo.lMediaCntrlPort = mediaInfo.lMediaPort +1;
|
||||
- for(x=0; 0 != (format=ast_codec_pref_index(&p->prefs, x)); x++)
|
||||
+ for(x=0; 0 != (format=ast_codec_pref_index_audio(&p->prefs, x)); x++)
|
||||
{
|
||||
strcpy(mediaInfo.dir, "transmit");
|
||||
mediaInfo.cap = ooh323_convertAsteriskCapToH323Cap(format);
|
||||
@@ -3250,10 +3239,11 @@
|
||||
/* We already hold the channel lock */
|
||||
if (f->frametype == AST_FRAME_VOICE)
|
||||
{
|
||||
- if (f->subclass != p->owner->nativeformats)
|
||||
+ if (!(f->subclass & p->owner->nativeformats.audio_bits))
|
||||
{
|
||||
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
|
||||
- p->owner->nativeformats = f->subclass;
|
||||
+ ast_codec_pref_append(&p->owner->nativeformats, f->subclass);
|
||||
+ p->capability |= f->subclass;
|
||||
ast_set_read_format(p->owner, p->owner->readformat);
|
||||
ast_set_write_format(p->owner, p->owner->writeformat);
|
||||
}
|
||||
--- channels/ooh323cDriver.c.orig 2007-01-20 06:27:05.000000000 +0800
|
||||
+++ channels/ooh323cDriver.c 2008-02-11 16:47:24.000000000 +0800
|
||||
@@ -66,7 +66,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding capabilities to H323 endpoint\n");
|
||||
|
||||
- for(x=0; 0 != (format=ast_codec_pref_index(prefs, x)); x++)
|
||||
+ for(x=0; 0 != (format=ast_codec_pref_index_audio(prefs, x)); x++)
|
||||
{
|
||||
if(format & AST_FORMAT_ULAW)
|
||||
{
|
||||
@@ -172,14 +172,14 @@
|
||||
ret |= ooCallEnableDTMFH245Signal(call);
|
||||
|
||||
|
||||
- for(x=0; 0 !=(format=ast_codec_pref_index(prefs, x)); x++)
|
||||
+ for(x=0; 0 !=(format=ast_codec_pref_index_audio(prefs, x)); x++)
|
||||
{
|
||||
if(format & AST_FORMAT_ULAW)
|
||||
{
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g711 ulaw capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = prefs->framing[x];
|
||||
+ txframes = prefs->audio_framing[x];
|
||||
ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
|
||||
grxframes, OORXANDTX,
|
||||
&ooh323c_start_receive_channel,
|
||||
@@ -192,7 +192,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g711 alaw capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = prefs->framing[x];
|
||||
+ txframes = prefs->audio_framing[x];
|
||||
ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
|
||||
grxframes, OORXANDTX,
|
||||
&ooh323c_start_receive_channel,
|
||||
@@ -206,7 +206,7 @@
|
||||
if(gH323Debug)
|
||||
ast_verbose("\tAdding g729A capability to call(%s, %s)\n",
|
||||
call->callType, call->callToken);
|
||||
- txframes = (prefs->framing[x])/10;
|
||||
+ txframes = (prefs->audio_framing[x])/10;
|
||||
ret= ooCallAddG729Capability(call, OO_G729A, txframes, 24,
|
||||
OORXANDTX, &ooh323c_start_receive_channel,
|
||||
&ooh323c_start_transmit_channel,
|
@ -1,11 +1,11 @@
|
||||
--- Makefile.orig Mon Apr 2 22:05:57 2007
|
||||
+++ Makefile Mon Apr 2 22:07:31 2007
|
||||
@@ -16,7 +16,7 @@
|
||||
--- Makefile.orig Thu Feb 14 00:58:11 2008
|
||||
+++ Makefile Fri Feb 22 19:17:58 2008
|
||||
@@ -27,7 +27,7 @@
|
||||
# Overwite config files on "make samples"
|
||||
OVERWRITE:=y
|
||||
|
||||
-CFLAGS+=-fPIC
|
||||
+CFLAGS+=-fPIC -I${PREFIX}/include
|
||||
-ASTCFLAGS+=-fPIC
|
||||
+ASTCFLAGS+=-fPIC -I${PREFIX}/include
|
||||
|
||||
#NOISY_BUILD=yes
|
||||
|
||||
# If the file .asteriskaddons.makeopts is present in your home directory, you can
|
||||
# include all of your favorite menuselect options so that every time you download
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- asterisk-ooh323c/Makefile.in.orig Wed May 17 12:50:02 2006
|
||||
+++ asterisk-ooh323c/Makefile.in Mon Apr 2 22:38:02 2007
|
||||
@@ -93,7 +93,7 @@
|
||||
libchan_h323_la_LDFLAGS = -L$(top_builddir)/ooh323c/src -version-info 1:1:0
|
||||
libchan_h323_la_SOURCES = src/chan_h323.h src/chan_h323.c src/ooh323cDriver.h src/ooh323cDriver.c ooh323c/src/ooCmdChannel.h ooh323c/src/ooCmdChannel.c ooh323c/src/ooLogChan.h ooh323c/src/ooLogChan.c ooh323c/src/ooUtils.c ooh323c/src/ooUtils.h ooh323c/src/ooGkClient.h ooh323c/src/ooGkClient.c ooh323c/src/context.c ooh323c/src/ooCommon.h ooh323c/src/ooDateTime.h ooh323c/src/ooDateTime.c ooh323c/src/decode.c ooh323c/src/dlist.c ooh323c/src/encode.c ooh323c/src/errmgmt.c ooh323c/src/memheap.c ooh323c/src/memheap.h ooh323c/src/ooasn1.h ooh323c/src/ootrace.h ooh323c/src/ootrace.c ooh323c/src/oochannels.c ooh323c/src/oochannels.h ooh323c/src/ooh245.c ooh323c/src/ooh245.h ooh323c/src/oohdr.h ooh323c/src/ooper.h ooh323c/src/ooports.c ooh323c/src/ooports.h ooh323c/src/ooq931.c ooh323c/src/ooq931.h ooh323c/src/ooCapability.c ooh323c/src/ooCapability.h ooh323c/src/ooSocket.c ooh323c/src/ooSocket.h ooh323c/src/ootypes.h ooh323c/src/perutil.c ooh323c/src/eventHandler.c ooh323c/src/eventHandler.h ooh323c/src/ooCalls.c ooh323c/src/ooCalls.h ooh323c/src/ooStackCmds.c ooh323c/src/ooStackCmds.h ooh323c/src/ooh323.c ooh323c/src/ooh323.h ooh323c/src/ooh323ep.c ooh323c/src/ooh323ep.h ooh323c/src/printHandler.c ooh323c/src/printHandler.h ooh323c/src/rtctype.c ooh323c/src/rtctype.h ooh323c/src/ooTimer.c ooh323c/src/ooTimer.h ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c ooh323c/src/h323/H235-SECURITY-MESSAGES.h ooh323c/src/h323/H323-MESSAGES.c ooh323c/src/h323/H323-MESSAGESDec.c ooh323c/src/h323/H323-MESSAGESEnc.c ooh323c/src/h323/H323-MESSAGES.h ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
|
||||
|
||||
-INCLUDES = -I$(top_builddir)/ooh323c/src -I$(top_builddir)/ooh323c/src/h323
|
||||
+INCLUDES = -I$(top_builddir)/ooh323c/src -I$(top_builddir)/ooh323c/src/h323 -I$(includedir)
|
||||
|
||||
libchan_h323_la_LIBADD = -lpthread
|
||||
|
||||
@@ -1239,7 +1239,7 @@
|
||||
$(MAKE) "CFLAGS = -g -DGNU -D_GNU_SOURCE -D_REENTRANT $(DEBUG_THREADS)" all
|
||||
|
||||
install:
|
||||
- cp .libs/libchan_h323.so.1.0.1 $(DESTDIR)/usr/lib/asterisk/modules/chan_ooh323.so
|
||||
+ cp .libs/libchan_h323.so ${PREFIX}/lib/asterisk/modules/chan_ooh323.so
|
||||
|
||||
sample:
|
||||
cp h323.conf.sample $(DESTDIR)/etc/asterisk/ooh323.conf
|
Loading…
Reference in New Issue
Block a user