[svn-commits] objsys: branch 1.4 r337 - in /branches/1.4: ./
asterisk-ooh323c/ asterisk-ooh...
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Tue Jan 30 09:58:32 MST 2007
Author: objsys
Date: Tue Jan 30 10:58:31 2007
New Revision: 337
URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=337
Log:
Merged revisions 332-336 via svnmerge from
https://origsvn.digium.com/svn/asterisk-addons/branches/1.2
........
r332 | objsys | 2007-01-25 12:36:03 -0500 (Thu, 25 Jan 2007) | 1 line
find user to use IP for searching user
........
r333 | objsys | 2007-01-29 11:37:01 -0500 (Mon, 29 Jan 2007) | 1 line
disabled the Q.931 header screening for CallingPartyNumber
........
r334 | objsys | 2007-01-29 11:37:34 -0500 (Mon, 29 Jan 2007) | 1 line
obj-sys 0.6 release change log
........
r335 | objsys | 2007-01-29 13:16:44 -0500 (Mon, 29 Jan 2007) | 1 line
obj-sys 0.6 release changes
........
r336 | objsys | 2007-01-29 15:10:02 -0500 (Mon, 29 Jan 2007) | 1 line
added FAQ for channel drivr
........
Added:
branches/1.4/asterisk-ooh323c/FAQ.html
- copied unchanged from r336, branches/1.2/asterisk-ooh323c/FAQ.html
Modified:
branches/1.4/ (props changed)
branches/1.4/asterisk-ooh323c/ChangeLog
branches/1.4/asterisk-ooh323c/README
branches/1.4/asterisk-ooh323c/configure
branches/1.4/asterisk-ooh323c/configure.in
branches/1.4/asterisk-ooh323c/ooh323c/src/ooq931.c
branches/1.4/asterisk-ooh323c/ooh323c/src/ootypes.h
branches/1.4/asterisk-ooh323c/src/chan_h323.c
branches/1.4/asterisk-ooh323c/src/chan_h323.h
Propchange: branches/1.4/
------------------------------------------------------------------------------
--- branch-1.2-merged (original)
+++ branch-1.2-merged Tue Jan 30 10:58:31 2007
@@ -1,1 +1,1 @@
-/branches/1.2:1-183,209,211,257-258,264,268-273,305-328
+/branches/1.2:1-183,209,211,257-258,264,268-273,305-328,332-336
Modified: branches/1.4/asterisk-ooh323c/ChangeLog
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/ChangeLog?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/ChangeLog (original)
+++ branches/1.4/asterisk-ooh323c/ChangeLog Tue Jan 30 10:58:31 2007
@@ -1,8 +1,23 @@
-SVN Branch:
+Release 0.6
+* Includes ooh323c stack 0.8.3 version API
+* Added fast start response in ALERTING message for early audio.
+ Solves the problem to listening PSTN ring or announcements.
+* Changed CallingPartyNumber IE to disable the CLI screening in Q.931 header
+ (Thanks to Tim King)
+* Added MediaWaitForConnect configuration option (Thanks to Tim King,
+ for suggesting this option)
+* Added priority to Tunneling usage over H.245 Control channel
* Fixed crash for call transfer caused by channel ownership change.
- Thanks to Flagman <Flagman at incomtel.ru>
+ Thanks to Flagman <Flagman at incomtel.ru>
* Fixed occasional improper call hangup warning, bug# 7464
+* Added searching user based on IP address of incoming call, in addition to H323ID
+ Thanks to C. Maj & all others for suggestion
+* Fix reload flag problem of faststart, tunneling and mediawaitforconnrect
+ configuration options
+* Added H.263 video codec negotiation handling
+* Fixed h323_log file bug for message type indication
+
Release 0.5
* Includes changes of ooh323c stack 0.8.2 version
1. Used rand number for conference id, Thanks to Patrick Jordan
Modified: branches/1.4/asterisk-ooh323c/README
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/README?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/README (original)
+++ branches/1.4/asterisk-ooh323c/README Tue Jan 30 10:58:31 2007
@@ -1,5 +1,5 @@
- Copyright (C) 2005, Objective Systems, Inc.
+ Copyright (C) 2007, Objective Systems, Inc.
Objective Systems asterisk-ooh323c driver for supporting H323 on asterisk
@@ -8,11 +8,11 @@
H.323 stack from Objective Systems(www.obj-sys.com/open), to be used with
asterisk, an open source IP-PBX solution, from Digium, Inc.(www.asterisk.org)
- Capabilities supported: ulaw, gsm, g728, g729, g729a, g723.1, rfc2833
+ Capabilities supported: ulaw, alaw, gsm, g728, g729, g729a, g723.1, rfc2833
Package Contents:
- asterisk-ooh323c-0.5
+ asterisk-ooh323c-0.6
|
|-src [H323 channel driver code]
|
@@ -56,7 +56,7 @@
'super user' mode and then run:
>make install
- 3. Open h323.conf.sample in asterisk-ooh323c-0.5 directory. Under [general]
+ 3. Open h323.conf.sample in asterisk-ooh323c-0.6 directory. Under [general]
you will see global configuration setting. Modify IP addresses of asterisk
server "bindaddr" to match your configuration.
@@ -89,7 +89,7 @@
CLI>stop now
Now to run tests, you will have to copy extensions.conf.sample in
- asterisk-ooh323c-0.5 directory to /etc/asterisk as extensions.conf. Make
+ asterisk-ooh323c-0.6 directory to /etc/asterisk as extensions.conf. Make
sure to save a backup copy of your existing extensions.conf. Now restart
the pbx as follows:
>/usr/sbin/asterisk -vvvc
Modified: branches/1.4/asterisk-ooh323c/configure
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/configure?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/configure (original)
+++ branches/1.4/asterisk-ooh323c/configure Tue Jan 30 10:58:31 2007
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for ASTERISK-OOH323C 0.5.
+# Generated by GNU Autoconf 2.57 for ASTERISK-OOH323C 0.6.
#
# Report bugs to <Objective Systems <support at obj-sys.com>>.
#
@@ -427,8 +427,8 @@
# Identity of this package.
PACKAGE_NAME='ASTERISK-OOH323C'
PACKAGE_TARNAME='asterisk-ooh323c'
-PACKAGE_VERSION='0.5'
-PACKAGE_STRING='ASTERISK-OOH323C 0.5'
+PACKAGE_VERSION='0.6'
+PACKAGE_STRING='ASTERISK-OOH323C 0.6'
PACKAGE_BUGREPORT='Objective Systems <support at obj-sys.com>'
ac_unique_file="src/chan_h323.c"
@@ -938,7 +938,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ASTERISK-OOH323C 0.5 to adapt to many kinds of systems.
+\`configure' configures ASTERISK-OOH323C 0.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1004,7 +1004,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ASTERISK-OOH323C 0.5:";;
+ short | recursive ) echo "Configuration of ASTERISK-OOH323C 0.6:";;
esac
cat <<\_ACEOF
@@ -1099,7 +1099,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-ASTERISK-OOH323C configure 0.5
+ASTERISK-OOH323C configure 0.6
generated by GNU Autoconf 2.57
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -1114,7 +1114,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ASTERISK-OOH323C $as_me 0.5, which was
+It was created by ASTERISK-OOH323C $as_me 0.6, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -1451,7 +1451,7 @@
PACKAGE=asterisk-ooh323c
-VERSION=0.5
+VERSION=0.6
ac_aux_dir=
for ac_dir in config $srcdir/config; do
@@ -9612,7 +9612,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by ASTERISK-OOH323C $as_me 0.5, which was
+This file was extended by ASTERISK-OOH323C $as_me 0.6, which was
generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -9675,7 +9675,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-ASTERISK-OOH323C config.status 0.5
+ASTERISK-OOH323C config.status 0.6
configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Modified: branches/1.4/asterisk-ooh323c/configure.in
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/configure.in?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/configure.in (original)
+++ branches/1.4/asterisk-ooh323c/configure.in Tue Jan 30 10:58:31 2007
@@ -1,7 +1,7 @@
AC_PREREQ(2.57)
-AC_INIT([ASTERISK-OOH323C],[0.5],[Objective Systems <support at obj-sys.com>],[asterisk-ooh323c])
+AC_INIT([ASTERISK-OOH323C],[0.6],[Objective Systems <support at obj-sys.com>],[asterisk-ooh323c])
PACKAGE=asterisk-ooh323c
-VERSION=0.5
+VERSION=0.6
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
Modified: branches/1.4/asterisk-ooh323c/ooh323c/src/ooq931.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/ooh323c/src/ooq931.c?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/ooh323c/src/ooq931.c (original)
+++ branches/1.4/asterisk-ooh323c/ooh323c/src/ooq931.c Tue Jan 30 10:58:31 2007
@@ -2037,10 +2037,10 @@
/* Set calling party number Q931 IE */
if(call->callingPartyNumber)
ooQ931SetCallingPartyNumberIE(q931msg,
- (const char*)call->callingPartyNumber, 1, 0, 1, 1);
-
-
- /* Set called party number Q931 ie */
+ (const char*)call->callingPartyNumber, 1, 0, 0, 0);
+
+
+ /* Set called party number Q931 IE */
if(call->calledPartyNumber)
ooQ931SetCalledPartyNumberIE(q931msg,
(const char*)call->calledPartyNumber, 1, 0);
Modified: branches/1.4/asterisk-ooh323c/ooh323c/src/ootypes.h
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/ooh323c/src/ootypes.h?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/ooh323c/src/ootypes.h (original)
+++ branches/1.4/asterisk-ooh323c/ooh323c/src/ootypes.h Tue Jan 30 10:58:31 2007
@@ -61,7 +61,7 @@
-#define OOH323C_VERSION "v0.8.2"
+#define OOH323C_VERSION "v0.8.3"
#ifndef EXTERN
#ifdef MAKE_DLL
Modified: branches/1.4/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/src/chan_h323.c?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/src/chan_h323.c (original)
+++ branches/1.4/asterisk-ooh323c/src/chan_h323.c Tue Jan 30 10:58:31 2007
@@ -145,6 +145,8 @@
struct ast_codec_pref prefs;
int dtmfmode;
int rtptimeout;
+ int mUseIP; /* Use IP address or H323-ID to search user */
+ char mIP[20];
struct ooh323_user *next;
};
@@ -159,6 +161,7 @@
char accountcode[20];
int amaflags;
int dtmfmode;
+ int mFriend; /* indicates defined as friend */
char ip[20];
int port;
char *h323id; /* H323-ID alias, which asterisk will register with gk to reach this peer*/
@@ -460,6 +463,9 @@
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) );
@@ -504,9 +510,16 @@
dest = tmp;
ext = NULL;
}
-
- if(dest)
- peer = find_peer(dest);
+
+ /*if((sport = strchr(dest, ':'))) {
+ *sport = '\0';
+ sport++;
+ port = atoi(sport);
+ }*/
+
+ if(dest) {
+ peer = find_peer(dest, port);
+ }
else{
ast_log(LOG_ERROR, "Destination format is not supported\n");
return NULL;
@@ -526,7 +539,7 @@
if(peer->capability & format)
p->capability = peer->capability & format;
else{
- p->capability = peer->capability;
+ p->capability = peer->capability;
}
memcpy(&p->prefs, &peer->prefs, sizeof(struct ast_codec_pref));
p->dtmfmode = peer->dtmfmode;
@@ -539,11 +552,14 @@
memcpy(&p->prefs, &gPrefs, sizeof(struct ast_codec_pref));
p->username = strdup(dest);
-
p->host = strdup(dest);
- if(ext)
+ if(port > 0) {
+ p->port = port;
+ }
+ if(ext) {
strncpy(p->exten, ext, sizeof(p->exten)-1);
+ }
}
@@ -594,53 +610,104 @@
return p;
}
-struct ooh323_user *find_user(const char * name)
+struct ooh323_user *find_user(const char * name, const char* ip)
{
struct ooh323_user *user=NULL;
if(gH323Debug)
- ast_verbose("--- find_user\n");
-
+ ast_verbose("--- find_user \n");
user = userl.users;
ast_mutex_lock(&userl.lock);
while(user)
{
- if(name && !strcmp(user->name, name))
+ if(ip && user->mUseIP && !strcmp(user->mIP, ip)) {
break;
+ }
+ if(name && !strcmp(user->name, name)) {
+ break;
+ }
user = user->next;
}
ast_mutex_unlock(&userl.lock);
+
if(gH323Debug)
ast_verbose("+++ find_user\n");
return user;
}
-struct ooh323_peer *find_peer(const char * name)
-{
- struct ooh323_peer *peer=NULL;
-
- if(gH323Debug)
- ast_verbose("--- find_peer\n");
+struct ooh323_peer *find_friend(const char *name, int port)
+{
+ struct ooh323_peer *peer=NULL;
+
+ if(gH323Debug)
+ ast_verbose("--- find_friend \"%s\"\n", name);
peer = peerl.peers;
ast_mutex_lock(&peerl.lock);
while(peer)
{
+ if(gH323Debug) {
+ ast_verbose(" comparing with \"%s\"\n", peer->ip);
+ }
+ if(!strcmp(peer->ip, name)) {
+ if(port > 0 && peer->port == port) { break; }
+ else if (port <= 0) { break; }
+ }
+ peer = peer->next;
+ }
+ ast_mutex_unlock(&peerl.lock);
+
+ if(gH323Debug) {
+ if(peer) {
+ ast_verbose(" found matching friend\n");
+ }
+ ast_verbose("+++ find_friend \"%s\"\n", name);
+ }
+
+ return peer;
+}
+
+
+struct ooh323_peer *find_peer(const char * name, int port)
+{
+ struct ooh323_peer *peer=NULL;
+
+ if(gH323Debug)
+ ast_verbose("--- find_peer \"%s\"\n", name);
+
+
+ peer = peerl.peers;
+ ast_mutex_lock(&peerl.lock);
+ while(peer)
+ {
+ if(gH323Debug) {
+ ast_verbose(" comparing with \"%s\"\n", peer->ip);
+ }
if(!strcasecmp(peer->name, name))
break;
if(peer->h323id && !strcasecmp(peer->h323id, name))
break;
if(peer->e164 && !strcasecmp(peer->e164, name))
break;
+ /*
+ if(!strcmp(peer->ip, name)) {
+ if(port > 0 && peer->port == port) { break; }
+ else if (port <= 0) { break; }
+ }
+ */
peer = peer->next;
}
ast_mutex_unlock(&peerl.lock);
- if(gH323Debug)
- ast_verbose("+++ find_peer\n");
+ if(gH323Debug) {
+ if(peer) {
+ ast_verbose(" found matching peer\n");
+ }
+ ast_verbose("+++ find_peer \"%s\"\n", name);
+ }
return peer;
}
@@ -1263,7 +1330,7 @@
if(p->callerid_name)
{
p->username = strdup(p->callerid_name);
- user = find_user(p->username);
+ user = find_user(p->username, call->remoteIP);
if(user)
{
ast_mutex_lock(&user->lock);
@@ -1604,6 +1671,10 @@
else if (!strcasecmp(v->name, "amaflags")) {
user->amaflags = ast_cdr_amaflags2int(v->value);
}
+ else if (!strcasecmp(v->name, "ip")) {
+ strncpy(user->mIP, v->value, sizeof(user->mIP)-1);
+ user->mUseIP = 1;
+ }
else if (!strcasecmp(v->name, "dtmfmode")) {
if(!strcasecmp(v->value, "rfc2833"))
user->dtmfmode = H323_DTMF_RFC2833;
@@ -1624,7 +1695,7 @@
return user;
}
-static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v)
+static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v, int friend_type)
{
struct ooh323_peer *peer=NULL;
@@ -1642,6 +1713,9 @@
strncpy(peer->accountcode, gAccountcode, sizeof(peer->accountcode)-1);
peer->amaflags = gAMAFLAGS;
peer->dtmfmode = gDTMFMode;
+ if(0 == friend_type) {
+ peer->mFriend = 1;
+ }
while(v) {
if (!strcasecmp(v->name, "h323id")) {
@@ -1982,10 +2056,11 @@
{
if(strcasecmp(cat, "general"))
{
+ int friend_type = strcasecmp(utype, "friend");
utype = ast_variable_retrieve(cfg, cat, "type");
if(utype)
{
- if(!strcmp(utype, "user") || !strcasecmp(utype, "friend"))
+ if(!strcmp(utype, "user") || 0 == friend_type)
{
user = build_user(cat, ast_variable_browse(cfg, cat));
if (user)
@@ -1999,15 +2074,15 @@
ast_log(LOG_WARNING, "Failed to build user %s\n", cat);
}
}
- if(!strcasecmp(utype, "peer") || !strcasecmp(utype, "friend"))
+ if(!strcasecmp(utype, "peer") || 0 == friend_type)
{
- peer = build_peer(cat, ast_variable_browse(cfg, cat));
+ peer = build_peer(cat, ast_variable_browse(cfg, cat), friend_type);
if(peer)
{
- ast_mutex_lock(&userl.lock);
+ ast_mutex_lock(&peerl.lock);
peer->next = peerl.peers;
peerl.peers = peer;
- ast_mutex_unlock(&userl.lock);
+ ast_mutex_unlock(&peerl.lock);
}
else {
ast_log(LOG_WARNING, "Failed to build peer %s\n", cat);
@@ -2578,6 +2653,7 @@
}
ooh323_do_reload();
}
+
/* Check for interfaces needing to be killed */
ast_mutex_lock(&iflock);
struct ooh323_pvt *h323_next;
@@ -2594,6 +2670,7 @@
}
ast_mutex_unlock(&iflock);
pthread_testcancel();
+
/* Wait for sched or io */
res = ast_sched_wait(sched);
if ((res < 0) || (res > 1000)) {
Modified: branches/1.4/asterisk-ooh323c/src/chan_h323.h
URL: http://svn.digium.com/view/asterisk-addons/branches/1.4/asterisk-ooh323c/src/chan_h323.h?view=diff&rev=337&r1=336&r2=337
==============================================================================
--- branches/1.4/asterisk-ooh323c/src/chan_h323.h (original)
+++ branches/1.4/asterisk-ooh323c/src/chan_h323.h Tue Jan 30 10:58:31 2007
@@ -77,8 +77,8 @@
struct ooh323_user;
struct ooh323_peer;
/* Helper functions */
-struct ooh323_user *find_user(const char * name);
-struct ooh323_peer *find_peer(const char * name);
+struct ooh323_user *find_user(const char * name, const char *ip);
+struct ooh323_peer *find_peer(const char * name, int port);
void ooh323_delete_peer(struct ooh323_peer *peer);
int delete_users(void);
More information about the svn-commits
mailing list