aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 18:08:09 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 18:08:09 +0000
commit2f30a3a6e7ae5721ed086155a63f22c33c495382 (patch)
treef7eb76f243ca169acc08d6d90b25b1c191e421e3 /main/asterisk.c
parent2ee27fd87f55632e832d749c5fe6739a68aeb913 (diff)
Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@123332 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index d67d7f0da..60c49070c 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -86,7 +86,7 @@ int daemon(int, int); /* defined in libresolv of all places */
#include <sys/loadavg.h>
#endif
-#include "asterisk/zapata.h"
+#include "asterisk/dahdi.h"
#ifdef linux
#include <sys/prctl.h>
@@ -165,6 +165,7 @@ int option_maxfiles; /*!< Max number of open file handles (files, sockets) */
#if defined(HAVE_SYSINFO)
long option_minmemfree; /*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
#endif
+char dahdi_chan_name[AST_CHANNEL_NAME] = "ZAP";
/*! @} */
@@ -2540,7 +2541,7 @@ static int show_cli_help(void) {
printf(" -g Dump core in case of a crash\n");
printf(" -h This help screen\n");
printf(" -i Initialize crypto keys at startup\n");
- printf(" -I Enable internal timing if Zaptel timer is available\n");
+ printf(" -I Enable internal timing if DAHDI timer is available\n");
printf(" -L <load> Limit the maximum load average before rejecting new calls\n");
printf(" -M <value> Limit the maximum number of calls to the specified value\n");
printf(" -m Mute debugging and console output on the console\n");
@@ -3262,28 +3263,28 @@ int main(int argc, char *argv[])
printf("%s", term_quit());
exit(1);
}
-#ifdef HAVE_ZAPTEL
+#ifdef HAVE_DAHDI
{
int fd;
int x = 160;
- fd = open("/dev/zap/timer", O_RDWR);
+ fd = open("/dev/dahdi/timer", O_RDWR);
if (fd >= 0) {
- if (ioctl(fd, ZT_TIMERCONFIG, &x)) {
- ast_log(LOG_ERROR, "You have Zaptel built and drivers loaded, but the Zaptel timer test failed to set ZT_TIMERCONFIG to %d.\n", x);
+ if (ioctl(fd, DAHDI_TIMERCONFIG, &x)) {
+ ast_log(LOG_ERROR, "You have DAHDI built and drivers loaded, but the DAHDI timer test failed to set DAHDI_TIMERCONFIG to %d.\n", x);
exit(1);
}
if ((x = ast_wait_for_input(fd, 300)) < 0) {
- ast_log(LOG_ERROR, "You have Zaptel built and drivers loaded, but the Zaptel timer could not be polled during the Zaptel timer test.\n");
+ ast_log(LOG_ERROR, "You have DAHDI built and drivers loaded, but the DAHDI timer could not be polled during the DAHDI timer test.\n");
exit(1);
}
if (!x) {
- const char zaptel_timer_error[] = {
- "Asterisk has detected a problem with your Zaptel configuration and will shutdown for your protection. You have options:"
- "\n\t1. You only have to compile Zaptel support into Asterisk if you need it. One option is to recompile without Zaptel support."
- "\n\t2. You only have to load Zaptel drivers if you want to take advantage of Zaptel services. One option is to unload zaptel modules if you don't need them."
- "\n\t3. If you need Zaptel services, you must correctly configure Zaptel."
+ const char dahdi_timer_error[] = {
+ "Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection. You have options:"
+ "\n\t1. You only have to compile DAHDI support into Asterisk if you need it. One option is to recompile without DAHDI support."
+ "\n\t2. You only have to load DAHDI drivers if you want to take advantage of DAHDI services. One option is to unload DAHDI modules if you don't need them."
+ "\n\t3. If you need DAHDI services, you must correctly configure DAHDI."
};
- ast_log(LOG_ERROR, "%s\n", zaptel_timer_error);
+ ast_log(LOG_ERROR, "%s\n", dahdi_timer_error);
usleep(100);
exit(1);
}