]> git.pld-linux.org Git - packages/asterisk.git/commitdiff
- orphaned, outdated
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 21 Apr 2006 23:40:26 +0000 (23:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    asterisk-Makefile.patch -> 1.3
    asterisk-Makefile2.patch -> 1.2
    asterisk-destdir.patch -> 1.2
    asterisk-freetds.patch -> 1.2
    asterisk-noarch.patch -> 1.2
    asterisk-openh323-formats.patch -> 1.2
    asterisk-openh323-makefile.patch -> 1.2
    asterisk-openh323-rtti.patch -> 1.2
    asterisk-t30.patch -> 1.3

asterisk-Makefile.patch [deleted file]
asterisk-Makefile2.patch [deleted file]
asterisk-destdir.patch [deleted file]
asterisk-freetds.patch [deleted file]
asterisk-noarch.patch [deleted file]
asterisk-openh323-formats.patch [deleted file]
asterisk-openh323-makefile.patch [deleted file]
asterisk-openh323-rtti.patch [deleted file]
asterisk-t30.patch [deleted file]

diff --git a/asterisk-Makefile.patch b/asterisk-Makefile.patch
deleted file mode 100644 (file)
index f9b615f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./channels/h323/Makefile.org       Tue May 13 09:53:16 2003
-+++ ./channels/h323/Makefile   Tue May 13 09:55:26 2003
-@@ -61,13 +62,13 @@
-       g++ -g -c -o $@ $(CFLAGS) $<
- chan_h323.so: chan_h323.o ast_h323.o
--      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt -L$(OPENH323DIR)/lib -lopenh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- chan_h323_d.so:       chan_h323.o ast_h323.o
--      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt -L$(OPENH323DIR)/lib -lopenh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- chan_h323_s.so:       chan_h323.o ast_h323.o
--      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt -L$(OPENH323DIR)/lib -lopenh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- clean:
-       rm -f *.o *.so core.*
diff --git a/asterisk-Makefile2.patch b/asterisk-Makefile2.patch
deleted file mode 100644 (file)
index d6f5f02..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN asterisk/channels/h323/Makefile asterisk.the.good/channels/h323/Makefile
---- asterisk/channels/h323/Makefile    2003-08-11 18:39:52.000000000 +0200
-+++ asterisk.the.good/channels/h323/Makefile   2003-08-11 18:33:41.000000000 +0200
-@@ -24,7 +24,7 @@
- CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
- CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA 
- CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include 
--CFLAGS += -I$(OPENH323DIR)/include -I/usr/include/openh323
-+CFLAGS += -I$(OPENH323DIR)/include -I/usr/include/openh323 -I../../include
- CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations
diff --git a/asterisk-destdir.patch b/asterisk-destdir.patch
deleted file mode 100644 (file)
index 72fed91..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-diff -urN asterisk-0.4.0-orig/Makefile asterisk-0.4.0/Makefile
---- asterisk-0.4.0-orig/Makefile       Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/Makefile    Fri May  9 15:52:30 2003
-@@ -152,10 +152,10 @@
-       make -C db1-ast clean
- datafiles: all
--      mkdir -p $(ASTVARLIBDIR)/sounds/digits
-+      mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
-       for x in sounds/digits/*.gsm; do \
-               if grep -q "^%`basename $$x`%" sounds.txt; then \
--                      install $$x $(ASTVARLIBDIR)/sounds/digits ; \
-+                      install $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits ; \
-               else \
-                       echo "No description for $$x"; \
-                       exit 1; \
-@@ -163,16 +163,16 @@
-       done
-       for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-*; do \
-               if grep -q "^%`basename $$x`%" sounds.txt; then \
--                      install $$x $(ASTVARLIBDIR)/sounds ; \
-+                      install $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
-               else \
-                       echo "No description for $$x"; \
-                       exit 1; \
-               fi; \
-       done
--      mkdir -p $(ASTVARLIBDIR)/mohmp3
--      mkdir -p $(ASTVARLIBDIR)/images
-+      mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3
-+      mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/images
-       for x in images/*.jpg; do \
--              install $$x $(ASTVARLIBDIR)/images ; \
-+              install $$x $(DESTDIR)$(ASTVARLIBDIR)/images ; \
-       done
-       mkdir -p $(AGI_DIR)
-@@ -186,27 +186,27 @@
-       fi
- bininstall: all
--      mkdir -p $(MODULES_DIR)
--      mkdir -p $(ASTSBINDIR)
--      mkdir -p $(ASTETCDIR)
--      mkdir -p $(ASTBINDIR)
--      mkdir -p $(ASTSBINDIR)
--      mkdir -p $(ASTVARRUNDIR)
--      install -m 755 asterisk $(ASTSBINDIR)/
--      install -m 755 astgenkey $(ASTSBINDIR)/
--      install -m 755 safe_asterisk $(ASTSBINDIR)/
-+      mkdir -p $(DESTDIR)$(MODULES_DIR)
-+      mkdir -p $(DESTDIR)$(ASTSBINDIR)
-+      mkdir -p $(DESTDIR)$(ASTETCDIR)
-+      mkdir -p $(DESTDIR)$(ASTBINDIR)
-+      mkdir -p $(DESTDIR)$(ASTSBINDIR)
-+      mkdir -p $(DESTDIR)$(ASTVARRUNDIR)
-+      install -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/
-+      install -m 755 astgenkey $(DESTDIR)$(ASTSBINDIR)/
-+      install -m 755 safe_asterisk $(DESTDIR)$(ASTSBINDIR)/
-       for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
--      install -d $(ASTHEADERDIR)
--      install include/asterisk/*.h $(ASTHEADERDIR)
--      rm -f $(ASTVARLIBDIR)/sounds/vm
--      mkdir -p $(ASTSPOOLDIR)/vm
--      rm -f $(ASTMODULESDIR)/chan_ixj.so
--      rm -f $(ASTMODULESDIR)/chan_tor.so
--      mkdir -p $(ASTVARLIBDIR)/sounds
--      mkdir -p $(ASTLOGDIR)/cdr-csv
--      mkdir -p $(ASTVARLIBDIR)/keys
--      install -m 644 keys/iaxtel.pub $(ASTVARLIBDIR)/keys
--      ( cd $(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/vm . )
-+      install -d $(DESTDIR)$(ASTHEADERDIR)
-+      install include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
-+      rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
-+      mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/vm
-+      rm -f $(DESTDIR)$(ASTMODULESDIR)/chan_ixj.so
-+      rm -f $(DESTDIR)$(ASTMODULESDIR)/chan_tor.so
-+      mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
-+      mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
-+      mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
-+      install -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
-+      ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(DESTDIR)$(ASTSPOOLDIR)/vm . )
-       @echo " +---- Asterisk Installation Complete -------+"  
-       @echo " +                                           +"
-       @echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
-@@ -234,58 +234,58 @@
- upgrade: all bininstall
- adsi: all
--      mkdir -p $(ASTETCDIR)
-+      mkdir -p $(DESTDIR)$(ASTETCDIR)
-       for x in configs/*.adsi; do \
--              if ! [ -f $(ASTETCDIRX)/$$x ]; then \
--                      install -m 644 $$x $(ASTETCDIR)/`basename $$x` ; \
-+              if ! [ -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
-+                      install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
-               fi ; \
-       done
- samples: all datafiles adsi
--      mkdir -p $(ASTETCDIR)
-+      mkdir -p $(DESTDIR)$(ASTETCDIR)
-       for x in configs/*.sample; do \
--              if [ -f $(ASTETCDIR)/`basename $$x .sample` ]; then \
--                      mv -f $(ASTETCDIR)/`basename $$x .sample` $(ASTETCDIR)/`basename $$x .sample`.old ; \
-+              if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
-+                      mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
-               fi ; \
--              install $$x $(ASTETCDIR)/`basename $$x .sample` ;\
-+              install $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
-       done
--      echo "[directories]" > $(ASTETCDIR)/asterisk.conf
--      echo "astetcdir => $(ASTETCDIR)" >> $(ASTETCDIR)/asterisk.conf
--      echo "astmoddir => $(MODULES_DIR)" >> $(ASTETCDIR)/asterisk.conf
--      echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(ASTETCDIR)/asterisk.conf
--      echo "astagidir => $(AGI_DIR)" >> $(ASTETCDIR)/asterisk.conf
--      echo "astspooldir => $(ASTSPOOLDIR)" >> $(ASTETCDIR)/asterisk.conf
--      echo "astrundir => $(ASTVARRUNDIR)" >> $(ASTETCDIR)/asterisk.conf
--      echo "astlogdir => $(ASTLOGDIR)" >> $(ASTETCDIR)/asterisk.conf
-+      echo "[directories]" > $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astetcdir => $(ASTETCDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astmoddir => $(MODULES_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astagidir => $(AGI_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astspooldir => $(ASTSPOOLDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astrundir => $(ASTVARRUNDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-+      echo "astlogdir => $(ASTLOGDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
-       for x in sounds/demo-*; do \
-               if grep -q "^%`basename $$x`%" sounds.txt; then \
--                      install $$x $(ASTVARLIBDIR)/sounds ; \
-+                      install $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
-               else \
-                       echo "No description for $$x"; \
-                       exit 1; \
-               fi; \
-       done
-       for x in sounds/*.mp3; do \
--              install $$x $(ASTVARLIBDIR)/mohmp3 ; \
-+              install $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
-       done
--      mkdir -p $(ASTSPOOLDIR)/vm/1234/INBOX
--      :> $(ASTVARLIBDIR)/sounds/vm/1234/unavail.gsm
-+      mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/vm/1234/INBOX
-+      :> $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm/1234/unavail.gsm
-       for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
--              cat $(ASTVARLIBDIR)/sounds/$$x.gsm >> $(ASTVARLIBDIR)/sounds/vm/1234/unavail.gsm ; \
-+              cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm/1234/unavail.gsm ; \
-       done
--      :> $(ASTVARLIBDIR)/sounds/vm/1234/busy.gsm
-+      :> $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm/1234/busy.gsm
-       for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
--              cat $(ASTVARLIBDIR)/sounds/$$x.gsm >> $(ASTVARLIBDIR)/sounds/vm/1234/busy.gsm ; \
-+              cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm/1234/busy.gsm ; \
-       done
- webvmail:
--      @[ -d $(HTTPDIR) ] || ( echo "No HTTP directory" && exit 1 )
--      @[ -d $(HTTPDIR)/html ] || ( echo "No http directory" && exit 1 )
--      @[ -d $(HTTPDIR)/cgi-bin ] || ( echo "No cgi-bin directory" && exit 1 )
--      install -m 4755 -o root -g root vmail.cgi $(HTTPDIR)/cgi-bin/vmail.cgi
--      mkdir -p $(HTTPDIR)/html/_asterisk
-+      @[ -d $(DESTDIR)$(HTTPDIR) ] || ( echo "No HTTP directory" && exit 1 )
-+      @[ -d $(DESTDIR)$(HTTPDIR)/html ] || ( echo "No http directory" && exit 1 )
-+      @[ -d $(DESTDIR)$(HTTPDIR)/cgi-bin ] || ( echo "No cgi-bin directory" && exit 1 )
-+      install -m 4755 -o root -g root vmail.cgi $(DESTDIR)$(HTTPDIR)/cgi-bin/vmail.cgi
-+      mkdir -p $(DESTDIR)$(HTTPDIR)/html/_asterisk
-       for x in images/*.gif; do \
--              install -m 644 $$x $(HTTPDIR)/html/_asterisk/; \
-+              install -m 644 $$x $(DESTDIR)$(HTTPDIR)/html/_asterisk/; \
-       done
-       @echo " +--------- Asterisk Web Voicemail ----------+"  
-       @echo " +                                           +"
-diff -urN asterisk-0.4.0-orig/agi/Makefile asterisk-0.4.0/agi/Makefile
---- asterisk-0.4.0-orig/agi/Makefile   Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/agi/Makefile        Fri May  9 15:52:30 2003
-@@ -18,7 +18,7 @@
- all: $(AGIS)
- install: all
--      for x in $(AGIS); do $(INSTALL) -m 755 $$x $(AGI_DIR) ; done
-+      for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
- eagi-test: eagi-test.o
-       $(CC) -o eagi-test eagi-test.o
-diff -urN asterisk-0.4.0-orig/apps/Makefile asterisk-0.4.0/apps/Makefile
---- asterisk-0.4.0-orig/apps/Makefile  Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/apps/Makefile       Fri May  9 15:52:30 2003
-@@ -41,7 +41,7 @@
-       $(CC) -shared -Xlinker -x -o $@ $< -ltonezone
- install: all
--      for x in $(APPS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
- app_todd.o: app_todd.c
-       gcc -pipe -O6 -g  -Iinclude -I../include -D_REENTRANT -march=i586 -DDO_CRASH -c -o  app_todd.o app_todd.c
-diff -urN asterisk-0.4.0-orig/astman/Makefile asterisk-0.4.0/astman/Makefile
---- asterisk-0.4.0-orig/astman/Makefile        Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/astman/Makefile     Fri May  9 15:52:30 2003
-@@ -5,7 +5,7 @@
- install:
-       if [ "$(TARGET)" != "none" ]; then \
-               for x in $(TARGET); do \
--                      install -m 755 $$x $(ASTSBINDIR)/astman; \
-+                      install -m 755 $$x $(DESTDIR)$(ASTSBINDIR)/astman; \
-               done ; \
-       fi
-diff -urN asterisk-0.4.0-orig/cdr/Makefile asterisk-0.4.0/cdr/Makefile
---- asterisk-0.4.0-orig/cdr/Makefile   Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/cdr/Makefile        Fri May  9 15:52:30 2003
-@@ -30,7 +30,7 @@
- all: $(MODS)
- install: all
--      for x in $(MODS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
- clean:
-       rm -f *.so *.o
-diff -urN asterisk-0.4.0-orig/channels/Makefile asterisk-0.4.0/channels/Makefile
---- asterisk-0.4.0-orig/channels/Makefile      Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/channels/Makefile   Fri May  9 15:52:30 2003
-@@ -95,4 +95,4 @@
- #     $(CC) -rdynamic -shared -Xlinker -x -o $@ $<
- install: all
--      for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-diff -urN asterisk-0.4.0-orig/channels/h323/Makefile asterisk-0.4.0/channels/h323/Makefile
---- asterisk-0.4.0-orig/channels/h323/Makefile Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/channels/h323/Makefile      Fri May  9 15:52:30 2003
-@@ -35,7 +35,7 @@
- install: all
--      install -m 755 chan_h323.so $(ASTERISKDIR)
-+      install -m 755 chan_h323.so $(DESTDIR)$(ASTERISKDIR)
-       @echo " +----- chan_h323 Installation Complete ----- +"
-       @echo " +                                            +"
-       @echo " + chan_h323 has successfully been installed. +"
-@@ -52,7 +52,7 @@
-       if [ -f $(ASTETCDIR)/h323.conf ]; then \
-               mv -f $(ASTETCDIR)/h323.conf $(ASTETCDIR)/h323.conf.old ; \
-       fi ; 
--      install h323.conf.sample $(ASTETCDIR)/h323.conf
-+      install h323.conf.sample $(DESTDIR)$(ASTETCDIR)/h323.conf
-  
- chan_h323.o:  chan_h323.c
-diff -urN asterisk-0.4.0-orig/codecs/Makefile asterisk-0.4.0/codecs/Makefile
---- asterisk-0.4.0-orig/codecs/Makefile        Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/codecs/Makefile     Fri May  9 15:52:30 2003
-@@ -84,4 +84,4 @@
-       $(CC) -shared -Xlinker -x -o $@ $<
- install: all
--      for x in $(CODECS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(CODECS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-diff -urN asterisk-0.4.0-orig/formats/Makefile asterisk-0.4.0/formats/Makefile
---- asterisk-0.4.0-orig/formats/Makefile       Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/formats/Makefile    Fri May  9 15:52:30 2003
-@@ -31,4 +31,4 @@
-       $(CC) -shared -Xlinker -x -o $@ $< -lm
- install: all
--      for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-diff -urN asterisk-0.4.0-orig/pbx/Makefile asterisk-0.4.0/pbx/Makefile
---- asterisk-0.4.0-orig/pbx/Makefile   Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/pbx/Makefile        Fri May  9 15:52:30 2003
-@@ -58,4 +58,4 @@
-       $(CC) -shared -Xlinker -x -o $@ $<
- install: all
--      for x in $(PBX_LIBS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(PBX_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-diff -urN asterisk-0.4.0-orig/res/Makefile asterisk-0.4.0/res/Makefile
---- asterisk-0.4.0-orig/res/Makefile   Fri May  9 15:52:13 2003
-+++ asterisk-0.4.0/res/Makefile        Fri May  9 15:52:30 2003
-@@ -25,7 +25,7 @@
- all: $(MODS)
- install: all
--      for x in $(MODS); do $(INSTALL) -m 755 $$x $(MODULES_DIR) ; done
-+      for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
- res_crypto.so: res_crypto.o
-       $(CC) -shared -Xlinker -x -o $@ $< $(CRYPTO_LIBS)
diff --git a/asterisk-freetds.patch b/asterisk-freetds.patch
deleted file mode 100644 (file)
index 860b825..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur asterisk-1.0.7.orig/cdr/cdr_tds.c asterisk-1.0.7/cdr/cdr_tds.c
---- asterisk-1.0.7.orig/cdr/cdr_tds.c  2005-02-21 05:44:26.000000000 +0100
-+++ asterisk-1.0.7/cdr/cdr_tds.c       2005-04-28 10:20:04.000000000 +0200
-@@ -412,7 +412,7 @@
- static int mssql_connect(void)
- {
--      TDSCONNECTINFO *connection = NULL;
-+      TDSCONNECTION *connection = NULL;
-       char query[128];
-       /* Connect to M$SQL Server */
diff --git a/asterisk-noarch.patch b/asterisk-noarch.patch
deleted file mode 100644 (file)
index bb4e7fc..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-diff -urbB asterisk-1.0.9.org/channels/h323/Makefile asterisk-1.0.9/channels/h323/Makefile
---- asterisk-1.0.9.org/channels/h323/Makefile  2004-11-15 03:35:35.000000000 +0100
-+++ asterisk-1.0.9/channels/h323/Makefile      2005-10-09 11:49:52.396650250 +0200
-@@ -20,11 +20,6 @@
- # This needs to be updated to deal with more than just little endian machines
- #
- OSARCH=$(shell uname -s)
--ifneq (${OSARCH},FreeBSD)
--ifneq (${OSARCH},NetBSD)
--CFLAGS += -march=$(shell uname -m)
--endif
--endif
- CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN
- ifeq (${OSARCH},Linux)
-Tylko w asterisk-1.0.9/channels/h323: Makefile~
-diff -urbB asterisk-1.0.9.org/codecs/gsm/Makefile asterisk-1.0.9/codecs/gsm/Makefile
---- asterisk-1.0.9.org/codecs/gsm/Makefile     2005-06-21 16:27:28.000000000 +0200
-+++ asterisk-1.0.9/codecs/gsm/Makefile 2005-10-09 11:50:18.350272250 +0200
-@@ -37,34 +37,11 @@
- ######### ppro's, etc, as well as the AMD K6 and K7.  The compile will
- ######### probably require gcc. 
--ifneq (${OSARCH},Darwin)
--ifneq (${PROC},x86_64)
--ifneq (${PROC},ultrasparc)
--ifneq ($(shell uname -m),ppc)
--ifneq ($(shell uname -m),alpha)
--ifneq ($(shell uname -m),armv4l)
--ifneq (${PROC},sparc64)
--ifneq (${PROC},ppc)
--ifneq (${PROC},ppc64)
--OPTIMIZE+=-march=$(PROC)
--endif
--endif
--endif
--endif
--endif
--endif
--endif
--endif
--endif
--
- #The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
- #This works for even old (2.96) versions of gcc and provides a small boost either way.
- #A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
- #So we go lowest common available by gcc and go a step down, still a step up from
- #the default as we now have a better instruction set to work with. - Belgarath
--ifeq (${PROC},ultrasparc)
--OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3 -fomit-frame-pointer
--endif
- PG =
- #PG = -g -pg
-Tylko w asterisk-1.0.9/codecs/gsm: Makefile~
-diff -urbB asterisk-1.0.9.org/codecs/lpc10/Makefile asterisk-1.0.9/codecs/lpc10/Makefile
---- asterisk-1.0.9.org/codecs/lpc10/Makefile   2004-08-31 18:33:00.000000000 +0200
-+++ asterisk-1.0.9/codecs/lpc10/Makefile       2005-10-09 11:50:32.795175000 +0200
-@@ -25,28 +25,6 @@
- CFLAGS += $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC
- #CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi)
--#fix for PPC processors and ALPHA, And UltraSparc too
--ifneq ($(OSARCH),Darwin)
--ifneq ($(findstring BSD,${OSARCH}),BSD)
--ifneq ($(PROC),ppc)
--ifneq ($(PROC),x86_64)
--ifneq ($(PROC),alpha)
--#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
--#This works for even old (2.96) versions of gcc and provides a small boost either way.
--#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
--#So we go lowest common available by gcc and go a step down, still a step up from
--#the default as we now have a better instruction set to work with. - Belgarath
--ifeq ($(PROC),ultrasparc)
--        CFLAGS+= -mtune=$(PROC) -mcpu=v8 -O3 -fomit-frame-pointer
--else
--        CFLAGS+= -march=$(PROC)
--endif
--endif
--endif
--endif
--endif
--endif
--
- LIB = $(LIB_TARGET_DIR)/liblpc10.a
- .PHONY: all clean
-Tylko w asterisk-1.0.9/codecs/lpc10: Makefile~
-diff -urbB asterisk-1.0.9.org/Makefile asterisk-1.0.9/Makefile
---- asterisk-1.0.9.org/Makefile        2005-04-26 16:30:23.000000000 +0200
-+++ asterisk-1.0.9/Makefile    2005-10-09 11:49:39.263829500 +0200
-@@ -130,10 +130,6 @@
- CFLAGS=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
- CFLAGS+=$(OPTIMIZE)
--ifneq ($(PROC),ultrasparc)
--CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
--endif
--
- CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
- CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
diff --git a/asterisk-openh323-formats.patch b/asterisk-openh323-formats.patch
deleted file mode 100644 (file)
index 372626f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -urN asterisk-1.0.7.org/channels/h323/ast_h323.cpp asterisk-1.0.7/channels/h323/ast_h323.cpp
---- asterisk-1.0.7.org/channels/h323/ast_h323.cpp      2004-11-05 00:14:26.000000000 +0100
-+++ asterisk-1.0.7/channels/h323/ast_h323.cpp  2005-03-20 20:27:59.908829920 +0100
-@@ -994,6 +994,7 @@
-       } else {
-               endPoint->SetSendUserInputMode(H323Connection::SendUserInputAsInlineRFC2833);
-       }
-+#if 0
-       if (cap & AST_FORMAT_SPEEX) {
-               /* Not real sure if Asterisk acutally supports all
-                  of the various different bit rates so add them 
-@@ -1005,6 +1006,7 @@
-               endPoint->SetCapability(0, 0, new SpeexNarrow5AudioCapability());
-               endPoint->SetCapability(0, 0, new SpeexNarrow6AudioCapability());
-       }
-+#endif
-       if (cap & AST_FORMAT_G729A) {
-               AST_G729ACapability *g729aCap;
-@@ -1018,11 +1020,13 @@
-               endPoint->SetCapability(0, 0, g7231Cap = new H323_G7231Capability);
-       } 
-+#if 0
-       if (cap & AST_FORMAT_GSM) {
-               H323_GSM0610Capability *gsmCap;
-               endPoint->SetCapability(0, 0, gsmCap = new H323_GSM0610Capability);
-               gsmCap->SetTxFramesInPacket(gsmFrames);
-       } 
-+#endif
-       if (cap & AST_FORMAT_ULAW) {
-               H323_G711Capability *g711uCap;
diff --git a/asterisk-openh323-makefile.patch b/asterisk-openh323-makefile.patch
deleted file mode 100644 (file)
index 4b44b5a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -ur asterisk-0.7.2-orig/channels/h323/Makefile asterisk-0.7.2/channels/h323/Makefile
---- asterisk-0.7.2-orig/channels/h323/Makefile 2004-01-10 19:22:32.000000000 -0700
-+++ asterisk-0.7.2/channels/h323/Makefile      2004-02-21 15:08:50.624527898 -0700
-@@ -1,11 +1,11 @@
- # include the Makefile of OpenH323 
- ifndef OPENH323DIR
--OPENH323DIR=$(HOME)/openh323
-+OPENH323DIR=/usr
- endif
- ifndef PWLIBDIR
--PWLIBDIR=$(HOME)/pwlib
-+PWLIBDIR=/usr
- endif
- ifndef ASTERISKDIR
-@@ -32,8 +32,8 @@
- CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS
- CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA
- CFLAGS += -I../../include
--CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include 
--CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations
-+CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include/ptlib
-+CFLAGS += -I$(OPENH323DIR)/include/openh323
- all:          libchanh323.a
-@@ -52,13 +52,13 @@
-       ar cr libchanh323.a ast_h323.o
- chan_h323.so: 
--      g++  -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      g++  -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt -L$(OPENH323DIR)/lib -lh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- chan_h323_d.so:       chan_h323.o ast_h323.o
--      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt -L$(OPENH323DIR)/lib -lh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- chan_h323_s.so:       chan_h323.o ast_h323.o
--      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      g++  -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib  -lpt -L$(OPENH323DIR)/lib -lh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- clean:
-       rm -f *.o *.so core.* libchanh323.a
-diff -ur asterisk-0.7.2-orig/channels/Makefile asterisk-0.7.2/channels/Makefile
---- asterisk-0.7.2-orig/channels/Makefile      2004-01-23 13:57:48.000000000 -0700
-+++ asterisk-0.7.2/channels/Makefile   2004-02-21 15:08:50.624527898 -0700
-@@ -147,7 +147,7 @@
-        $(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
- chan_h323.so: chan_h323.o h323/libchanh323.a
--      $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a -L$(PWLIBDIR)/lib  -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
-+      $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a -lpt -lopenh323 -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat
- #chan_modem.so : chan_modem.o
-diff -ur asterisk-0.7.2-orig/Makefile asterisk-0.7.2/Makefile
---- asterisk-0.7.2-orig/Makefile       2004-01-13 23:48:38.000000000 -0700
-+++ asterisk-0.7.2/Makefile    2004-02-21 15:08:56.808366286 -0700
-@@ -317,7 +317,7 @@
-               mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
-               rm -f $(DESTDIR)$(ASTSPOOLDIR)/vm; \
-       fi
--      ln -s $(ASTSPOOLDIR)/voicemail/default $(DESTDIR)$(ASTSPOOLDIR)/vm
-+      ln -s ../../../spool/asterisk/voicemail/default $(DESTDIR)$(ASTSPOOLDIR)/vm
-       rm -f $(DESTDIR)$(MODULES_DIR)/chan_ixj.so
-       rm -f $(DESTDIR)$(MODULES_DIR)/chan_tor.so
-       rm -f $(DESTDIR)$(MODULES_DIR)/cdr_mysql.so
-@@ -329,8 +329,8 @@
-       mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
-       mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
-       install -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
--      ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/vm . )
--      ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/voicemail . )
-+      ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s ../../../spool/asterisk/vm . )
-+      ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s ../../../spool/asterisk/voicemail . )
-       @echo " +---- Asterisk Installation Complete -------+"  
-       @echo " +                                           +"
-       @echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
diff --git a/asterisk-openh323-rtti.patch b/asterisk-openh323-rtti.patch
deleted file mode 100644 (file)
index 3a77fd9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN asterisk-1.0.7.org/channels/h323/Makefile asterisk-1.0.7/channels/h323/Makefile
---- asterisk-1.0.7.org/channels/h323/Makefile  2004-11-15 03:35:35.000000000 +0100
-+++ asterisk-1.0.7/channels/h323/Makefile      2005-03-20 20:19:02.386545728 +0100
-@@ -77,7 +77,7 @@
-       ar cr libchanh323.a ast_h323.o
- ast_h323.o:   ast_h323.cpp
--      $(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $<
-+      $(CXX) -g -c -o $@ $(CFLAGS) $<
- ifneq ($(wildcard .depend),)
- include .depend
diff --git a/asterisk-t30.patch b/asterisk-t30.patch
deleted file mode 100644 (file)
index 2ac17b9..0000000
+++ /dev/null
@@ -1,1424 +0,0 @@
-diff -urN asterisk-1.0.9-o/apps/app_rxfax.c asterisk-1.0.9-n/apps/app_rxfax.c
---- asterisk-1.0.9-o/apps/app_rxfax.c  1969-12-31 17:00:00.000000000 -0700
-+++ asterisk-1.0.9-n/apps/app_rxfax.c  2005-09-20 13:01:02.000000000 -0600
-@@ -0,0 +1,367 @@
-+/*
-+ * 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 <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>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <pthread.h>
-+#include <errno.h>
-+#include <tiffio.h>
-+
-+#include <spandsp.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 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)
-+    {
-+        fax_get_transfer_statistics(s, &t);
-+        fax_get_far_ident(s, far_ident);
-+        fax_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,
-+#if (ASTERISK_VERSION_NUM <= 011000)
-+                      chan->callerid,
-+#else
-+                      (chan->cid.cid_num)  ?  chan->cid.cid_num  :  "",
-+#endif
-+                      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.\n");
-+        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)
-+    {
-+        fax_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;
-+    }
-+
-+    /* 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(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);
-+        fax.verbose = verbose;
-+        x = pbx_builtin_getvar_helper(chan, "LOCALSTATIONID");
-+        if (x  &&  x[0])
-+            fax_set_local_ident(&fax, x);
-+        x = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO");
-+        if (x  &&  x[0])
-+            fax_set_header_info(&fax, x);
-+        fax_set_rx_file(&fax, target_file);
-+        //fax_set_phase_b_handler(&fax, phase_b_handler, chan);
-+        fax_set_phase_d_handler(&fax, phase_d_handler, chan);
-+        fax_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_process(&fax, inf->data, inf->samples))
-+                    break;
-+                samples = (inf->samples <= MAX_BLOCK_SIZE)  ?  inf->samples  :  MAX_BLOCK_SIZE;
-+                len = fax_tx_process(&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 -urN asterisk-1.0.9-o/apps/app_rxfax_test.c asterisk-1.0.9-n/apps/app_rxfax_test.c
---- asterisk-1.0.9-o/apps/app_rxfax_test.c     1969-12-31 17:00:00.000000000 -0700
-+++ asterisk-1.0.9-n/apps/app_rxfax_test.c     2005-09-20 13:01:02.000000000 -0600
-@@ -0,0 +1,400 @@
-+/*
-+ * 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 <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>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <pthread.h>
-+#include <errno.h>
-+#include <tiffio.h>
-+
-+#include <spandsp.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 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)
-+    {
-+        fax_get_transfer_statistics(s, &t);
-+        fax_get_far_ident(s, far_ident);
-+        fax_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,
-+#if (ASTERISK_VERSION_NUM <= 011000)
-+                      chan->callerid,
-+#else
-+                      (chan->cid.cid_num)  ?  chan->cid.cid_num  :  "",
-+#endif
-+                      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.\n");
-+        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)
-+    {
-+        fax_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 void *fax_gen_alloc(struct ast_channel *chan, void *params)
-+{
-+    return params;
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static void fax_gen_release(struct ast_channel *chan, void *data)
-+{
-+    return;
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static int fax_gen_generate(struct ast_channel *chan, void *data, int len, int samples)
-+{
-+    struct ast_frame f;
-+    uint8_t buf[sizeof(uint16_t)*MAX_BLOCK_SIZE + 2*AST_FRIENDLY_OFFSET];
-+    t30_state_t *fax;
-+
-+    fax = (t30_state_t *) data;
-+    if (len > sizeof (buf))
-+    {
-+        ast_log (LOG_WARNING, "Only doing %d bytes (%d bytes requested)\n", (int)(sizeof (buf) / sizeof (signed short)), len);
-+        len = sizeof (buf);
-+        samples = len / 2;
-+    }
-+    len = fax_tx_process(fax, (int16_t *) &buf[AST_FRIENDLY_OFFSET], samples);
-+    f.frametype = AST_FRAME_VOICE;
-+    f.subclass = AST_FORMAT_SLINEAR;
-+    f.offset = AST_FRIENDLY_OFFSET;
-+    f.mallocd = 0;
-+    f.data = &buf[AST_FRIENDLY_OFFSET];
-+    f.datalen = len*sizeof(int16_t);
-+    f.samples = len;
-+    f.src = "app_txfax";
-+    if (ast_write(chan, &f) < 0)
-+    {
-+        ast_log (LOG_WARNING, "Failed to write frame to '%s': %s\n", chan->name, strerror(errno));
-+        return -1;
-+    }
-+    return 0;
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static struct ast_generator fax_gen =
-+{
-+    alloc:fax_gen_alloc,
-+    release:fax_gen_release,
-+    generate:fax_gen_generate,
-+};
-+
-+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 i;
-+    t30_state_t fax;
-+    int calling_party;
-+    int verbose;
-+
-+    struct localuser *u;
-+    struct ast_frame *inf = NULL;
-+
-+    int original_read_fmt;
-+    int original_write_fmt;
-+    
-+    if (chan == NULL)
-+    {
-+        ast_log(LOG_WARNING, "Fax receive channel is NULL. Giving up.\n");
-+        return -1;
-+    }
-+
-+    /* 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(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);
-+        fax.verbose = verbose;
-+        x = pbx_builtin_getvar_helper(chan, "LOCALSTATIONID");
-+        if (x  &&  x[0])
-+            fax_set_local_ident(&fax, x);
-+        x = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO");
-+        if (x  &&  x[0])
-+            fax_set_header_info(&fax, x);
-+        fax_set_rx_file(&fax, target_file);
-+        //fax_set_phase_b_handler(&fax, phase_b_handler, chan);
-+        fax_set_phase_d_handler(&fax, phase_d_handler, chan);
-+        fax_set_phase_e_handler(&fax, phase_e_handler, chan);
-+      if (ast_activate_generator(chan, &fax_gen, &fax) < 0)
-+      {
-+          LOCAL_USER_REMOVE (u);
-+          ast_log (LOG_ERROR, "Failed to activate generator on '%s'\n", chan->name);
-+          return -1;
-+      }
-+
-+        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_process(&fax, inf->data, inf->samples))
-+                    break;
-+            }
-+            ast_frfree(inf);
-+        }
-+        if (inf == NULL)
-+        {
-+            ast_log(LOG_DEBUG, "Got hangup\n");
-+            res = -1;
-+        }
-+      ast_deactivate_generator(chan);
-+        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);
-+        }
-+    }
-+    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 -urN asterisk-1.0.9-o/apps/app_txfax.c asterisk-1.0.9-n/apps/app_txfax.c
---- asterisk-1.0.9-o/apps/app_txfax.c  1969-12-31 17:00:00.000000000 -0700
-+++ asterisk-1.0.9-n/apps/app_txfax.c  2005-09-20 13:01:02.000000000 -0600
-@@ -0,0 +1,290 @@
-+/*
-+ * 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 <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 <string.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <pthread.h>
-+#include <errno.h>
-+#include <tiffio.h>
-+
-+#include <spandsp.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 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)
-+    {
-+        fax_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.\n");
-+        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;
-+    }
-+
-+    /* 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(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);
-+        fax.verbose = verbose;
-+
-+        x = pbx_builtin_getvar_helper(chan, "LOCALSTATIONID");
-+        if (x  &&  x[0])
-+            fax_set_local_ident(&fax, x);
-+        x = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO");
-+        if (x  &&  x[0])
-+            fax_set_header_info(&fax, x);
-+        fax_set_tx_file(&fax, source_file);
-+        //fax_set_phase_b_handler(&fax, phase_b_handler, chan);
-+        //fax_set_phase_d_handler(&fax, phase_d_handler, chan);
-+        fax_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_process(&fax, inf->data, inf->samples))
-+                    break;
-+                samples = (inf->samples <= MAX_BLOCK_SIZE)  ?  inf->samples  :  MAX_BLOCK_SIZE;
-+                len = fax_tx_process(&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 -urN asterisk-1.0.9-o/apps/app_txfax_test.c asterisk-1.0.9-n/apps/app_txfax_test.c
---- asterisk-1.0.9-o/apps/app_txfax_test.c     1969-12-31 17:00:00.000000000 -0700
-+++ asterisk-1.0.9-n/apps/app_txfax_test.c     2005-09-20 13:01:02.000000000 -0600
-@@ -0,0 +1,325 @@
-+/*
-+ * 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 <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 <string.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <pthread.h>
-+#include <errno.h>
-+#include <tiffio.h>
-+
-+#include <spandsp.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 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)
-+    {
-+        fax_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.\n");
-+        ast_log(LOG_DEBUG, "==============================================================================\n");
-+    }
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static void *fax_gen_alloc(struct ast_channel *chan, void *params)
-+{
-+    return params;
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static void fax_gen_release(struct ast_channel *chan, void *data)
-+{
-+    return;
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static int fax_gen_generate(struct ast_channel *chan, void *data, int len, int samples)
-+{
-+    struct ast_frame f;
-+    uint8_t buf[sizeof(uint16_t)*MAX_BLOCK_SIZE + 2*AST_FRIENDLY_OFFSET];
-+    t30_state_t *fax;
-+
-+    fax = (t30_state_t *) data;
-+    if (len > sizeof (buf))
-+    {
-+        ast_log (LOG_WARNING, "Only doing %d bytes (%d bytes requested)\n", (int)(sizeof (buf) / sizeof (signed short)), len);
-+        len = sizeof (buf);
-+        samples = len / 2;
-+    }
-+    len = fax_tx_process(fax, (int16_t *) &buf[AST_FRIENDLY_OFFSET], samples);
-+    f.frametype = AST_FRAME_VOICE;
-+    f.subclass = AST_FORMAT_SLINEAR;
-+    f.offset = AST_FRIENDLY_OFFSET;
-+    f.mallocd = 0;
-+    f.data = &buf[AST_FRIENDLY_OFFSET];
-+    f.datalen = len*sizeof(int16_t);
-+    f.samples = len;
-+    f.src = "app_txfax";
-+    if (ast_write(chan, &f) < 0)
-+    {
-+        ast_log (LOG_WARNING, "Failed to write frame to '%s': %s\n", chan->name, strerror(errno));
-+        return -1;
-+    }
-+    return 0;
-+}
-+/*- End of function --------------------------------------------------------*/
-+
-+static struct ast_generator fax_gen =
-+{
-+    alloc:fax_gen_alloc,
-+    release:fax_gen_release,
-+    generate:fax_gen_generate,
-+};
-+
-+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;
-+    
-+    struct localuser *u;
-+    struct ast_frame *inf = NULL;
-+
-+    int original_read_fmt;
-+    int original_write_fmt;
-+    
-+    if (chan == NULL)
-+    {
-+        ast_log(LOG_WARNING, "Fax transmit channel is NULL. Giving up.\n");
-+        return -1;
-+    }
-+
-+    /* 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(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);
-+        fax.verbose = verbose;
-+
-+        x = pbx_builtin_getvar_helper(chan, "LOCALSTATIONID");
-+        if (x  &&  x[0])
-+            fax_set_local_ident(&fax, x);
-+        x = pbx_builtin_getvar_helper(chan, "LOCALHEADERINFO");
-+        if (x  &&  x[0])
-+            fax_set_header_info(&fax, x);
-+        fax_set_tx_file(&fax, source_file);
-+        //fax_set_phase_b_handler(&fax, phase_b_handler, chan);
-+        //fax_set_phase_d_handler(&fax, phase_d_handler, chan);
-+        fax_set_phase_e_handler(&fax, phase_e_handler, chan);
-+      if (ast_activate_generator(chan, &fax_gen, &fax) < 0)
-+      {
-+          LOCAL_USER_REMOVE (u);
-+          ast_log (LOG_ERROR, "Failed to activate generator on '%s'\n", chan->name);
-+          return -1;
-+      }
-+
-+        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_process(&fax, inf->data, inf->samples))
-+                    break;
-+            }
-+            ast_frfree(inf);
-+        }
-+        if (inf == NULL)
-+        {
-+            ast_log(LOG_DEBUG, "Got hangup\n");
-+            res = -1;
-+        }
-+      ast_deactivate_generator(chan);
-+        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);
-+        }
-+    }
-+    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 -urN asterisk-1.0.9-o/apps/Makefile asterisk-1.0.9-n/apps/Makefile
---- asterisk-1.0.9-o/apps/Makefile     2004-09-24 15:32:56.000000000 -0600
-+++ asterisk-1.0.9-n/apps/Makefile     2005-09-20 13:01:25.000000000 -0600
-@@ -43,6 +43,9 @@
- APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
- APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
-+APPS+=$(shell if [ -f /usr/include/spandsp.h ]; then echo "app_rxfax.so app_txfax.so" ; fi)
-+APPS+=$(shell if [ -f /usr/local/include/spandsp.h ]; then echo "app_rxfax.so app_txfax.so" ; fi)
-+
- CFLAGS+=-fPIC
- ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
-@@ -68,6 +71,12 @@
-       for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-       rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
-+app_rxfax.so : app_rxfax.o
-+      $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff
-+
-+app_txfax.so : app_txfax.o
-+      $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff
-+
- app_voicemail.so : app_voicemail.o
- ifeq ($(USE_MYSQL_VM_INTERFACE),1)
-       $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -L/usr/lib/mysql -lmysqlclient -lz
This page took 0.157098 seconds and 4 git commands to generate.