aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-20 23:03:28 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-20 23:03:28 +0000
commitb92cb01a14a979d5f3a8ca4428a6df183b54bdfb (patch)
tree7677255d7b0e954ef54e63a19f83543825830494
parent1c49fe2fd50a41e31ab057327d6a8fb1777970be (diff)
parent69aae03f564bd37085da1f12d31c7a6d0e19ac93 (diff)
Creating tag for the release of asterisk-1.4.0-beta1
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.0-beta1@43394 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--.lastclean1
-rw-r--r--.version1
-rw-r--r--ChangeLog3
-rw-r--r--channels/chan_agent.c26
-rw-r--r--main/astmm.c4
-rw-r--r--sounds/Makefile135
6 files changed, 111 insertions, 59 deletions
diff --git a/.lastclean b/.lastclean
deleted file mode 100644
index a45fd52cc..000000000
--- a/.lastclean
+++ /dev/null
@@ -1 +0,0 @@
-24
diff --git a/.version b/.version
deleted file mode 100644
index 1cb3380db..000000000
--- a/.version
+++ /dev/null
@@ -1 +0,0 @@
-1.4.0-beta1
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index ca2ed4f5c..000000000
--- a/ChangeLog
+++ /dev/null
@@ -1,3 +0,0 @@
-2006-09-20 Kevin P. Fleming <kpfleming@digium.com>
-
- * Asterisk 1.4.0-beta1 released.
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 148da4266..92027fb5e 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -1006,9 +1006,13 @@ static struct ast_channel *agent_new(struct agent_pvt *p, int state)
static int read_agent_config(void)
{
struct ast_config *cfg;
+ struct ast_config *ucfg;
struct ast_variable *v;
struct agent_pvt *p;
const char *general_val;
+ const char *catname;
+ const char *hasagent;
+ int genhasagent;
group = 0;
autologoff = 0;
@@ -1104,6 +1108,28 @@ static int read_agent_config(void)
}
v = v->next;
}
+ if ((ucfg = ast_config_load("users.conf"))) {
+ genhasagent = ast_true(ast_variable_retrieve(ucfg, "general", "hasagent"));
+ catname = ast_category_browse(ucfg, NULL);
+ while(catname) {
+ if (strcasecmp(catname, "general")) {
+ hasagent = ast_variable_retrieve(ucfg, catname, "hasagent");
+ if (ast_true(hasagent) || (!hasagent && genhasagent)) {
+ char tmp[256];
+ const char *fullname = ast_variable_retrieve(ucfg, catname, "fullname");
+ const char *secret = ast_variable_retrieve(ucfg, catname, "secret");
+ if (!fullname)
+ fullname = "";
+ if (!secret)
+ secret = "";
+ snprintf(tmp, sizeof(tmp), "%s,%s,%s", catname, secret,fullname);
+ add_agent(tmp, 0);
+ }
+ }
+ catname = ast_category_browse(ucfg, catname);
+ }
+ ast_config_destroy(ucfg);
+ }
AST_LIST_TRAVERSE_SAFE_BEGIN(&agents, p, list) {
if (p->dead) {
AST_LIST_REMOVE_CURRENT(&agents, list);
diff --git a/main/astmm.c b/main/astmm.c
index 3b184a6e8..55c80f618 100644
--- a/main/astmm.c
+++ b/main/astmm.c
@@ -378,8 +378,8 @@ static int handle_show_memory_summary(int fd, int argc, char *argv[])
/* Dump the whole list */
for (cur = list; cur; cur = cur->next) {
- len += list->len;
- count += list->count;
+ len += cur->len;
+ count += cur->count;
if (fn) {
ast_cli(fd, "%10d bytes in %5d allocations in function '%s' of '%s'\n",
cur->len, cur->count, cur->fn, fn);
diff --git a/sounds/Makefile b/sounds/Makefile
index d632e8a73..794a7dca8 100644
--- a/sounds/Makefile
+++ b/sounds/Makefile
@@ -15,64 +15,97 @@
-include $(ASTTOPDIR)/menuselect.makeopts
-PWD:=$(shell pwd)
SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
CORE_SOUNDS_VERSION:=1.4.2
EXTRA_SOUNDS_VERSION:=1.4.1
SOUNDS_URL:=http://ftp.digium.com/pub/telephony/sounds/releases
-MENUSELECT_CORE_SOUNDS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -FR-,-fr-,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -ES-,-es-,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -WAV,-wav,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -ULAW,-ulaw,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -ALAW,-alaw,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -GSM,-gsm,$(MENUSELECT_CORE_SOUNDS))
-MENUSELECT_CORE_SOUNDS:=$(subst -G729,-g729,$(MENUSELECT_CORE_SOUNDS))
-CORE_SOUNDS:=$(MENUSELECT_CORE_SOUNDS:CORE-SOUNDS-%=asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION).tar.gz)
-CORE_SOUND_TAGS:=$(MENUSELECT_CORE_SOUNDS:CORE-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -EN-,-en-,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -FR-,-fr-,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -ES-,-es-,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -WAV,-wav,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -ULAW,-ulaw,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -ALAW,-alaw,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -GSM,-gsm,$(MENUSELECT_EXTRA_SOUNDS))
-MENUSELECT_EXTRA_SOUNDS:=$(subst -G729,-g729,$(MENUSELECT_EXTRA_SOUNDS))
-EXTRA_SOUNDS:=$(MENUSELECT_EXTRA_SOUNDS:EXTRA-SOUNDS-%=asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION).tar.gz)
-EXTRA_SOUND_TAGS:=$(MENUSELECT_EXTRA_SOUNDS:EXTRA-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION))
-MENUSELECT_MOH:=$(subst -FREEPLAY-,-freeplay-,$(MENUSELECT_MOH))
-MENUSELECT_MOH:=$(subst -WAV,-wav,$(MENUSELECT_MOH))
-MENUSELECT_MOH:=$(subst -ULAW,-ulaw,$(MENUSELECT_MOH))
-MENUSELECT_MOH:=$(subst -ALAW,-alaw,$(MENUSELECT_MOH))
-MENUSELECT_MOH:=$(subst -GSM,-gsm,$(MENUSELECT_MOH))
-MENUSELECT_MOH:=$(subst -G729,-g729,$(MENUSELECT_MOH))
-MOH:=$(MENUSELECT_MOH:MOH-%=asterisk-moh-%.tar.gz)
-MOH_TAGS:=$(MENUSELECT_MOH:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
+MCS:=$(subst -EN-,-en-,$(MENUSELECT_CORE_SOUNDS))
+MCS:=$(subst -FR-,-fr-,$(MCS))
+MCS:=$(subst -ES-,-es-,$(MCS))
+MCS:=$(subst -WAV,-wav,$(MCS))
+MCS:=$(subst -ULAW,-ulaw,$(MCS))
+MCS:=$(subst -ALAW,-alaw,$(MCS))
+MCS:=$(subst -GSM,-gsm,$(MCS))
+MCS:=$(subst -G729,-g729,$(MCS))
+CORE_SOUNDS:=$(MCS:CORE-SOUNDS-%=asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION).tar.gz)
+CORE_SOUND_TAGS:=$(MCS:CORE-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-core-sounds-%-$(CORE_SOUNDS_VERSION))
+MES:=$(subst -EN-,-en-,$(MENUSELECT_EXTRA_SOUNDS))
+MES:=$(subst -FR-,-fr-,$(MES))
+MES:=$(subst -ES-,-es-,$(MES))
+MES:=$(subst -WAV,-wav,$(MES))
+MES:=$(subst -ULAW,-ulaw,$(MES))
+MES:=$(subst -ALAW,-alaw,$(MES))
+MES:=$(subst -GSM,-gsm,$(MES))
+MES:=$(subst -G729,-g729,$(MES))
+EXTRA_SOUNDS:=$(MES:EXTRA-SOUNDS-%=asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION).tar.gz)
+EXTRA_SOUND_TAGS:=$(MES:EXTRA-SOUNDS-%=$(SOUNDS_DIR)/.asterisk-extra-sounds-%-$(EXTRA_SOUNDS_VERSION))
+MM:=$(subst -FREEPLAY-,-freeplay-,$(MENUSELECT_MOH))
+MM:=$(subst -WAV,-wav,$(MM))
+MM:=$(subst -ULAW,-ulaw,$(MM))
+MM:=$(subst -ALAW,-alaw,$(MM))
+MM:=$(subst -GSM,-gsm,$(MM))
+MM:=$(subst -G729,-g729,$(MM))
+MOH:=$(MM:MOH-%=asterisk-moh-%.tar.gz)
+MOH_TAGS:=$(MM:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
WGET_ARGS:=--continue
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
-$(SOUNDS_DIR)/.asterisk-core-sounds-en-%: asterisk-core-sounds-en-%.tar.gz $(SOUNDS_DIR)
- cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
-
-$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%: asterisk-core-sounds-fr-%.tar.gz $(SOUNDS_DIR)/fr
- cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
-
-$(SOUNDS_DIR)/.asterisk-core-sounds-es-%: asterisk-core-sounds-es-%.tar.gz $(SOUNDS_DIR)/es
- cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/es -
-
-$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%: asterisk-extra-sounds-en-%.tar.gz $(SOUNDS_DIR)
- cat $< | gzip -d | tar xCf $(SOUNDS_DIR) -
-
-$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%: asterisk-extra-sounds-fr-%.tar.gz $(SOUNDS_DIR)/fr
- cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/fr -
-
-$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%: asterisk-extra-sounds-es-%.tar.gz $(SOUNDS_DIR)/es
- cat $< | gzip -d | tar xCf $(SOUNDS_DIR)/es -
-
-$(MOH_DIR)/.asterisk-moh-%: asterisk-moh-%.tar.gz $(MOH_DIR)
- cat $< | gzip -d | tar xCf $(MOH_DIR) -
+$(SOUNDS_DIR)/.asterisk-core-sounds-en-%:
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+ cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR) - && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-core-sounds-es-%:
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+ cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/es - && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-core-sounds-fr-%:
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(CORE_SOUNDS_VERSION),,$@)-* && \
+ cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/fr - && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-en-%:
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+ cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR) - && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-es-%:
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+ cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/es - && \
+ touch $@
+
+$(SOUNDS_DIR)/.asterisk-extra-sounds-fr-%:
+ @PACKAGE=$(subst $(SOUNDS_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ rm -f $(subst -$(EXTRA_SOUNDS_VERSION),,$@)-* && \
+ cat $${PACKAGE} | gzip -d | tar xCf $(SOUNDS_DIR)/fr - && \
+ touch $@
+
+$(MOH_DIR)/.asterisk-moh-%:
+ @PACKAGE=$(subst $(MOH_DIR)/.asterisk,asterisk,$@).tar.gz; \
+ if test ! -f $${PACKAGE}; then wget $(WGET_ARGS) $(SOUNDS_URL)/$${PACKAGE}; fi; \
+ if test ! -f $${PACKAGE}; then exit 1; fi; \
+ cat $${PACKAGE} | gzip -d | tar xCf $(MOH_DIR) - && \
+ touch $@
asterisk-core-%.tar.gz:
@wget $(WGET_ARGS) $(SOUNDS_URL)/$@
@@ -86,12 +119,10 @@ asterisk-moh-%.tar.gz:
dist-clean:
rm -f *.tar.gz
-.PHONY: $(SOUNDS_DIR) $(SOUNDS_DIR)/fr $(SOUNDS_DIR)/es $(MOH_DIR)
-
$(SOUNDS_DIR) $(MOH_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr:
mkdir -p $@
-install: $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
+install: $(SOUNDS_DIR) $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
uninstall:
rm -rf $(SOUNDS_DIR)