[asterisk-commits] oej: branch oej/pinerana-lock-mwipvt-trunk r335276 - in /team/oej/pinerana-lo...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 12 06:21:10 CDT 2011
Author: oej
Date: Mon Sep 12 06:20:46 2011
New Revision: 335276
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=335276
Log:
UPdate branch
Added:
team/oej/pinerana-lock-mwipvt-trunk/configs/res_config_sqlite3.conf.sample
- copied unchanged from r335212, trunk/configs/res_config_sqlite3.conf.sample
team/oej/pinerana-lock-mwipvt-trunk/res/res_config_sqlite3.c
- copied unchanged from r335212, trunk/res/res_config_sqlite3.c
Modified:
team/oej/pinerana-lock-mwipvt-trunk/ (props changed)
team/oej/pinerana-lock-mwipvt-trunk/CHANGES
team/oej/pinerana-lock-mwipvt-trunk/Makefile
team/oej/pinerana-lock-mwipvt-trunk/UPGRADE.txt
team/oej/pinerana-lock-mwipvt-trunk/addons/chan_mobile.c
team/oej/pinerana-lock-mwipvt-trunk/addons/chan_ooh323.c
team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.c
team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.h
team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooGkClient.c
team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/oochannels.c
team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooh323.c
team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooq931.c
team/oej/pinerana-lock-mwipvt-trunk/apps/app_confbridge.c
team/oej/pinerana-lock-mwipvt-trunk/apps/app_dial.c
team/oej/pinerana-lock-mwipvt-trunk/apps/app_queue.c
team/oej/pinerana-lock-mwipvt-trunk/apps/app_readexten.c
team/oej/pinerana-lock-mwipvt-trunk/apps/app_voicemail.c
team/oej/pinerana-lock-mwipvt-trunk/build_tools/cflags-devmode.xml
team/oej/pinerana-lock-mwipvt-trunk/build_tools/cflags.xml
team/oej/pinerana-lock-mwipvt-trunk/build_tools/mkpkgconfig
team/oej/pinerana-lock-mwipvt-trunk/cel/cel_odbc.c (props changed)
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_agent.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_alsa.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_console.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_dahdi.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_h323.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_iax2.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_local.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_mgcp.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_misdn.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_oss.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_sip.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_skinny.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_unistim.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_usbradio.c
team/oej/pinerana-lock-mwipvt-trunk/channels/chan_vpb.cc
team/oej/pinerana-lock-mwipvt-trunk/channels/sig_pri.c
team/oej/pinerana-lock-mwipvt-trunk/channels/sig_ss7.c
team/oej/pinerana-lock-mwipvt-trunk/configs/cdr.conf.sample
team/oej/pinerana-lock-mwipvt-trunk/configs/cel_odbc.conf.sample (props changed)
team/oej/pinerana-lock-mwipvt-trunk/configs/iax.conf.sample
team/oej/pinerana-lock-mwipvt-trunk/configs/manager.conf.sample
team/oej/pinerana-lock-mwipvt-trunk/configs/sip.conf.sample
team/oej/pinerana-lock-mwipvt-trunk/configure
team/oej/pinerana-lock-mwipvt-trunk/configure.ac
team/oej/pinerana-lock-mwipvt-trunk/contrib/realtime/mysql/iaxfriends.sql
team/oej/pinerana-lock-mwipvt-trunk/contrib/realtime/mysql/sipfriends.sql
team/oej/pinerana-lock-mwipvt-trunk/contrib/realtime/postgresql/realtime.sql
team/oej/pinerana-lock-mwipvt-trunk/funcs/func_dialplan.c
team/oej/pinerana-lock-mwipvt-trunk/funcs/func_frame_trace.c
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/cdr.h
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/channel.h
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/config.h
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/frame.h
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/manager.h
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/res_fax.h
team/oej/pinerana-lock-mwipvt-trunk/include/asterisk/test.h
team/oej/pinerana-lock-mwipvt-trunk/main/app.c
team/oej/pinerana-lock-mwipvt-trunk/main/cdr.c
team/oej/pinerana-lock-mwipvt-trunk/main/channel.c
team/oej/pinerana-lock-mwipvt-trunk/main/config.c
team/oej/pinerana-lock-mwipvt-trunk/main/dial.c
team/oej/pinerana-lock-mwipvt-trunk/main/features.c
team/oej/pinerana-lock-mwipvt-trunk/main/file.c
team/oej/pinerana-lock-mwipvt-trunk/main/frame.c
team/oej/pinerana-lock-mwipvt-trunk/main/logger.c
team/oej/pinerana-lock-mwipvt-trunk/main/manager.c
team/oej/pinerana-lock-mwipvt-trunk/main/netsock2.c
team/oej/pinerana-lock-mwipvt-trunk/main/pbx.c
team/oej/pinerana-lock-mwipvt-trunk/main/test.c
team/oej/pinerana-lock-mwipvt-trunk/makeopts.in
team/oej/pinerana-lock-mwipvt-trunk/res/res_config_ldap.c
team/oej/pinerana-lock-mwipvt-trunk/res/res_config_odbc.c
team/oej/pinerana-lock-mwipvt-trunk/res/res_config_pgsql.c
team/oej/pinerana-lock-mwipvt-trunk/res/res_fax.c
team/oej/pinerana-lock-mwipvt-trunk/res/res_fax_spandsp.c
team/oej/pinerana-lock-mwipvt-trunk/res/res_jabber.c
team/oej/pinerana-lock-mwipvt-trunk/res/res_musiconhold.c
team/oej/pinerana-lock-mwipvt-trunk/sounds/Makefile (contents, props changed)
Propchange: team/oej/pinerana-lock-mwipvt-trunk/
------------------------------------------------------------------------------
automerge = Is-there-life-off-net?
Propchange: team/oej/pinerana-lock-mwipvt-trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Propchange: team/oej/pinerana-lock-mwipvt-trunk/
------------------------------------------------------------------------------
svn:mergeinfo = /trunk:332448-335212
Propchange: team/oej/pinerana-lock-mwipvt-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Sep 12 06:20:46 2011
@@ -1,1 +1,1 @@
-/trunk:1-332439
+/trunk:1-335258
Modified: team/oej/pinerana-lock-mwipvt-trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/CHANGES?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/CHANGES (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/CHANGES Mon Sep 12 06:20:46 2011
@@ -18,6 +18,18 @@
name field if CID number exists without a CID name. This change improves
compatibility with certain device features such as Avaya IP500's directory
lookup service.
+
+Chan_local changes
+------------------
+ * Added a manager event "LocalBridge" for local channel call bridges between
+ the two pseudo-channels created.
+
+Codec changes
+-------------
+ * Codec lists may now be modified by the '!' character, to allow succinct
+ specification of a list of codecs allowed and disallowed, without the
+ requirement to use two different keywords. For example, to specify all
+ codecs except g729 and g723, one need only specify allow=all,!g729,!g723.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.8 to Asterisk 10 -------------------
@@ -35,6 +47,10 @@
The MESSAGE() dialplan function and MessageSend() application have been
added to go along with this functionality. More detailed usage information
can be found on the Asterisk wiki (http://wiki.asterisk.org/).
+ * If real-time text support (T.140) is negotiated, it will be preferred for
+ sending text via the SendText application. For example, via SIP, messages
+ that were once sent via the SIP MESSAGE request would be sent via RTP if
+ T.140 text is negotiated for a call.
Parking
-------
@@ -84,6 +100,7 @@
--------------------------
* The filter option in cdr_adaptive_odbc now supports negating the argument,
thus allowing records which do NOT match the specified filter.
+ * Added ability to log CONGESTION calls to CDR
CODECS
--------------------------
@@ -128,6 +145,7 @@
for a given string to replace with another string as many times as the
user specifies or just throughout the whole string.
* Added option to CHANNEL(pickupgroup) allow reading and setting the pickupgroup of channel.
+ * Mark VALID_EXTEN() deprecated in favor of DIALPLAN_EXISTS()
libpri channel driver (chan_dahdi) DAHDI changes
--------------------------
@@ -158,6 +176,11 @@
channels involved with the FollowMe thread. Use this option to improve
compatability for a FollowMe call with certain dialplan apps, options, and
functions.
+
+Meetme
+--------------------------
+ * Added option "k" that will automatically close the conference when there's
+ only one person left when a user exits the conference.
CEL
--------------------------
@@ -220,6 +243,11 @@
----------------
* Modules marked as deprecated are no longer marked as building by default. Enabling
these modules is still available via menuselect.
+
+IAX2 Changes
+------------
+* authdebug is now disabled by default. To enable this functionaility again
+ set authdebug = yes in iax.conf.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
@@ -497,7 +525,7 @@
* A new option, 'I' has been added to both app_queue and app_dial.
By setting this option, Asterisk will not update the caller with
connected line changes or redirecting party changes when they occur.
- * A 'relative-peroidic-announce' option has been added to queues.conf. When
+ * A 'relative-periodic-announce' option has been added to queues.conf. When
enabled, this option will cause periodic announce times to be calculated
from the end of announcements rather than from the beginning.
* The autopause option in queues.conf can be passed a new value, "all." The
Modified: team/oej/pinerana-lock-mwipvt-trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/Makefile?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/Makefile (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/Makefile Mon Sep 12 06:20:46 2011
@@ -555,6 +555,7 @@
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/keys"
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/phoneprov"
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http"
+ $(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/sounds"
$(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8"
$(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
$(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"
@@ -617,17 +618,7 @@
@exit 1
endif
-preinstall_spaces:
-ifneq ($(MAKE_PREINSTALL),)
- $(MAKE_PREINSTALL)
-endif
-
-postinstall_spaces:
-ifneq ($(MAKE_POSTINSTALL),)
- $(MAKE_POSTINSTALL)
-endif
-
-install: preinstall_spaces badshell bininstall datafiles postinstall_spaces
+install: badshell bininstall datafiles
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \
fi
@@ -664,32 +655,32 @@
$(INSTALL) -d "$(DESTDIR)$(ASTETCDIR)"
@for x in configs/*.adsi; do \
dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
- if [ -f $${dst} ] ; then \
+ if [ -f "$${dst}" ] ; then \
echo "Overwriting $$x" ; \
else \
echo "Installing $$x" ; \
fi ; \
- $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
+ $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \
done
samples: adsi
@echo Installing other config files...
@for x in configs/*.sample; do \
dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`" ; \
- if [ -f $${dst} ]; then \
+ if [ -f "$${dst}" ]; then \
if [ "$(OVERWRITE)" = "y" ]; then \
- if cmp -s $${dst} $$x ; then \
+ if cmp -s "$${dst}" "$$x" ; then \
echo "Config file $$x is unchanged"; \
continue; \
fi ; \
- mv -f $${dst} $${dst}.old ; \
+ mv -f "$${dst}" "$${dst}.old" ; \
else \
echo "Skipping config file $$x"; \
continue; \
fi ;\
fi ; \
echo "Installing file $$x"; \
- $(INSTALL) -m 644 $$x $${dst} ;\
+ $(INSTALL) -m 644 "$$x" "$${dst}" ;\
done
if [ "$(OVERWRITE)" = "y" ]; then \
echo "Updating asterisk.conf" ; \
@@ -866,7 +857,7 @@
rm -f "$(DESTDIR)$(ASTMANDIR)/man8/safe_asterisk.8"
$(MAKE) -C sounds uninstall
-uninstall: preinstall_spaces _uninstall postinstall_spaces
+uninstall: _uninstall
@echo " +--------- Asterisk Uninstall Complete -----+"
@echo " + Asterisk binaries, sounds, man pages, +"
@echo " + headers, modules, and firmware builds, +"
Modified: team/oej/pinerana-lock-mwipvt-trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/UPGRADE.txt?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/UPGRADE.txt (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/UPGRADE.txt Mon Sep 12 06:20:46 2011
@@ -26,6 +26,13 @@
- ENUM query functions now return a count of -1 on lookup error to
differentiate between a failed query and a successful query with 0 results
matching the specified type.
+
+Configuration Files:
+ - Files listed below have been updated to be more consistent with how Asterisk
+ parses configuration files. This makes configuration files more consistent
+ with what is expected across modules.
+
+ - cdr.conf: [general] section
From 1.8 to 10:
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/chan_mobile.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/chan_mobile.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/chan_mobile.c Mon Sep 12 06:20:46 2011
@@ -1318,21 +1318,10 @@
static int mbl_ast_hangup(struct mbl_pvt *pvt)
{
- int res = 0;
- for (;;) {
- if (pvt->owner) {
- if (ast_channel_trylock(pvt->owner)) {
- DEADLOCK_AVOIDANCE(&pvt->lock);
- } else {
- res = ast_hangup(pvt->owner);
- /* no need to unlock, ast_hangup() frees the
- * channel */
- break;
- }
- } else
- break;
- }
- return res;
+ if (pvt->owner) {
+ ast_hangup(pvt->owner);
+ }
+ return 0;
}
/*!
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/chan_ooh323.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/chan_ooh323.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/chan_ooh323.c Mon Sep 12 06:20:46 2011
@@ -1243,21 +1243,24 @@
ast_mutex_lock(&p->lock);
switch (condition) {
+ case AST_CONTROL_INCOMPLETE:
+ /* While h323 does support overlapped dialing, this channel driver does not
+ * at this time. Treat a response of Incomplete as if it were congestion.
+ */
case AST_CONTROL_CONGESTION:
if (!ast_test_flag(p, H323_ALREADYGONE)) {
- ooHangCall(callToken, OO_REASON_LOCAL_CONGESTED,
- AST_CAUSE_SWITCH_CONGESTION);
+ ooHangCall(callToken, OO_REASON_LOCAL_CONGESTED, AST_CAUSE_SWITCH_CONGESTION);
ast_set_flag(p, H323_ALREADYGONE);
}
break;
case AST_CONTROL_BUSY:
if (!ast_test_flag(p, H323_ALREADYGONE)) {
- ooHangCall(callToken, OO_REASON_LOCAL_BUSY, AST_CAUSE_USER_BUSY);
+ ooHangCall(callToken, OO_REASON_LOCAL_BUSY, AST_CAUSE_USER_BUSY);
ast_set_flag(p, H323_ALREADYGONE);
}
break;
case AST_CONTROL_HOLD:
- ast_moh_start(ast, data, NULL);
+ ast_moh_start(ast, data, NULL);
break;
case AST_CONTROL_UNHOLD:
ast_moh_stop(ast);
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.c Mon Sep 12 06:20:46 2011
@@ -63,6 +63,7 @@
}
memset(call, 0, sizeof(OOH323CallData));
ast_cond_init(&call->gkWait, NULL);
+ ast_mutex_init(&call->GkLock);
ast_mutex_init(&call->Lock);
call->pctxt = pctxt;
call->msgctxt = msgctxt;
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.h?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.h (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooCalls.h Mon Sep 12 06:20:46 2011
@@ -151,6 +151,7 @@
OOCTXT *msgctxt;
pthread_t callThread;
ast_cond_t gkWait;
+ ast_mutex_t GkLock;
ast_mutex_t Lock;
OOBOOL Monitor;
OOBOOL fsSent;
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooGkClient.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooGkClient.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooGkClient.c Mon Sep 12 06:20:46 2011
@@ -431,7 +431,7 @@
if(iRet != OO_OK)
{
OOTRACEERR1("Error: Failed to handle received RAS message\n");
- //pGkClient->state = GkClientFailed;
+ pGkClient->state = GkClientFailed;
}
memReset(pctxt);
}
@@ -1921,6 +1921,8 @@
OOTimer *pTimer = NULL;
char ip[20];
+ ast_mutex_lock(&pGkClient->Lock);
+
/* Search call in pending calls list */
for(x=0 ; x<pGkClient->callsPendingList.count; x++)
{
@@ -1931,6 +1933,9 @@
OOTRACEDBGC3("Found Pending call(%s, %s)\n",
pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
+
+ ast_mutex_lock(&pCallAdmInfo->call->GkLock);
+
/* Populate Remote IP */
if(pAdmissionConfirm->destCallSignalAddress.t !=
T_H225TransportAddress_ipAddress)
@@ -1939,6 +1944,9 @@
"Gatekeeper is not an IPv4 address\n");
OOTRACEINFO1("Ignoring ACF, will wait for timeout and retransmit "
"ARQ\n");
+ ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
+ ast_mutex_unlock(&pGkClient->Lock);
+ ast_cond_signal(&pCallAdmInfo->call->gkWait);
return OO_FAILED;
}
ipAddress = pAdmissionConfirm->destCallSignalAddress.u.ipAddress;
@@ -2000,15 +2008,15 @@
pCallAdmInfo->call->callToken);
pCallAdmInfo->call->callState = OO_CALL_CONNECTING;
- /* ooH323CallAdmitted( pCallAdmInfo->call); */
dListRemove(&pGkClient->callsPendingList, pNode);
dListAppend(&pGkClient->ctxt, &pGkClient->callsAdmittedList,
pNode->data);
memFreePtr(&pGkClient->ctxt, pNode);
+ ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
+ ast_mutex_unlock(&pGkClient->Lock);
ast_cond_signal(&pCallAdmInfo->call->gkWait);
return OO_OK;
- break;
}
else
{
@@ -2017,6 +2025,7 @@
}
OOTRACEERR1("Error: Failed to process ACF as there is no corresponding "
"pending call\n");
+ ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
@@ -2029,6 +2038,8 @@
DListNode *pNode=NULL, *pNode1=NULL;
OOH323CallData *call=NULL;
OOTimer *pTimer = NULL;
+
+ ast_mutex_lock(&pGkClient->Lock);
/* Search call in pending calls list */
for(x=0 ; x<pGkClient->callsPendingList.count; x++)
@@ -2046,6 +2057,7 @@
OOTRACEWARN2("Received admission reject with request number %d can not"
" be matched with any pending call.\n",
pAdmissionReject->requestSeqNum);
+ ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
else{
@@ -2054,6 +2066,7 @@
memFreePtr(&pGkClient->ctxt, pCallAdmInfo);
memFreePtr(&pGkClient->ctxt, pNode);
}
+ ast_mutex_lock(&pCallAdmInfo->call->GkLock);
/* Delete ARQ timer */
for(y=0; y<pGkClient->timerList.count; y++)
@@ -2118,6 +2131,8 @@
break;
}
+ ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
+ ast_mutex_unlock(&pGkClient->Lock);
ast_cond_signal(&pCallAdmInfo->call->gkWait);
return OO_OK;
}
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/oochannels.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/oochannels.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/oochannels.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/oochannels.c Mon Sep 12 06:20:46 2011
@@ -960,6 +960,7 @@
ast_mutex_lock(&call->Lock);
ast_mutex_unlock(&call->Lock);
ast_mutex_destroy(&call->Lock);
+ ast_mutex_destroy(&call->GkLock);
ast_cond_destroy(&call->gkWait);
pctxt = call->pctxt;
freeContext(pctxt);
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooh323.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooh323.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooh323.c Mon Sep 12 06:20:46 2011
@@ -371,7 +371,7 @@
H225TransportAddress_ip6Address_ip *ip6 = NULL;
Q931InformationElement* pDisplayIE=NULL;
OOAliases *pAlias=NULL;
- char remoteIP[2+8*4+7];
+ char remoteIP[2+8*4+7] = "";
call->callReference = q931Msg->callReference;
@@ -529,6 +529,7 @@
OOTRACEERR5("ERROR: Security denial remote sig IP isn't a socket ip, %s not %s "
"(%s, %s)\n", remoteIP, call->remoteIP, call->callType,
call->callToken);
+ return OO_FAILED;
}
/* check for fast start */
@@ -1638,12 +1639,15 @@
case Q931SetupMsg: /* SETUP message is received */
OOTRACEINFO3("Received SETUP message (%s, %s)\n", call->callType,
call->callToken);
- ooOnReceivedSetup(call, q931Msg);
-
+ ret = ooOnReceivedSetup(call, q931Msg);
+ if (ret != OO_OK) {
+ call->callState = OO_CALL_CLEAR;
+ } else {
+
/* H225 message callback */
- if(gH323ep.h225Callbacks.onReceivedSetup)
- ret = gH323ep.h225Callbacks.onReceivedSetup(call, q931Msg);
-
+ if(gH323ep.h225Callbacks.onReceivedSetup)
+ ret = gH323ep.h225Callbacks.onReceivedSetup(call, q931Msg);
+ }
/* Free up the mem used by the received message, as it's processing
is done.
*/
@@ -1661,23 +1665,24 @@
if(gH323ep.gkClient->state == GkClientRegistered)
{
call->callState = OO_CALL_WAITING_ADMISSION;
- ast_mutex_lock(&call->Lock);
ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call,
FALSE);
- tv = ast_tvnow();
+ tv = ast_tvnow();
ts.tv_sec = tv.tv_sec + 24;
- ts.tv_nsec = tv.tv_usec * 1000;
- ast_cond_timedwait(&call->gkWait, &call->Lock, &ts);
+ ts.tv_nsec = tv.tv_usec * 1000;
+ ast_mutex_lock(&call->GkLock);
+ if (call->callState == OO_CALL_WAITING_ADMISSION)
+ ast_cond_timedwait(&call->gkWait, &call->GkLock, &ts);
if (call->callState == OO_CALL_WAITING_ADMISSION)
call->callState = OO_CALL_CLEAR;
- ast_mutex_unlock(&call->Lock);
+ ast_mutex_unlock(&call->GkLock);
}
else {
- /* TODO: Should send Release complete with reject reason */
OOTRACEERR1("Error:Ignoring incoming call as not yet"
"registered with Gk\n");
call->callState = OO_CALL_CLEAR;
+ call->callEndReason = OO_REASON_GK_UNREACHABLE;
}
}
if (call->callState < OO_CALL_CLEAR) {
Modified: team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooq931.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooq931.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/addons/ooh323c/src/ooq931.c Mon Sep 12 06:20:46 2011
@@ -2266,19 +2266,24 @@
if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK))
{
- /* No need to check registration status here as it is already checked for
- MakeCall command */
-
- call->callState = OO_CALL_WAITING_ADMISSION;
- ast_mutex_lock(&call->Lock);
- ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call, FALSE);
- tv = ast_tvnow();
- ts.tv_sec = tv.tv_sec + 24;
- ts.tv_nsec = tv.tv_usec * 1000;
- ast_cond_timedwait(&call->gkWait, &call->Lock, &ts);
- if (call->callState == OO_CALL_WAITING_ADMISSION)
+ if(gH323ep.gkClient->state == GkClientRegistered) {
+ call->callState = OO_CALL_WAITING_ADMISSION;
+ ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call, FALSE);
+ tv = ast_tvnow();
+ ts.tv_sec = tv.tv_sec + 24;
+ ts.tv_nsec = tv.tv_usec * 1000;
+ ast_mutex_lock(&call->GkLock);
+ if (call->callState == OO_CALL_WAITING_ADMISSION)
+ ast_cond_timedwait(&call->gkWait, &call->GkLock, &ts);
+ if (call->callState == OO_CALL_WAITING_ADMISSION)
call->callState = OO_CALL_CLEAR;
- ast_mutex_unlock(&call->Lock);
+ ast_mutex_unlock(&call->GkLock);
+ } else {
+ OOTRACEERR1("Error:Aborting outgoing call as not yet"
+ "registered with Gk\n");
+ call->callState = OO_CALL_CLEAR;
+ call->callEndReason = OO_REASON_GK_UNREACHABLE;
+ }
}
Modified: team/oej/pinerana-lock-mwipvt-trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/apps/app_confbridge.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/apps/app_confbridge.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/apps/app_confbridge.c Mon Sep 12 06:20:46 2011
@@ -2623,14 +2623,14 @@
return -1;
}
if (!ao2_container_count(conference_bridges)) {
- ast_log(LOG_ERROR, "No active conferences.\n");
- return -1;
+ snprintf(buf, len, "0");
+ return 0;
}
ast_copy_string(tmp.name, args.confno, sizeof(tmp.name));
bridge = ao2_find(conference_bridges, &tmp, OBJ_POINTER);
if (!bridge) {
- ast_log(LOG_ERROR, "Conference '%s' not found.\n", args.confno);
- return -1;
+ snprintf(buf, len, "0");
+ return 0;
}
/* get the correct count for the type requested */
@@ -2654,9 +2654,7 @@
} else if (!strncasecmp(args.type, "locked", 6)) {
count = bridge->locked;
} else {
- ao2_unlock(bridge);
- ao2_ref(bridge, -1);
- return -1;
+ ast_log(LOG_ERROR, "Invalid keyword.\n");
}
snprintf(buf, len, "%d", count);
ao2_unlock(bridge);
Modified: team/oej/pinerana-lock-mwipvt-trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/apps/app_dial.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/apps/app_dial.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/apps/app_dial.c Mon Sep 12 06:20:46 2011
@@ -2423,14 +2423,6 @@
} else { /* Nobody answered, next please? */
res = 0;
}
-
- /* SIP, in particular, sends back this error code to indicate an
- * overlap dialled number needs more digits. */
- if (chan->hangupcause == AST_CAUSE_INVALID_NUMBER_FORMAT) {
- res = AST_PBX_INCOMPLETE;
- }
-
- /* almost done, although the 'else' block is 400 lines */
} else {
const char *number;
Modified: team/oej/pinerana-lock-mwipvt-trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/apps/app_queue.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/apps/app_queue.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/apps/app_queue.c Mon Sep 12 06:20:46 2011
@@ -1310,7 +1310,7 @@
static inline struct call_queue *queue_unref(struct call_queue *q)
{
ao2_ref(q, -1);
- return q;
+ return NULL;
}
#endif
@@ -1747,8 +1747,13 @@
ast_string_field_set(q, sound_thanks, "queue-thankyou");
ast_string_field_set(q, sound_reporthold, "queue-reporthold");
- if ((q->sound_periodicannounce[0] = ast_str_create(32)))
+ if (!q->sound_periodicannounce[0]) {
+ q->sound_periodicannounce[0] = ast_str_create(32);
+ }
+
+ if (q->sound_periodicannounce[0]) {
ast_str_set(&q->sound_periodicannounce[0], 0, "queue-periodic-announce");
+ }
for (i = 1; i < MAX_PERIODIC_ANNOUNCEMENTS; i++) {
if (q->sound_periodicannounce[i])
@@ -2376,6 +2381,7 @@
return q;
}
+/*! \note Returns a reference to the loaded realtime queue. */
static struct call_queue *load_realtime_queue(const char *queuename)
{
struct ast_variable *queue_vars;
@@ -2409,17 +2415,15 @@
}
if (q) {
prev_weight = q->weight ? 1 : 0;
+ queue_t_unref(q, "Need to find realtime queue");
}
ao2_lock(queues);
q = find_queue_by_name_rt(queuename, queue_vars, member_config);
- if (member_config) {
- ast_config_destroy(member_config);
- }
- if (queue_vars) {
- ast_variables_destroy(queue_vars);
- }
+ ast_config_destroy(member_config);
+ ast_variables_destroy(queue_vars);
+
/* update the use_weight value if the queue's has gained or lost a weight */
if (q) {
if (!q->weight && prev_weight) {
@@ -2522,6 +2526,7 @@
*reason = QUEUE_JOINEMPTY;
ao2_unlock(q);
ao2_unlock(queues);
+ queue_t_unref(q, "Done with realtime queue");
return res;
}
}
@@ -2585,6 +2590,7 @@
}
ao2_unlock(q);
ao2_unlock(queues);
+ queue_t_unref(q, "Done with realtime queue");
return res;
}
@@ -3371,7 +3377,7 @@
return 0;
}
-/*! \brief Playback announcement to queued members if peroid has elapsed */
+/*! \brief Playback announcement to queued members if period has elapsed */
static int say_periodic_announcement(struct queue_ent *qe, int ringing)
{
int res = 0;
@@ -7151,13 +7157,16 @@
* queues which have been deleted from realtime but which have not yet
* been deleted from the in-core container
*/
- if (q->realtime && !(realtime_queue = load_realtime_queue(q->name))) {
- ao2_unlock(q);
- queue_t_unref(q, "Done with iterator");
- continue;
- } else if (q->realtime) {
+ if (q->realtime) {
+ realtime_queue = load_realtime_queue(q->name);
+ if (!realtime_queue) {
+ ao2_unlock(q);
+ queue_t_unref(q, "Done with iterator");
+ continue;
+ }
queue_t_unref(realtime_queue, "Queue is already in memory");
}
+
if (argc == 3 && strcasecmp(q->name, argv[2])) {
ao2_unlock(q);
queue_t_unref(q, "Done with iterator");
@@ -8481,11 +8490,13 @@
i = ao2_iterator_init(queues, 0);
while ((queue = ao2_iterator_next(&i))) {
ao2_lock(queue);
- if (queue->realtime && !(queue_realtime = load_realtime_queue(queue->name))) {
- ao2_unlock(queue);
- queue_unref(queue);
- continue;
- } else if (queue->realtime) {
+ if (queue->realtime) {
+ queue_realtime = load_realtime_queue(queue->name);
+ if (!queue_realtime) {
+ ao2_unlock(queue);
+ queue_unref(queue);
+ continue;
+ }
queue_unref(queue_realtime);
}
@@ -8493,6 +8504,7 @@
ao2_unlock(queue);
queue_unref(queue);
}
+ ao2_iterator_destroy(&i);
return 0;
}
Modified: team/oej/pinerana-lock-mwipvt-trunk/apps/app_readexten.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/apps/app_readexten.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/apps/app_readexten.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/apps/app_readexten.c Mon Sep 12 06:20:46 2011
@@ -96,24 +96,6 @@
</variablelist>
</description>
</application>
- <function name="VALID_EXTEN" language="en_US">
- <synopsis>
- Determine whether an extension exists or not.
- </synopsis>
- <syntax>
- <parameter name="context">
- <para>Defaults to the current context</para>
- </parameter>
- <parameter name="extension" required="true" />
- <parameter name="priority">
- <para>Priority defaults to <literal>1</literal>.</para>
- </parameter>
- </syntax>
- <description>
- <para>Returns a true value if the indicated <replaceable>context</replaceable>,
- <replaceable>extension</replaceable>, and <replaceable>priority</replaceable> exist.</para>
- </description>
- </function>
***/
enum readexten_option_flags {
@@ -280,57 +262,15 @@
return status[0] == 'H' ? -1 : 0;
}
-static int acf_isexten_exec(struct ast_channel *chan, const char *cmd, char *parse, char *buffer, size_t buflen)
-{
- int priority_int;
- AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(context);
- AST_APP_ARG(extension);
- AST_APP_ARG(priority);
- );
-
- AST_STANDARD_APP_ARGS(args, parse);
-
- if (ast_strlen_zero(args.context))
- args.context = chan->context;
-
- if (ast_strlen_zero(args.extension)) {
- ast_log(LOG_WARNING, "Syntax: VALID_EXTEN([<context>],<extension>[,<priority>]) - missing argument <extension>!\n");
- return -1;
- }
-
- if (ast_strlen_zero(args.priority))
- priority_int = 1;
- else
- priority_int = atoi(args.priority);
-
- if (ast_exists_extension(chan, args.context, args.extension, priority_int,
- S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
- ast_copy_string(buffer, "1", buflen);
- } else {
- ast_copy_string(buffer, "0", buflen);
- }
-
- return 0;
-}
-
-static struct ast_custom_function acf_isexten = {
- .name = "VALID_EXTEN",
- .read = acf_isexten_exec,
-};
-
static int unload_module(void)
{
int res = ast_unregister_application(app);
- res |= ast_custom_function_unregister(&acf_isexten);
-
- return res;
+ return res;
}
static int load_module(void)
{
int res = ast_register_application_xml(app, readexten_exec);
- res |= ast_custom_function_register(&acf_isexten);
return res;
}
Modified: team/oej/pinerana-lock-mwipvt-trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinerana-lock-mwipvt-trunk/apps/app_voicemail.c?view=diff&rev=335276&r1=335275&r2=335276
==============================================================================
--- team/oej/pinerana-lock-mwipvt-trunk/apps/app_voicemail.c (original)
+++ team/oej/pinerana-lock-mwipvt-trunk/apps/app_voicemail.c Mon Sep 12 06:20:46 2011
@@ -916,6 +916,7 @@
static int is_valid_dtmf(const char *key);
static void read_password_from_file(const char *secretfn, char *password, int passwordlen);
static int write_password_to_file(const char *secretfn, const char *password);
+static const char *substitute_escapes(const char *value);
struct ao2_container *inprocess_container;
@@ -1008,10 +1009,11 @@
* - the exitcontext
* - vmmaxsecs, vmmaxmsg, maxdeletedmsg
* - volume gain.
+ * - emailsubject, emailbody set to NULL
*/
static void populate_defaults(struct ast_vm_user *vmu)
{
- ast_copy_flags(vmu, (&globalflags), AST_FLAGS_ALL);
+ ast_copy_flags(vmu, (&globalflags), AST_FLAGS_ALL);
vmu->passwordlocation = passwordlocation;
if (saydurationminfo) {
vmu->saydurationm = saydurationminfo;
@@ -1034,7 +1036,9 @@
vmu->maxdeletedmsg = maxdeletedmsg;
}
vmu->volgain = volgain;
+ ast_free(vmu->emailsubject);
vmu->emailsubject = NULL;
+ ast_free(vmu->emailbody);
vmu->emailbody = NULL;
#ifdef IMAP_STORAGE
ast_copy_string(vmu->imapfolder, imapfolder, sizeof(vmu->imapfolder));
@@ -1058,6 +1062,12 @@
ast_copy_string(vmu->attachfmt, value, sizeof(vmu->attachfmt));
} else if (!strcasecmp(var, "serveremail")) {
ast_copy_string(vmu->serveremail, value, sizeof(vmu->serveremail));
+ } else if (!strcasecmp(var, "emailbody")) {
+ ast_free(vmu->emailbody);
+ vmu->emailbody = ast_strdup(substitute_escapes(value));
+ } else if (!strcasecmp(var, "emailsubject")) {
+ ast_free(vmu->emailsubject);
+ vmu->emailsubject = ast_strdup(substitute_escapes(value));
} else if (!strcasecmp(var, "language")) {
ast_copy_string(vmu->language, value, sizeof(vmu->language));
} else if (!strcasecmp(var, "tz")) {
@@ -1276,6 +1286,7 @@
ast_realtime_require_field("voicemail", "password", RQ_CHAR, strlen(password), SENTINEL);
}
if (ast_update2_realtime("voicemail", "context", vmu->context, "mailbox", vmu->mailbox, SENTINEL, "password", password, SENTINEL) > 0) {
+ ast_test_suite_event_notify("PASSWORDCHANGED", "Message: realtime engine updated with new password\r\nPasswordSource: realtime");
ast_copy_string(vmu->password, password, sizeof(vmu->password));
res = 0;
}
@@ -1329,9 +1340,11 @@
} else if (!strcasecmp(var->name, "context")) {
ast_copy_string(retval->context, var->value, sizeof(retval->context));
} else if (!strcasecmp(var->name, "emailsubject")) {
- retval->emailsubject = ast_strdup(var->value);
+ ast_free(retval->emailsubject);
+ retval->emailsubject = ast_strdup(substitute_escapes(var->value));
} else if (!strcasecmp(var->name, "emailbody")) {
- retval->emailbody = ast_strdup(var->value);
+ ast_free(retval->emailbody);
+ retval->emailbody = ast_strdup(substitute_escapes(var->value));
#ifdef IMAP_STORAGE
} else if (!strcasecmp(var->name, "imapuser")) {
ast_copy_string(retval->imapuser, var->value, sizeof(retval->imapuser));
@@ -1442,7 +1455,11 @@
if (cur) {
/* Make a copy, so that on a reload, we have no race */
if ((vmu = (ivm ? ivm : ast_malloc(sizeof(*vmu))))) {
- memcpy(vmu, cur, sizeof(*vmu));
+ *vmu = *cur;
+ if (!ivm) {
+ vmu->emailbody = ast_strdup(cur->emailbody);
+ vmu->emailsubject = ast_strdup(cur->emailsubject);
+ }
ast_set2_flag(vmu, !ivm, VM_ALLOCED);
AST_LIST_NEXT(vmu, list) = NULL;
}
@@ -1507,6 +1524,7 @@
case OPT_PWLOC_SPOOLDIR:
snprintf(secretfn, sizeof(secretfn), "%s%s/%s/secret.conf", VM_SPOOL_DIR, vmu->context, vmu->mailbox);
if (write_password_to_file(secretfn, newpassword) == 0) {
+ ast_test_suite_event_notify("PASSWORDCHANGED", "Message: secret.conf updated with new password\r\nPasswordSource: secret.conf");
ast_verb(4, "Writing voicemail password to file %s succeeded\n", secretfn);
reset_user_pw(vmu->context, vmu->mailbox, newpassword);
ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
@@ -1541,6 +1559,7 @@
}
/* save the results */
[... 5152 lines stripped ...]
More information about the asterisk-commits
mailing list