Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92747 - Asterisk - NVBackgroundDetect to detect incoming faxes
Summary: Asterisk - NVBackgroundDetect to detect incoming faxes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Knoblich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-15 18:16 UTC by Joseph
Modified: 2005-05-31 06:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph 2005-05-15 18:16:39 UTC
I would like request an addition to Asterisk; an additional application:
NVBackgroundDetect to detect incoming faxes.

Asterisk has a faxdetection but it is limited as it only works with ZAP channel (Digium Cards), it does not work with any SIP or ATA unit.
The code for NVBackgroundDetect is GPL from Newman Telecom at info@newmantelecom.com:
http://www.voip-info.org/tiki-index.php?page=NVBackgroundDetect

(1) Drop the code in your /usr/src/asterisk/apps directory (two files:
NVBackgroundDetect.c and
NVFaxDetect.c
(2) Edit the Makefile in the apps directory. Add the following line: 
    APPS+=app_nv_backgrounddetect.so
(3) Go to /usr/src/asterisk and run "make", then run "make install"

I was able to compile the code with CVS version but I'm not sure how to do it with an ebuild; I would like to stay with Gentoo ebuild version but I need to compile-in the NVBackgroundDetect.
I'm sure others would find this code useful in Asterisk.

#Joseph

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Joe Stroller 2005-05-16 23:08:26 UTC
I've emailed the author with a couple of questions. Unless I've missed it somewhere, I think we need to
know what the license for this module is. After rereading I see that Joseph states it to be GPL, but this 
isn't shown on the voip-info.org URL he gives; Joseph - is it in the code?

I'm given to understand there's no reason this shouldn't be built as part of the default Asterisk install or
as a local USE option, but net-misc/asterisk-chan_capi shows another way to do this. It compiles
against the headers in /usr/include/asterisk/ - if it were possible to compile NVBackgroundDetect in 
the same way then it would save thrusting it upon users who don't want it. Comments??

Finally, I think a download URL will be needed for the module source??
Comment 2 Joe Stroller 2005-05-16 23:59:08 UTC
Files received from author - they are indeed GPL, copy at http://linux.stroller.eu.org/FaxDetect-1.0
-2.6.tar.bz2

All the header files mentioned in their includes are already in /usr/include/asterisk and are found if I 
just make a working directory & run `gcc app_nv_faxdetect.c app_nv_backgrounddetect.c`. 
Unfortunately, this gives a bunch of errors - I'm not sure if I'm being naive expecting them to compile 
in this way or if I'm missing something else.
Comment 3 Stefan Knoblich (RETIRED) gentoo-dev 2005-05-17 02:39:45 UTC
compiling it like that won't work, it's a plugin (dynamically loadable module,  
like a shared library) not an executable program. 
 
gcc -fPIC -c app_nv_faxdetect.c app_nv_backgrounddetect.c 
gcc -shared -Xlinker -x -o app_nv_faxdetect.so app_nv_faxdetect.o 
gcc -shared -Xlinker -x -o app_nv_vackgrounddetect.so app_nv_backgrounddetect.o 
 
trying to fetch the tarball gives me: 
--17:42:12--  http://linux.stroller.eu.org/FaxDetect-1.0-2.6.tar.bz2 
           => `FaxDetect-1.0-2.6.tar.bz2' 
Resolving linux.stroller.eu.org... failed: Host not found. 
 
Comment 4 Joseph 2005-05-17 07:45:12 UTC
Regarding the GPL, here is what I found in the header:

/*
 * Asterisk -- A telephony toolkit for Linux.
 *
 * Playback a file with audio detect
 * 
 * Copyright (C) 2004-2005, Newman Telecom, Inc. and Newman Ventures, Inc.
 * Copyright (C) 2004, Digium, Inc.
 *
 * Justin Newman <jnewman@newmantelecom.com>
 * Mark Spencer <markster@digium.com>
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License
 */

Drop me an email and I'll forward you the NVFaxDetect.zip that I received from
Justin Newman (it contains two files: app_nv_backgrounddetect.c and
app_nv_faxdetect.c) I'm sure he will be interested to provide URL I'll ask him.

Here are some instructions I've received from Justin with the files:
----copy-------
I have attached both NVBackgroundDetect.c and NVFaxDetect.c (in
NVFaxDetect.zip). If you are running a recent CVS build of
Asterisk, you will need to uncomment a line at the top of each file. Unzip them,
drop into Asterisk, compile, and you are ready to go. We will be opening our
anon cvsroot shortly.

The difference between the two: one plays a sound file in the background
while the other simply waits. They both perform equally as well, however each is
intended for a different purpose.
---end copy-----

To my understanding Joe Stroller is right the code should be implemented in
default installation of asterisk (and some day it will be) as it complements the
default faxdetect that only works with ZAP channel and Digium Cards.  I don't
know the politics behind why is the code is not incorporated into default
installation.  Though, I've noticed that some folks are looking for this
functionality in Asterisk.

Here are some additional instructions on installation:
http://www.voip-info.org/tiki-index.php?page=NVBackgroundDetect

#Joseph
Comment 5 Stefan Knoblich (RETIRED) gentoo-dev 2005-05-17 08:11:11 UTC
stkn@gentoo.org 
 
It'd be nice if he puts it somewhere on his website so i can create an ebuild 
that works out-of-the-box. If he doesn't i'll have to build one with 
fetch restrictions and a message telling people to email him for the sources. 
Comment 6 Joseph 2005-05-20 18:50:35 UTC
Hi Stefan,

Regarding our conversation about NVBackgroundDetect:
http://bugs.gentoo.org/show_bug.cgi?id=92747

Justin Newman just posted on the asterisk mailing list:
-------copy-------
 We are setting up a location for all the GPL modules. If you have any
specific requirements, please let us know.

 Justin Newman
jnewman@newmantelecom.com
-----end copy------

If you want to drop him a line he will give you a location of the
NVBackgroundDetect and NVFaxDetect for the ebuild.

#Joseph
Comment 7 Joseph 2005-05-30 20:41:27 UTC
I have the link to the source code for faxdetect (NVBackgroundDetect and
NVFaxDetect):
http://www.newmantelecom.com/asterisk/faxdetect/

If anybody can help write an ebuild it would be great!

#Joseph
Comment 8 Justin Newman 2005-05-30 22:24:24 UTC
It's now online:
http://www.newmantelecom.com/asterisk/faxdetect
Comment 9 Stefan Knoblich (RETIRED) gentoo-dev 2005-05-31 06:41:15 UTC
thanks a lot, asterisk-app_nv_faxdetect-1.0.6 (containing both apps) is in  
cvs