--- libasterisk-chan-capi-0.3.5.orig/debian/dirs +++ libasterisk-chan-capi-0.3.5/debian/dirs @@ -0,0 +1 @@ +/usr/lib/asterisk/modules/ --- libasterisk-chan-capi-0.3.5.orig/debian/docs +++ libasterisk-chan-capi-0.3.5/debian/docs @@ -0,0 +1 @@ +README --- libasterisk-chan-capi-0.3.5.orig/debian/control +++ libasterisk-chan-capi-0.3.5/debian/control @@ -0,0 +1,15 @@ +Source: libasterisk-chan-capi +Section: comm +Priority: optional +Maintainer: Martin List-Petersen +Build-Depends: debhelper (>= 4.0.0), asterisk-dev, libcapi20-dev, dpatch +Standards-Version: 3.6.0 + +Package: libasterisk-chan-capi +Architecture: any +Depends: ${shlibs:Depends} +Description: capi channel driver for the asterisk (*) PBX + This package adds the capi channel driver to the asterisk (*) PBX, + enabling it to receive and submit calls through any isdn cards that + support capi. + --- libasterisk-chan-capi-0.3.5.orig/debian/rules +++ libasterisk-chan-capi-0.3.5/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f + +include /usr/share/dpatch/dpatch.make + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: patch-stamp + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: clean1 unpatch +clean1: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/libasterisk-chan-capi. + $(MAKE) install INSTALL_PREFIX=$(CURDIR)/debian/libasterisk-chan-capi + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs +# dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch clean1 --- libasterisk-chan-capi-0.3.5.orig/debian/changelog +++ libasterisk-chan-capi-0.3.5/debian/changelog @@ -0,0 +1,49 @@ +libasterisk-chan-capi (0.3.5-4) unstable; urgency=low + + * update due to compile against wrong libs + + -- Martin List-Petersen Fri, 17 Dec 2004 03:26:00 +0000 + +libasterisk-chan-capi (0.3.5-3) unstable; urgency=low + + * Applied Frank Sauters chan-capi patch against CVSHEAD + + -- Martin List-Petersen Thu, 18 Nov 2004 01:27:00 +0000 + +libasterisk-chan-capi (0.3.5-2) unstable; urgency=low + + * Testing upgraded to libcapi20-3. Updated dependencies to use libcapi20-dev + instead. + + -- Martin List-Petersen Thu, 28 Oct 2004 06:50:00 +0100 + +libasterisk-chan-capi (0.3.5-1) unstable; urgency=low + + * New upstream release. + + -- Martin List-Petersen Thu, 14 Aug 2004 22:11:00 +0100 + +libasterisk-chan-capi (0.3.4a-1) unstable; urgency=low + + * New upstream release. + + -- Martin List-Petersen Thu, 26 Jun 2004 11:36:00 +0100 + +libasterisk-chan-capi (0.3.1-3) unstable; urgency=low + + * Package cleanup, prepare to get it into unstable. + + -- Martin List-Petersen Thu, 28 Mar 2004 12:51:00 +0000 + +libasterisk-chan-capi (0.3.1-2) unstable; urgency=low + + * Recompile on newer asterisk (20040324). + + -- Martin List-Petersen Thu, 25 Mar 2004 19:17:00 +0000 + +libasterisk-chan-capi (0.3.1-1) unstable; urgency=low + + * Initial Release. + + -- Martin List-Petersen Thu, 11 Mar 2004 13:00:00 +0000 + --- libasterisk-chan-capi-0.3.5.orig/debian/compat +++ libasterisk-chan-capi-0.3.5/debian/compat @@ -0,0 +1 @@ +4 --- libasterisk-chan-capi-0.3.5.orig/debian/README.Debian +++ libasterisk-chan-capi-0.3.5/debian/README.Debian @@ -0,0 +1,13 @@ +libasterisk-chan-capi for Debian +-------------------------------- + +In /etc/asterisk/modules.conf insert the line: + load => chan_capi.so + + and in the [global] section: + chan_capi.so=yes + +That should basically get you up and running if asterisk doesn't pick up the +module automatically. The [global] thing is quite important. + + -- Martin List-Petersen , Thu, 11 Mar 2004 13:00:00 +0000 --- libasterisk-chan-capi-0.3.5.orig/debian/patches/01_cvshead.dpatch +++ libasterisk-chan-capi-0.3.5/debian/patches/01_cvshead.dpatch @@ -0,0 +1,488 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_cvshead.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad libasterisk-chan-capi-0.3.5/app_capiFax.c /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/app_capiFax.c +--- libasterisk-chan-capi-0.3.5/app_capiFax.c 1970-01-01 01:00:00.000000000 +0100 ++++ /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/app_capiFax.c 2004-11-18 01:28:13.000000000 +0000 +@@ -0,0 +1,245 @@ ++/* ++ * (CAPI*) ++ * ++ * Receive a fax with CAPI API. ++ * Usage : capiAnswerFax(path_output_file.SFF) ++ * ++ * This function can be called even after a regular Answer (voice mode), ++ * the channel will be changed to Fax Mode. ++ * ++ * Example of use : ++ * line number 123, play something, if a fax tone is detected, handle it ++ * line number 124, answer directly in fax mode ++ * ++ * [incoming] ++ * exten => 123,1,Answer() ++ * exten => 123,2,BackGround(jpop) ++ * exten => 124,1,Goto(handle_fax,s,1) ++ * exten => fax,1,Goto(handle_fax,s,1) ++ * ++ * [handle_fax] ++ * exten => s,1,capiAnswerFax(/tmp/${UNIQUEID}) ++ * exten => s,2,Hangup() ++ * exten => h,1,deadagi,fax.php // Run SFF2TIFF and mail it. ++ * ++ * An implementation of Common ISDN API 2.0 for Asterisk ++ * ++ * This program is free software and may be modified and ++ * distributed under the terms of the GNU Public License. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include "chan_capi_pvt.h" ++#include "chan_capi_app.h" ++ ++/* FAX Resolutions */ ++#define FAX_STANDARD_RESOLUTION 0 ++#define FAX_HIGH_RESOLUTION 1 ++ ++/* FAX Formats */ ++#define FAX_SFF_FORMAT 0 ++#define FAX_PLAIN_FORMAT 1 ++#define FAX_PCX_FORMAT 2 ++#define FAX_DCX_FORMAT 3 ++#define FAX_TIFF_FORMAT 4 ++#define FAX_ASCII_FORMAT 5 ++#define FAX_EXTENDED_ASCII_FORMAT 6 ++#define FAX_BINARY_FILE_TRANSFER_FORMAT 7 ++ ++typedef struct fax3proto3 { ++ unsigned char len; ++ unsigned short resolution __attribute__ ((packed)); ++ unsigned short format __attribute__ ((packed)); ++ unsigned char Infos[100] __attribute__ ((packed)); ++} B3_PROTO_FAXG3; ++ ++static char *tdesc = "(CAPI*) Receive Faxes."; ++static char *app = "capiAnswerFax"; ++static char *synopsis = "Answer Fax with CAPI"; ++STANDARD_LOCAL_USER; ++ ++LOCAL_USER_DECL; ++ ++void SetupB3Config(B3_PROTO_FAXG3 *B3conf, int FAX_Format) { ++ int len1; ++ int len2; ++ char *stationID = "00000000"; ++ char *headLine = "CAPI FAXServer"; ++ ++ B3conf->resolution = FAX_HIGH_RESOLUTION; ++ B3conf->format = (unsigned short)FAX_Format; ++ len1 = strlen(stationID); ++ B3conf->Infos[0] = (unsigned char)len1; ++ strcpy((char *)&B3conf->Infos[1], stationID); ++ len2 = strlen(headLine); ++ B3conf->Infos[len1 + 1] = (unsigned char)len2; ++ strcpy((char *)&B3conf->Infos[len1 + 2], headLine); ++ B3conf->len = (unsigned char)(2 * sizeof(unsigned short) + len1 + len2 + 2); ++} ++static int capi_change_bchan_fax(struct ast_channel *c) { ++ struct ast_capi_pvt *i = c->pvt->pvt; ++ MESSAGE_EXCHANGE_ERROR error; ++ _cmsg CMSG; ++ B3_PROTO_FAXG3 B3conf; ++ ++ SetupB3Config(&B3conf, FAX_SFF_FORMAT); // Format ignored by eicon cards ++ ++ DISCONNECT_B3_REQ_HEADER(&CMSG, ast_capi_ApplID, ast_capi_MessageNumber++, 0); ++ DISCONNECT_B3_REQ_NCCI(&CMSG) = i->NCCI; ++ ++ if ((error = _capi_put_cmsg(&CMSG)) != 0) { ++ ast_log(LOG_ERROR, "error sending DISCONNECT_B3_REQ NCCI=%#x\n",i->NCCI); ++ } else { ++ if (option_verbose > 5) { ++ ast_verbose(VERBOSE_PREFIX_4 "sent DISCONNECT_B3_REQ NCCI=%#x\n",i->NCCI); ++ } ++ } ++ // wait for the B3 layer to go down ++ while (i->state != CAPI_STATE_CONNECTED) { ++ usleep(10000); ++ } ++ ++ SELECT_B_PROTOCOL_REQ_HEADER(&CMSG, ast_capi_ApplID, ast_capi_MessageNumber++, 0); ++ SELECT_B_PROTOCOL_REQ_PLCI(&CMSG) = i->PLCI; ++ SELECT_B_PROTOCOL_REQ_B1PROTOCOL(&CMSG) = 4; ++ SELECT_B_PROTOCOL_REQ_B2PROTOCOL(&CMSG) = 4; ++ SELECT_B_PROTOCOL_REQ_B3PROTOCOL(&CMSG) = 4; ++ SELECT_B_PROTOCOL_REQ_B1CONFIGURATION(&CMSG) = NULL; ++ SELECT_B_PROTOCOL_REQ_B2CONFIGURATION(&CMSG) = NULL; ++ SELECT_B_PROTOCOL_REQ_B3CONFIGURATION(&CMSG) = (_cstruct)&B3conf; ++ ++ if ((error = _capi_put_cmsg(&CMSG)) != 0) ++ ast_log(LOG_WARNING, "capiAnswerFax CAPI SELECT_B_PROTOCOL put_cmsg error\n"); ++ return 0; ++} ++ ++static int capi_answer_fax(struct ast_channel *c) { ++ struct ast_capi_pvt *i = c->pvt->pvt; ++ MESSAGE_EXCHANGE_ERROR error; ++ _cmsg CMSG; ++ char buf[AST_MAX_EXTENSION]; ++ char *dnid; ++ B3_PROTO_FAXG3 B3conf; ++ ++ if (i->isdnmode && (strlen(i->incomingmsn)dnid))) ++ dnid = i->dnid + strlen(i->incomingmsn); ++ else ++ dnid = i->dnid; ++ ++ SetupB3Config(&B3conf, FAX_SFF_FORMAT); // Format ignored by eicon cards ++ ++ CONNECT_RESP_HEADER(&CMSG, ast_capi_ApplID, i->MessageNumber, 0); ++ CONNECT_RESP_PLCI(&CMSG) = i->PLCI; ++ CONNECT_RESP_REJECT(&CMSG) = 0; ++ buf[0] = strlen(dnid)+2; ++ buf[1] = 0x0; ++ buf[2] = 0x80; ++ strncpy(&buf[3],dnid,sizeof(buf)-4); ++ CONNECT_RESP_CONNECTEDNUMBER(&CMSG) = buf; ++ CONNECT_RESP_CONNECTEDSUBADDRESS(&CMSG) = NULL; ++ CONNECT_RESP_LLC(&CMSG) = NULL; ++ CONNECT_RESP_B1PROTOCOL(&CMSG) = 4; // T.30 modem for Group 3 fax ++ CONNECT_RESP_B2PROTOCOL(&CMSG) = 4; // T.30 for Group 3 fax ++ CONNECT_RESP_B3PROTOCOL(&CMSG) = 4; // T.30 for Group 3 fax ++ CONNECT_RESP_B3CONFIGURATION(&CMSG) = (_cstruct)&B3conf; ++ ++ if (option_verbose > 3) ++ ast_verbose(VERBOSE_PREFIX_3 "CAPI Answering in fax mode for MSN %s\n", dnid); ++ if ((error = _capi_put_cmsg(&CMSG)) != 0) { ++ ast_log(LOG_WARNING, "capiAnswerFax CAPI put_cmsg error\n"); ++ return -1; ++ } else { ++ if (option_verbose > 5) { ++ if (capidebug) ++ ast_verbose(VERBOSE_PREFIX_4 "sent CONNECT_RESP PLCI = %#x DNID = %s\n",i->PLCI,i->dnid); ++ } ++ } ++ ++ i->state = CAPI_STATE_ANSWERING; ++ i->doB3 = AST_CAPI_B3_DONT; ++ i->outgoing = 0; ++ i->earlyB3 = -1; ++ ++ return 0; ++} ++ ++static int capianswerfax_exec(struct ast_channel *chan, void *data) ++{ ++ int res=0; ++ struct localuser *u; ++ char *vdata; ++ struct ast_capi_pvt *i = chan->pvt->pvt; ++ ++ if (!data) { /* no data implies no filename or anything is present */ ++ ast_log(LOG_WARNING, "capiAnswerFax requires an argument (filename)\n"); ++ return -1; ++ } ++ vdata = ast_strdupa(data); ++ ++ LOCAL_USER_ADD(u); ++ ++ if (strcasecmp("CAPI", chan->type) == 0) { ++ i->fFax = fopen(vdata, "wb"); ++ if(i->fFax == NULL) { ++ ast_log(LOG_WARNING, "capiAnswerFax can't create the output file (%s)\n", strerror(errno)); ++ res = -1; ++ } else { ++ if(i->state != CAPI_STATE_BCONNECTED) ++ capi_answer_fax(chan); ++ else ++ capi_change_bchan_fax(chan); ++ while (i->state != CAPI_STATE_DISCONNECTED) { ++ sleep(1); ++ } ++ } ++ } else { ++ ast_log(LOG_WARNING, "capiFax only works on CAPI channels, check your extensions.conf!\n"); ++ res = -1; ++ } ++ LOCAL_USER_REMOVE(u); ++ return res; ++} ++ ++int unload_module(void) ++{ ++ STANDARD_HANGUP_LOCALUSERS; ++ return ast_unregister_application(app); ++} ++ ++int load_module(void) ++{ ++ return ast_register_application(app, capianswerfax_exec,synopsis,tdesc); ++} ++ ++char *description(void) ++{ ++ return tdesc; ++} ++ ++int usecount(void) ++{ ++ int res; ++ STANDARD_USECOUNT(res); ++ return res; ++} ++ ++char *key() ++{ ++ return ASTERISK_GPL_KEY; ++} +diff -urNad libasterisk-chan-capi-0.3.5/chan_capi.c /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/chan_capi.c +--- libasterisk-chan-capi-0.3.5/chan_capi.c 2004-08-13 11:07:28.000000000 +0100 ++++ /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/chan_capi.c 2004-11-18 01:28:13.000000000 +0000 +@@ -556,7 +556,7 @@ + } + } + // wait for the B3 layer to go down +- while (i->state != CAPI_STATE_CONNECTED) { ++ while ((i->state != CAPI_STATE_CONNECTED) && (i->state != CAPI_STATE_DISCONNECTED)) { + usleep(10000); + } + } +@@ -769,6 +769,9 @@ + else + dnid = i->dnid; + ++ i->fFax = NULL; ++ i->faxhandled = 0; ++ + CONNECT_RESP_HEADER(&CMSG, ast_capi_ApplID, i->MessageNumber, 0); + CONNECT_RESP_PLCI(&CMSG) = i->PLCI; + CONNECT_RESP_REJECT(&CMSG) = 0; +@@ -1070,8 +1073,8 @@ + tmp->pvt->rawreadformat = fmt; + tmp->pvt->rawwriteformat = fmt; + strncpy(tmp->context,i->context,sizeof(tmp->context)-1); +- tmp->callerid = strdup(i->cid); +- tmp->dnid = strdup(i->dnid); ++ tmp->cid.cid_num = strdup(i->cid); ++ tmp->cid.cid_dnid = strdup(i->dnid); + strncpy(tmp->exten,i->dnid,sizeof(tmp->exten)-1); + strncpy(tmp->accountcode,i->accountcode,sizeof(tmp->accountcode)-1); + i->owner = tmp; +@@ -1100,7 +1103,7 @@ + } + + +-struct ast_channel *capi_request(char *type, int format, void *data) ++struct ast_channel *capi_request(const char *type, int format, void *data, int *cause) + { + struct ast_capi_pvt *i; + struct ast_channel *tmp = NULL; +@@ -1174,6 +1177,30 @@ + return NULL; + } + ++// Stolen from chan_zap ++static void capi_handle_dtmf_fax(struct ast_channel *ast) ++{ ++ struct ast_capi_pvt *p = ast->pvt->pvt; ++ ++ /* Fax tone -- Handle and return NULL */ ++ if (!p->faxhandled) { ++ p->faxhandled++; ++ if (strcmp(ast->exten, "fax")) { ++ if (ast_exists_extension(ast, ast->context, "fax", 1, ast->cid.cid_num)) { ++ if (option_verbose > 2) ++ ast_verbose(VERBOSE_PREFIX_3 "Redirecting %s to fax extension\n", ast->name); ++ ++ /* Save the DID/DNIS when we transfer the fax call to a "fax" extension */ ++ pbx_builtin_setvar_helper(ast,"FAXEXTEN",ast->exten); ++ if (ast_async_goto(ast, ast->context, "fax", 1)) ++ ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast->name, ast->context); ++ } else ++ ast_log(LOG_NOTICE, "Fax detected, but no fax extension\n"); ++ } else ++ ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n"); ++ } else ++ ast_log(LOG_DEBUG, "Fax already handled\n"); ++} + + struct capi_pipe *find_pipe(int PLCI,int MN) { + struct capi_pipe *p; +@@ -1384,6 +1411,12 @@ + } + + p->i->state = CAPI_STATE_DISCONNECTED; ++ p->i->faxhandled = 0; ++ if(p->i->fFax) { ++ ast_verbose(VERBOSE_PREFIX_3 "Closing fax file...\n"); ++ fclose(p->i->fFax); ++ p->i->fFax = NULL; ++ } + + fr.frametype = AST_FRAME_CONTROL; + if (DISCONNECT_IND_REASON(CMSG) == 0x34a2) { +@@ -1437,6 +1470,11 @@ + if (p->i->B3in > AST_CAPI_MAX_B3_BLOCKS) p->i->B3in = AST_CAPI_MAX_B3_BLOCKS; + ast_mutex_unlock(&p->i->lockB3in); + #endif ++ if(p->i->fFax) { ++ if(fwrite((char *)&b3buf[AST_FRIENDLY_OFFSET], 1, b3len, p->i->fFax) != b3len) ++ ast_log(LOG_WARNING, "capiAnswerFax : error writing output file (%s)\n", strerror(errno)); ++ return 0; ++ } + #ifdef CAPI_ES + if ((p->i->doES == 1)) { + for (j=0;jc); + fr.frametype = AST_FRAME_DTMF; + fr.subclass = dtmf; + if (option_verbose > 1) { +@@ -1721,7 +1761,7 @@ + } + if (INFO_IND_INFONUMBER(CMSG) == 0x74) { + strncpy(p->i->owner->exten,capi_number(INFO_IND_INFOELEMENT(CMSG),3),sizeof(p->i->owner->exten)-1); +- strncpy(p->i->owner->dnid,capi_number(INFO_IND_INFOELEMENT(CMSG),3),sizeof(p->i->owner->dnid)-1); ++ strncpy(p->i->owner->cid.cid_dnid,capi_number(INFO_IND_INFOELEMENT(CMSG),3),sizeof(p->i->owner->cid.cid_dnid)-1); + ast_log(LOG_NOTICE,"%s\n",capi_cmsg2str(CMSG)); + } + if (INFO_IND_INFONUMBER(CMSG) == 0x28) { +@@ -2212,6 +2252,16 @@ + } + // ast_log(LOG_ERROR,"DATA_B3_CONF NCCI=%#x PLCI=%#x\n",NCCI,PLCI); + break; ++ case CAPI_SELECT_B_PROTOCOL: ++ PLCI = SELECT_B_PROTOCOL_CONF_PLCI(CMSG); ++ if (option_verbose > 3) { ++ if (capidebug) ++ ast_verbose(VERBOSE_PREFIX_3 "%s\n",capi_cmsg2str(CMSG)); ++ } ++ error = SELECT_B_PROTOCOL_CONF_INFO(CMSG); ++ if(error) ++ ast_log(LOG_ERROR,"SELECT_B_PROTOCOL_CONF_INFO error %x\n", error); ++ break; + default: + ast_log(LOG_ERROR,"Command.Subcommand = %#x.%#x\n",CMSG->Command,CMSG->Subcommand); + } +diff -urNad libasterisk-chan-capi-0.3.5/chan_capi_pvt.h /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/chan_capi_pvt.h +--- libasterisk-chan-capi-0.3.5/chan_capi_pvt.h 2004-05-02 23:50:48.000000000 +0100 ++++ /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/chan_capi_pvt.h 2004-11-18 01:28:13.000000000 +0000 +@@ -155,6 +155,10 @@ + int ecTail; + // isdnmode ptp or ptm + int isdnmode; ++ // if not null, receiving a fax ++ FILE *fFax; ++ // Has a fax tone already been handled? ++ int faxhandled; + #ifdef DEFLECT_ON_CIRCUITBUSY + // deflect on circuitbusy + char deflect2[AST_MAX_EXTENSION]; +diff -urNad libasterisk-chan-capi-0.3.5/debian/docs /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/debian/docs +--- libasterisk-chan-capi-0.3.5/debian/docs 2004-11-18 01:17:19.000000000 +0000 ++++ /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/debian/docs 2004-11-18 01:31:35.000000000 +0000 +@@ -1 +1,2 @@ + README ++INSTALL.patches +diff -urNad libasterisk-chan-capi-0.3.5/INSTALL.patches /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/INSTALL.patches +--- libasterisk-chan-capi-0.3.5/INSTALL.patches 1970-01-01 01:00:00.000000000 +0100 ++++ /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/INSTALL.patches 2004-11-18 01:28:58.000000000 +0000 +@@ -0,0 +1,59 @@ ++this patch allows the compilation of chan_capi-0.3.5 against current CVS-HEAD of asterisk. ++this patch is underlies the GPL. ++ ++it works with chan_capi of Klaus-Peter Junghanns ++ http://www.junghanns.net/asterisk/downloads/chan_capi.0.3.5.tar.gz ++and asterisk CVS-HEAD as of 2004-11-17 ++ ++it also incorporates the capiAnswerFax patch of Carl Sempla / Cedrik Hans ++ http://www.mlkj.net/asterisk/chan_capi-0.3.5-patch.tar.bz2 ++ ++* wget http://www.junghanns.net/asterisk/downloads/chan_capi.0.3.5.tar.gz ++* copy the file 'chan_capi-0.3.5-patch.diff' into your chan_capi-0.3.5 directory ++* run 'patch -p1 123,1,Answer() ++exten => 123,2,BackGround(jpop) ++exten => 124,1,Goto(handle_fax,s,1) ++exten => fax,1,Goto(handle_fax,s,1) ++ ++[handle_fax] ++exten => s,1,capiAnswerFax(/tmp/${UNIQUEID}) ++exten => s,2,Hangup() ++exten => h,1,deadagi,fax.php // Run sfftobmp and mail it. ++ ++The output of capiAnswerFax is a SFF file. Use sfftobmp to convert it. ++With a Diva Server, theses features are allowed : fax up to 33600, high ++resolution. Color Fax /JPEG Compression is disabled (I can't test it). ++ ++A fix for a dead lock issue is also included (Oct 22 18:06:00 ++WARNING[11275]: channel.c:472 ast_channel_walk_locked: Avoided initial ++deadlock for 'CAPI[contr1/173720007]/7', 10 retries!) +diff -urNad libasterisk-chan-capi-0.3.5/Makefile /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/Makefile +--- libasterisk-chan-capi-0.3.5/Makefile 2004-06-15 17:06:44.000000000 +0100 ++++ /tmp/dpep.Hrur3x/libasterisk-chan-capi-0.3.5/Makefile 2004-11-18 01:28:13.000000000 +0000 +@@ -57,10 +57,10 @@ + CFLAGS+=-DUNSTABLE_CVS + + LIBS=-ldl -lpthread -lm +-CC=gcc ++CC=gcc-2.95 + INSTALL=install + +-SHAREDOS=chan_capi.so app_capiCD.so app_capiHOLD.so app_capiRETRIEVE.so app_capiECT.so app_capiMCID.so app_capiNoES.so ++SHAREDOS=chan_capi.so app_capiCD.so app_capiHOLD.so app_capiRETRIEVE.so app_capiECT.so app_capiMCID.so app_capiNoES.so app_capiFax.so + + CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations + --- libasterisk-chan-capi-0.3.5.orig/debian/patches/00list +++ libasterisk-chan-capi-0.3.5/debian/patches/00list @@ -0,0 +1 @@ +01_cvshead --- libasterisk-chan-capi-0.3.5.orig/debian/copyright +++ libasterisk-chan-capi-0.3.5/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Martin List-Petersen on +Thu, 11 Mar 2004 13:00:00 +0000. + +It was downloaded from http://www.junghanns.net/asterisk + +Upstream Author: Klaus-Peter Junghanns + +Copyright: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. +