]> git.pld-linux.org Git - packages/asterisk.git/commitdiff
This commit was manufactured by cvs2git to create branch 'ASTERISK_1_4'.
authorcvs2git <feedback@pld-linux.org>
Sat, 10 Jun 2006 22:13:58 +0000 (22:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Sprout from master 2006-06-10 22:13:58 UTC Arkadiusz Miśkiewicz <arekm@maven.pl> '- fixed'
Delete:
    app_rxfax.c
    app_txfax.c
    apps_Makefile.patch
    asterisk-Makefile_fix_gcc33.patch
    asterisk.spec

app_rxfax.c [deleted file]
app_txfax.c [deleted file]
apps_Makefile.patch [deleted file]
asterisk-Makefile_fix_gcc33.patch [deleted file]
asterisk.spec [deleted file]

diff --git a/app_rxfax.c b/app_rxfax.c
deleted file mode 100644 (file)
index e167a2e..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Asterisk -- A telephony toolkit for Linux.
- *
- * Trivial application to receive a TIFF FAX file
- * 
- * Copyright (C) 2003, Steve Underwood
- *
- * Steve Underwood <steveu@coppice.org>
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License
- */
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <errno.h>
-#include <tiffio.h>
-
-#include <spandsp.h>
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/lock.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
-#include "asterisk/pbx.h"
-#include "asterisk/module.h"
-#include "asterisk/translate.h"
-#include "asterisk/dsp.h"
-#include "asterisk/manager.h"
-
-static char *tdesc = "Trivial FAX Receive Application";
-
-static char *app = "RxFAX";
-
-static char *synopsis = "Receive a FAX to a file";
-
-static char *descrip = 
-"  RxFAX(filename[|caller][|debug]): Receives a FAX from the channel into the\n"
-"given filename. If the file exists it will be overwritten. The file\n"
-"should be in TIFF/F format.\n"
-"The \"caller\" option makes the application behave as a calling machine,\n"
-"rather than the answering machine. The default behaviour is to behave as\n"
-"an answering machine.\n"
-"Uses LOCALSTATIONID to identify itself to the remote end.\n"
-"     LOCALHEADERINFO to generate a header line on each page.\n"
-"Sets REMOTESTATIONID to the sender CSID.\n"
-"     FAXPAGES to the number of pages received.\n"
-"     FAXBITRATE to the transmition rate.\n"
-"     FAXRESOLUTION to the resolution.\n"
-"Returns -1 when the user hangs up.\n"
-"Returns 0 otherwise.\n";
-
-STANDARD_LOCAL_USER;
-
-LOCAL_USER_DECL;
-
-#define MAX_BLOCK_SIZE 240
-
-static void span_message(int level, const char *msg)
-{
-    int ast_level;
-    
-    if (level == SPAN_LOG_WARNING)
-        ast_level = __LOG_WARNING;
-    else if (level == SPAN_LOG_WARNING)
-        ast_level = __LOG_WARNING;
-    else
-        ast_level = __LOG_DEBUG;
-    ast_log(ast_level, __FILE__, __LINE__, __PRETTY_FUNCTION__, msg);
-}
-/*- End of function --------------------------------------------------------*/
-
-static void t30_flush(t30_state_t *s, int which)
-{
-    //TODO:
-}
-/*- End of function --------------------------------------------------------*/
-
-static void phase_e_handler(t30_state_t *s, void *user_data, int result)
-{
-    struct ast_channel *chan;
-    t30_stats_t t;
-    char local_ident[21];
-    char far_ident[21];
-    char buf[11];
-    
-    chan = (struct ast_channel *) user_data;
-    if (result == T30_ERR_OK)
-    {
-        t30_get_transfer_statistics(s, &t);
-        t30_get_far_ident(s, far_ident);
-        t30_get_local_ident(s, local_ident);
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-        ast_log(LOG_DEBUG, "Fax successfully received.\n");
-        ast_log(LOG_DEBUG, "Remote station id: %s\n", far_ident);
-        ast_log(LOG_DEBUG, "Local station id:  %s\n", local_ident);
-        ast_log(LOG_DEBUG, "Pages transferred: %i\n", t.pages_transferred);
-        ast_log(LOG_DEBUG, "Image resolution:  %i x %i\n", t.column_resolution, t.row_resolution);
-        ast_log(LOG_DEBUG, "Transfer Rate:     %i\n", t.bit_rate);
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-        manager_event(EVENT_FLAG_CALL,
-                      "FaxReceived", "Channel: %s\nExten: %s\nCallerID: %s\nRemoteStationID: %s\nLocalStationID: %s\nPagesTransferred: %i\nResolution: %i\nTransferRate: %i\nFileName: %s\n",
-                      chan->name,
-                      chan->exten,
-                      (chan->cid.cid_num)  ?  chan->cid.cid_num  :  "",
-                      far_ident,
-                      local_ident,
-                      t.pages_transferred,
-                      t.row_resolution,
-                      t.bit_rate,
-                      s->rx_file);
-        pbx_builtin_setvar_helper(chan, "REMOTESTATIONID", far_ident);
-        snprintf(buf, sizeof(buf), "%i", t.pages_transferred);
-        pbx_builtin_setvar_helper(chan, "FAXPAGES", buf);
-        snprintf(buf, sizeof(buf), "%i", t.row_resolution);
-        pbx_builtin_setvar_helper(chan, "FAXRESOLUTION", buf);
-        snprintf(buf, sizeof(buf), "%i", t.bit_rate);
-        pbx_builtin_setvar_helper(chan, "FAXBITRATE", buf);
-    }
-    else
-    {
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-        ast_log(LOG_DEBUG, "Fax receive not successful - result (%d) %s.\n", result, t30_completion_code_to_str(result));
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-    }
-}
-/*- End of function --------------------------------------------------------*/
-
-static void phase_d_handler(t30_state_t *s, void *user_data, int result)
-{
-    struct ast_channel *chan;
-    t30_stats_t t;
-    
-    chan = (struct ast_channel *) user_data;
-    if (result)
-    {
-        t30_get_transfer_statistics(s, &t);
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-        ast_log(LOG_DEBUG, "Pages transferred:  %i\n", t.pages_transferred);
-        ast_log(LOG_DEBUG, "Image size:         %i x %i\n", t.columns, t.rows);
-        ast_log(LOG_DEBUG, "Image resolution    %i x %i\n", t.column_resolution, t.row_resolution);
-        ast_log(LOG_DEBUG, "Transfer Rate:      %i\n", t.bit_rate);
-        ast_log(LOG_DEBUG, "Bad rows            %i\n", t.bad_rows);
-        ast_log(LOG_DEBUG, "Longest bad row run %i\n", t.longest_bad_row_run);
-        ast_log(LOG_DEBUG, "Compression type    %i\n", t.encoding);
-        ast_log(LOG_DEBUG, "Image size (bytes)  %i\n", t.image_size);
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-    }
-}
-/*- End of function --------------------------------------------------------*/
-
-static int rxfax_exec(struct ast_channel *chan, void *data)
-{
-    int res = 0;
-    char template_file[256];
-    char target_file[256];
-    char *s;
-    char *t;
-    char *v;
-    char *x;
-    int option;
-    int len;
-    int i;
-    t30_state_t fax;
-    int calling_party;
-    int verbose;
-    int samples;
-
-    struct localuser *u;
-    struct ast_frame *inf = NULL;
-    struct ast_frame outf;
-
-    int original_read_fmt;
-    int original_write_fmt;
-    
-    uint8_t __buf[sizeof(uint16_t)*MAX_BLOCK_SIZE + 2*AST_FRIENDLY_OFFSET];
-    uint8_t *buf = __buf + AST_FRIENDLY_OFFSET;
-
-    if (chan == NULL)
-    {
-        ast_log(LOG_WARNING, "Fax receive channel is NULL. Giving up.\n");
-        return -1;
-    }
-
-    span_set_message_handler(span_message);
-
-    /* The next few lines of code parse out the filename and header from the input string */
-    if (data == NULL)
-    {
-        /* No data implies no filename or anything is present */
-        ast_log(LOG_WARNING, "Rxfax requires an argument (filename)\n");
-        return -1;
-    }
-    
-    calling_party = FALSE;
-    verbose = FALSE;
-    target_file[0] = '\0';
-
-    for (option = 0, v = s = data;  v;  option++, s++)
-    {
-        t = s;
-        v = strchr(s, '|');
-        s = (v)  ?  v  :  s + strlen(s);
-        strncpy((char *) buf, t, s - t);
-        buf[s - t] = '\0';
-        if (option == 0)
-        {
-            /* The first option is always the file name */
-            len = s - t;
-            if (len > 255)
-                len = 255;
-            strncpy(target_file, t, len);
-            target_file[len] = '\0';
-            /* Allow the use of %d in the file name for a wild card of sorts, to
-               create a new file with the specified name scheme */
-            if ((x = strchr(target_file, '%'))  &&  x[1] == 'd')
-            {
-                strcpy(template_file, target_file);
-                i = 0;
-                do
-                {
-                    snprintf(target_file, 256, template_file, 1);
-                    i++;
-                }
-                while (ast_fileexists(target_file, "", chan->language) != -1);
-            }
-        }
-        else if (strncmp("caller", t, s - t) == 0)
-        {
-            calling_party = TRUE;
-        }
-        else if (strncmp("debug", t, s - t) == 0)
-        {
-            verbose = TRUE;
-        }
-    }
-
-    /* Done parsing */
-
-    LOCAL_USER_ADD(u);
-
-    if (chan->_state != AST_STATE_UP)
-    {
-        /* Shouldn't need this, but checking to see if channel is already answered
-         * Theoretically asterisk should already have answered before running the app */
-        res = ast_answer(chan);
-    }
-    
-    if (!res)
-    {
-        original_read_fmt = chan->readformat;
-        if (original_read_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
-            if (res < 0)
-            {
-                ast_log(LOG_WARNING, "Unable to set to linear read mode, giving up\n");
-                return -1;
-            }
-        }
-        original_write_fmt = chan->writeformat;
-        if (original_write_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
-            if (res < 0)
-            {
-                ast_log(LOG_WARNING, "Unable to set to linear write mode, giving up\n");
-                res = ast_set_read_format(chan, original_read_fmt);
-                if (res)
-                    ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
-                return -1;
-            }
-        }
-        fax_init(&fax, calling_party, NULL);
-        if (verbose)
-            fax.logging.level = SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW;
-        x = pbx_builtin_getvar_helper(chan, "LOCALSTATIONID");
-        if (x  &&  x[0])
-            t30_set_local_ident(&fax, x);
-        x = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO");
-        if (x  &&  x[0])
-            t30_set_header_info(&fax, x);
-        t30_set_rx_file(&fax, target_file, -1);
-        //t30_set_phase_b_handler(&fax, phase_b_handler, chan);
-        t30_set_phase_d_handler(&fax, phase_d_handler, chan);
-        t30_set_phase_e_handler(&fax, phase_e_handler, chan);
-        while (ast_waitfor(chan, -1) > -1)
-        {
-            inf = ast_read(chan);
-            if (inf == NULL)
-            {
-                res = -1;
-                break;
-            }
-            if (inf->frametype == AST_FRAME_VOICE)
-            {
-                if (fax_rx(&fax, inf->data, inf->samples))
-                    break;
-                samples = (inf->samples <= MAX_BLOCK_SIZE)  ?  inf->samples  :  MAX_BLOCK_SIZE;
-                len = fax_tx(&fax, (int16_t *) &buf[AST_FRIENDLY_OFFSET], samples);
-                if (len)
-                {
-                    memset(&outf, 0, sizeof(outf));
-                    outf.frametype = AST_FRAME_VOICE;
-                    outf.subclass = AST_FORMAT_SLINEAR;
-                    outf.datalen = len*sizeof(int16_t);
-                    outf.samples = len;
-                    outf.data = &buf[AST_FRIENDLY_OFFSET];
-                    outf.offset = AST_FRIENDLY_OFFSET;
-                    outf.src = "RxFAX";
-                    if (ast_write(chan, &outf) < 0)
-                    {
-                        ast_log(LOG_WARNING, "Unable to write frame to channel; %s\n", strerror(errno));
-                        break;
-                    }
-                }
-            }
-            ast_frfree(inf);
-        }
-        if (inf == NULL)
-        {
-            ast_log(LOG_DEBUG, "Got hangup\n");
-            res = -1;
-        }
-        if (original_read_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_read_format(chan, original_read_fmt);
-            if (res)
-                ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
-        }
-        if (original_write_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_write_format(chan, original_write_fmt);
-            if (res)
-                ast_log(LOG_WARNING, "Unable to restore write format on '%s'\n", chan->name);
-        }
-        fax_release(&fax);
-    }
-    else
-    {
-        ast_log(LOG_WARNING, "Could not answer channel '%s'\n", chan->name);
-    }
-    LOCAL_USER_REMOVE(u);
-    return res;
-}
-/*- End of function --------------------------------------------------------*/
-
-int unload_module(void)
-{
-    STANDARD_HANGUP_LOCALUSERS;
-    return ast_unregister_application(app);
-}
-/*- End of function --------------------------------------------------------*/
-
-int load_module(void)
-{
-    return ast_register_application(app, rxfax_exec, synopsis, descrip);
-}
-
-char *description(void)
-{
-    return tdesc;
-}
-/*- End of function --------------------------------------------------------*/
-
-int usecount(void)
-{
-    int res;
-    STANDARD_USECOUNT(res);
-    return res;
-}
-/*- End of function --------------------------------------------------------*/
-
-char *key(void)
-{
-    return ASTERISK_GPL_KEY;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
diff --git a/app_txfax.c b/app_txfax.c
deleted file mode 100644 (file)
index 72ef236..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Asterisk -- A telephony toolkit for Linux.
- *
- * Trivial application to send a TIFF file as a FAX
- * 
- * Copyright (C) 2003, Steve Underwood
- *
- * Steve Underwood <steveu@coppice.org>
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License
- */
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <inttypes.h>
-#include <pthread.h>
-#include <errno.h>
-#include <tiffio.h>
-
-#include <spandsp.h>
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/lock.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
-#include "asterisk/pbx.h"
-#include "asterisk/module.h"
-#include "asterisk/translate.h"
-
-static char *tdesc = "Trivial FAX Transmit Application";
-
-static char *app = "TxFAX";
-
-static char *synopsis = "Send a FAX file";
-
-static char *descrip = 
-"  TxFAX(filename[|caller][|debug]):  Send a given TIFF file to the channel as a FAX.\n"
-"The \"caller\" option makes the application behave as a calling machine,\n"
-"rather than the answering machine. The default behaviour is to behave as\n"
-"an answering machine.\n"
-"Uses LOCALSTATIONID to identify itself to the remote end.\n"
-"     LOCALHEADERINFO to generate a header line on each page.\n"
-"Sets REMOTESTATIONID to the receiver CSID.\n"
-"Returns -1 when the user hangs up, or if the file does not exist.\n"
-"Returns 0 otherwise.\n";
-
-STANDARD_LOCAL_USER;
-
-LOCAL_USER_DECL;
-
-#define MAX_BLOCK_SIZE 240
-
-static void span_message(int level, const char *msg)
-{
-    int ast_level;
-    
-    if (level == SPAN_LOG_WARNING)
-        ast_level = __LOG_WARNING;
-    else if (level == SPAN_LOG_WARNING)
-        ast_level = __LOG_WARNING;
-    else
-        ast_level = __LOG_DEBUG;
-    ast_log(ast_level, __FILE__, __LINE__, __PRETTY_FUNCTION__, msg);
-}
-/*- End of function --------------------------------------------------------*/
-
-static void t30_flush(t30_state_t *s, int which)
-{
-    //TODO:
-}
-/*- End of function --------------------------------------------------------*/
-
-static void phase_e_handler(t30_state_t *s, void *user_data, int result)
-{
-    struct ast_channel *chan;
-    char far_ident[21];
-    
-    chan = (struct ast_channel *) user_data;
-    if (result == T30_ERR_OK)
-    {
-        t30_get_far_ident(s, far_ident);
-        pbx_builtin_setvar_helper(chan, "REMOTESTATIONID", far_ident);
-    }
-    else
-    {
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-        ast_log(LOG_DEBUG, "Fax send not successful - result (%d) %s.\n", result, t30_completion_code_to_str(result));
-        ast_log(LOG_DEBUG, "==============================================================================\n");
-    }
-}
-/*- End of function --------------------------------------------------------*/
-
-static int txfax_exec(struct ast_channel *chan, void *data)
-{
-    int res = 0;
-    char source_file[256];
-    char *x;
-    char *s;
-    char *t;
-    char *v;
-    int option;
-    int len;
-    t30_state_t fax;
-    int calling_party;
-    int verbose;
-    int samples;
-    
-    struct localuser *u;
-    struct ast_frame *inf = NULL;
-    struct ast_frame outf;
-
-    int original_read_fmt;
-    int original_write_fmt;
-    
-    uint8_t __buf[sizeof(uint16_t)*MAX_BLOCK_SIZE + 2*AST_FRIENDLY_OFFSET];
-    uint8_t *buf = __buf + AST_FRIENDLY_OFFSET;
-
-    if (chan == NULL)
-    {
-        ast_log(LOG_WARNING, "Fax transmit channel is NULL. Giving up.\n");
-        return -1;
-    }
-
-    span_set_message_handler(span_message);
-
-    /* The next few lines of code parse out the filename and header from the input string */
-    if (data == NULL)
-    {
-        /* No data implies no filename or anything is present */
-        ast_log(LOG_WARNING, "Txfax requires an argument (filename)\n");
-        return -1;
-    }
-    
-    calling_party = FALSE;
-    verbose = FALSE;
-    source_file[0] = '\0'; 
-
-    for (option = 0, v = s = data;  v;  option++, s++)
-    {
-        t = s;
-        v = strchr(s, '|');
-        s = (v)  ?  v  :  s + strlen(s);
-        strncpy((char *) buf, t, s - t);
-        buf[s - t] = '\0';
-        if (option == 0)
-        {
-            /* The first option is always the file name */
-            len = s - t;
-            if (len > 255)
-                len = 255;
-            strncpy(source_file, t, len);
-            source_file[len] = '\0';
-        }
-        else if (strncmp("caller", t, s - t) == 0)
-        {
-            calling_party = TRUE;
-        }
-        else if (strncmp("debug", t, s - t) == 0)
-        {
-            verbose = TRUE;
-        }
-    }
-
-    /* Done parsing */
-
-    LOCAL_USER_ADD(u);
-
-    if (chan->_state != AST_STATE_UP)
-    {
-        /* Shouldn't need this, but checking to see if channel is already answered
-         * Theoretically asterisk should already have answered before running the app */
-        res = ast_answer(chan);
-    }
-    
-    if (!res)
-    {
-        original_read_fmt = chan->readformat;
-        if (original_read_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
-            if (res < 0)
-            {
-                ast_log(LOG_WARNING, "Unable to set to linear read mode, giving up\n");
-                return -1;
-            }
-        }
-        original_write_fmt = chan->writeformat;
-        if (original_write_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
-            if (res < 0)
-            {
-                ast_log(LOG_WARNING, "Unable to set to linear write mode, giving up\n");
-                res = ast_set_read_format(chan, original_read_fmt);
-                if (res)
-                    ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
-                return -1;
-            }
-        }
-        fax_init(&fax, calling_party, NULL);
-        if (verbose)
-           fax.logging.level = SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW;
-
-        x = pbx_builtin_getvar_helper(chan, "LOCALSTATIONID");
-        if (x  &&  x[0])
-            t30_set_local_ident(&fax, x);
-        x = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO");
-        if (x  &&  x[0])
-            t30_set_header_info(&fax, x);
-        t30_set_tx_file(&fax, source_file, -1, -1);
-        //t30_set_phase_b_handler(&fax, phase_b_handler, chan);
-        //t30_set_phase_d_handler(&fax, phase_d_handler, chan);
-        t30_set_phase_e_handler(&fax, phase_e_handler, chan);
-        while (ast_waitfor(chan, -1) > -1)
-        {
-            inf = ast_read(chan);
-            if (inf == NULL)
-            {
-                res = -1;
-                break;
-            }
-            if (inf->frametype == AST_FRAME_VOICE)
-            {
-                if (fax_rx(&fax, inf->data, inf->samples))
-                    break;
-                samples = (inf->samples <= MAX_BLOCK_SIZE)  ?  inf->samples  :  MAX_BLOCK_SIZE;
-                len = fax_tx(&fax, (int16_t *) &buf[AST_FRIENDLY_OFFSET], samples);
-                if (len)
-                {
-                    memset(&outf, 0, sizeof(outf));
-                    outf.frametype = AST_FRAME_VOICE;
-                    outf.subclass = AST_FORMAT_SLINEAR;
-                    outf.datalen = len*sizeof(int16_t);
-                    outf.samples = len;
-                    outf.data = &buf[AST_FRIENDLY_OFFSET];
-                    outf.offset = AST_FRIENDLY_OFFSET;
-                    if (ast_write(chan, &outf) < 0)
-                    {
-                        ast_log(LOG_WARNING, "Unable to write frame to channel; %s\n", strerror(errno));
-                        break;
-                    }
-                }
-            }
-            ast_frfree(inf);
-        }
-        if (inf == NULL)
-        {
-            ast_log(LOG_DEBUG, "Got hangup\n");
-            res = -1;
-        }
-        if (original_read_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_read_format(chan, original_read_fmt);
-            if (res)
-                ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
-        }
-        if (original_write_fmt != AST_FORMAT_SLINEAR)
-        {
-            res = ast_set_write_format(chan, original_write_fmt);
-            if (res)
-                ast_log(LOG_WARNING, "Unable to restore write format on '%s'\n", chan->name);
-        }
-        fax_release(&fax);
-    }
-    else
-    {
-        ast_log(LOG_WARNING, "Could not answer channel '%s'\n", chan->name);
-    }
-    LOCAL_USER_REMOVE(u);
-    return res;
-}
-/*- End of function --------------------------------------------------------*/
-
-int unload_module(void)
-{
-    STANDARD_HANGUP_LOCALUSERS;
-    return ast_unregister_application(app);
-}
-/*- End of function --------------------------------------------------------*/
-
-int load_module(void)
-{
-    return ast_register_application(app, txfax_exec, synopsis, descrip);
-}
-/*- End of function --------------------------------------------------------*/
-
-char *description(void)
-{
-    return tdesc;
-}
-/*- End of function --------------------------------------------------------*/
-
-int usecount(void)
-{
-    int res;
-
-    STANDARD_USECOUNT(res);
-    return res;
-}
-/*- End of function --------------------------------------------------------*/
-
-char *key(void)
-{
-    return ASTERISK_GPL_KEY;
-}
-/*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
diff --git a/apps_Makefile.patch b/apps_Makefile.patch
deleted file mode 100644 (file)
index 0d1ce96..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -ur asterisk-1.2.7.1-o/apps/Makefile asterisk-1.2.7.1/apps/Makefile
---- asterisk-1.2.7.1-o/apps/Makefile   2006-02-08 19:31:21.000000000 -0700
-+++ asterisk-1.2.7.1/apps/Makefile     2006-05-05 18:20:40.000000000 -0600
-@@ -54,6 +54,10 @@
- APPS+=app_osplookup.so
- endif
-+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp.h $(CROSS_COMPILE_TARGET)/usr/include/spandsp.h),)
-+APPS+=app_rxfax.so app_txfax.so
-+endif
-+
- ifeq ($(findstring BSD,${OSARCH}),BSD)
- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
- endif
-@@ -102,6 +106,12 @@
- app_curl.so: app_curl.o
-       $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
-+app_rxfax.so : app_rxfax.o
-+      $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff
-+ 
-+app_txfax.so : app_txfax.o
-+      $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff
-+ 
- app_sql_postgres.o: app_sql_postgres.c
-       $(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
-Only in asterisk-1.2.7.1/apps: Makefile~
-Only in asterisk-1.2.7.1/apps: Makefile.orig
diff --git a/asterisk-Makefile_fix_gcc33.patch b/asterisk-Makefile_fix_gcc33.patch
deleted file mode 100644 (file)
index 7a7be44..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- asterisk-1.2.0/Makefile.orig       2005-11-21 14:34:29.000000000 +0100
-+++ asterisk-1.2.0/Makefile    2005-11-21 14:34:36.000000000 +0100
-@@ -177,8 +177,8 @@
-   ifeq ($(PROC),x86_64)
-     # You must have GCC 3.4 to use k8, otherwise use athlon
--    PROC=k8
--    #PROC=athlon
-+    #PROC=k8
-+    PROC=athlon
-     OPTIONS+=-m64
-   endif
diff --git a/asterisk.spec b/asterisk.spec
deleted file mode 100644 (file)
index b776b96..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-# TODO:
-# - cgi-bin package - separate, because of suid-root
-# - separate plugins into packages
-# - use shared versions of lpc10, gsm,...
-# - put chan_h323 into separate package and make obsoletes to chan_oh323 from external spec
-#   These two h323 plugin are conflicting...
-# - CFLAGS passing
-#
-# Conditional build:
-%bcond_without openh323        # without OpenH323 support
-%bcond_with            rxfax           # with rx (also tx :-D) fax
-
-%define _spandsp_version 0.0.2pre25
-#
-Summary:       Asterisk PBX
-Summary(pl):   Centralka (PBX) Asterisk
-Name:          asterisk
-Version:       1.2.9.1
-Release:       1
-License:       GPL v2
-Group:         Applications/System
-Source0:       ftp://ftp.digium.com/pub/asterisk/%{name}-%{version}.tar.gz
-# Source0-md5: d98fc3dc5ee8df691ca2b0bd309bb251
-Source1:       %{name}.init
-Source2:       %{name}.sysconfig
-#Patch0:       %{name}-openh323-makefile.patch
-Patch1:                %{name}-Makefile_fix_gcc33.patch
-Patch2:                %{name}-no_k6_on_sparc.patch
-Patch3:                %{name}-lib.patch
-#Patch4:       %{name}-openh323-formats.patch
-#Patch5:       %{name}-openh323-rtti.patch
-#Patch6:       %{name}-freetds.patch
-#Patch7:       %{name}-t30.patch
-Patch8:                %{name}-awk.patch
-#Patch9:       %{name}-noarch.patch
-# It's included, but these sources are broken by me:)
-# will fit on clean cvs source
-#Patch1:       %{name}-DESTDIR.patch
-#Patch2:       %{name}-Makefile2.patch
-Source10:      http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_txfax.c
-Source11:      http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/app_rxfax.c
-Patch10:       http://soft-switch.org/downloads/spandsp/spandsp-%{_spandsp_version}/asterisk-1.2.x/apps_Makefile.patch
-URL:           http://www.asterisk.org/
-BuildRequires: bison
-BuildRequires: freetds >= 0.63
-BuildRequires: gawk
-#BuildRequires:        glib-devel
-#BuildRequires:        gtk+-devel
-BuildRequires: libpri-devel >= 1.2.3
-#BuildRequires:        mpg123
-BuildRequires: mysql-devel
-BuildRequires: ncurses-devel
-BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: rpmbuild(macros) >= 1.268
-BuildRequires: sed >= 4.0
-BuildRequires: spandsp-devel < 1:0.0.3
-BuildRequires: spandsp-devel >= 1:0.0.2-0.pre20.1
-%{?with_rxfax:BuildRequires:   spandsp-devel-%{_spandsp_version}}
-BuildRequires: speex-devel
-BuildRequires: unixODBC-devel
-BuildRequires: zaptel-devel
-BuildRequires: zlib-devel
-# These libraries are crazy...
-# With openh323 1.11.7 and pwlib 1.4.11 i had sig11
-#BuildRequires:        openh323-devel = 1.10.4
-%{?with_openh323:BuildRequires:        openh323-devel}
-#BuildRequires:        pwlib-devel = 1.4.4
-%{?with_openh323:BuildRequires:        pwlib-devel}
-Requires(post,preun):  /sbin/chkconfig
-Requires:      rc-scripts
-%{?with_openh323:%requires_eq  openh323}
-%{?with_openh323:%requires_eq  pwlib}
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Asterisk is an Open Source PBX and telephony development platform that
-can both replace a conventional PBX and act as a platform for
-developing custom telephony applications for delivering dynamic
-content over a telephone similarly to how one can deliver dynamic
-content through a web browser using CGI and a web server.
-
-Asterisk talks to a variety of telephony hardware including BRI, PRI,
-POTS, and IP telephony clients using the Inter-Asterisk eXchange
-protocol (e.g. gnophone or miniphone). For more information and a
-current list of supported hardware, see http://www.asterisk.org/.
-
-%description -l pl
-Asterisk to wolnodostêpna centralka (PBX) i platforma programistyczna
-dla telefonii, mog±ca zast±piæ konwencjonalne PBX-y oraz s³u¿yæ jako
-platforma do rozwijania w³asnych aplikacji telefonicznych do
-przekazywania dynamicznej tre¶ci przez telefon, podobnie jak mo¿na
-przekazywaæ dynamiczn± tre¶æ przez przegl±darkê WWW przy u¿yciu CGI i
-serwera WWW.
-
-Asterisk wspó³pracuje z wielorakim sprzêtem telefonicznym, w tym BRI,
-PRI, POTS oraz klienty telefonii IP u¿ywaj±ce protoko³u Inter-Asterisk
-eXchange (np. gnophone lub miniphone). Wiêcej informacji i listê
-obs³ugiwanego sprzêtu mo¿na znale¼æ pod http://www.asterisk.org/.
-
-%package devel
-Summary:       Header files for Asterisk platform
-Summary(pl):   Pliki nag³ówkowe platformy Asterisk
-Group:         Development
-Requires:      %{name} = %{version}-%{release}
-
-%description devel
-Header files for Asterisk development platform.
-
-%description devel -l pl
-Pliki nag³ówkowe platformy programistycznej Asterisk.
-
-%package examples
-Summary:       Example files for the Asterisk PBX
-Summary(pl):   Pliki przyk³adowe dla centralki Asterisk
-Group:         Applications/System
-Requires:      %{name} = %{version}-%{release}
-
-%description examples
-Example files for the Asterisk PBX.
-
-%description examples -l pl
-Pliki przyk³adowe dla centralki Asterisk.
-
-%prep
-%setup -q
-#%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-#%patch4 -p1
-#%patch5 -p1
-#%patch6 -p1
-#%patch7 -p1
-%patch8 -p1
-#%patch9 -p1
-
-%if %{with rxfax}
-cd apps
-%patch10 -p2
-cp %{SOURCE10} .
-cp %{SOURCE11} .
-%endif
-
-sed -i -e "s#/usr/lib/#/usr/%{_lib}/#g#" Makefile
-
-%build
-rm -f pbx/.depend
-%{__make} -j1 \
-       CC="%{__cc}" \
-       OPTIMIZE="%{rpmcflags}"
-
-%if %{with openh323}
-# H323 plugin:
-%{__make} -j1 -C channels/h323 \
-       PWLIBDIR="%{_prefix}" \
-       OPENH323DIR="%{_datadir}/openh323" \
-       CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -I/usr/include/openh323 -fPIC -I../../include"
-
-%endif
-
-# it requires doxygen - I don't know if we should do this...
-#%{__make} progdocs
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/var/{log/asterisk/cdr-csv,spool/asterisk/monitor},/etc/{rc.d/init.d,sysconfig}}
-
-%{__make} -j1 install \
-       DESTDIR=$RPM_BUILD_ROOT
-%{__make} -j1 samples \
-       DESTDIR=$RPM_BUILD_ROOT
-
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
-
-%if %{with openh323}
-install channels/h323/h323.conf.sample $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/h323.conf
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/chkconfig --add asterisk
-%service asterisk restart "Asterisk daemon"
-
-%preun
-if [ "$1" = "0" ]; then
-       %service asterisk stop
-       /sbin/chkconfig --del asterisk
-fi
-
-%files
-%defattr(644,root,root,755)
-%doc BUGS ChangeLog CREDITS HARDWARE README* SECURITY configs doc/{*.txt,linkedlists.README}
-%attr(755,root,root) %{_sbindir}/*
-%dir %{_sysconfdir}/asterisk
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/*.adsi
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.ael
-%dir %{_libdir}/asterisk
-%dir %{_libdir}/asterisk/modules
-%attr(755,root,root) %{_libdir}/asterisk/modules/*.so
-%dir /var/lib/asterisk
-%dir /var/lib/asterisk/agi-bin
-%dir /var/lib/asterisk/images
-%dir /var/lib/asterisk/keys
-%dir /var/lib/asterisk/mohmp3
-/var/lib/asterisk/mohmp3/fpm-calm-river.mp3
-/var/lib/asterisk/mohmp3/fpm-sunshine.mp3
-/var/lib/asterisk/mohmp3/fpm-world-mix.mp3
-%dir /var/lib/asterisk/sounds
-%dir /var/lib/asterisk/sounds/digits
-%dir /var/lib/asterisk/sounds/dictate
-%dir /var/lib/asterisk/sounds/letters
-%dir /var/lib/asterisk/sounds/phonetic
-/var/lib/asterisk/images/*.jpg
-/var/lib/asterisk/keys/*.pub
-/var/lib/asterisk/sounds/*.gsm
-/var/lib/asterisk/sounds/digits/*.gsm
-/var/lib/asterisk/sounds/dictate/*.gsm
-/var/lib/asterisk/sounds/letters/*.gsm
-/var/lib/asterisk/sounds/phonetic/*.gsm
-%dir /var/spool/asterisk
-%dir /var/spool/asterisk/monitor
-#%%dir /var/spool/asterisk/vm
-%dir /var/spool/asterisk/voicemail
-%dir /var/spool/asterisk/voicemail/default
-%dir /var/log/asterisk
-%dir /var/log/asterisk/cdr-csv
-%{_mandir}/man8/asterisk.8*
-%{_mandir}/man8/astgenkey.8*
-%{_mandir}/man8/autosupport.8*
-%{_mandir}/man8/safe_asterisk.8*
-%dir /var/lib/asterisk/firmware
-%dir /var/lib/asterisk/firmware/iax
-/var/lib/asterisk/firmware/iax/iaxy.bin
-
-%files examples
-%defattr(644,root,root,755)
-%attr(755,root,root) /var/lib/asterisk/agi-bin/agi-test.agi
-%attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-sphinx-test
-%attr(755,root,root) /var/lib/asterisk/agi-bin/eagi-test
-/var/spool/asterisk/voicemail/default/1234/busy.gsm
-/var/spool/asterisk/voicemail/default/1234/unavail.gsm
-
-#%dir /var/lib/asterisk/agi-bin/*
-
-%files devel
-%defattr(644,root,root,755)
-%dir %{_includedir}/asterisk
-%{_includedir}/asterisk/*.h
This page took 0.119652 seconds and 4 git commands to generate.