login | register
Wed 01 of Aug, 2007 [09:46 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.

Web www.voip-info.org
Shoutbox
  • Aykut, Wed 01 of Aug, 2007 [07:53 UTC]: Hi all, does anybody know about Thomson ST2030 SIP phone. I have upgraded it to latest version (1.56) but "Hold" and "Conf" features are not working after the upgrade ?? Do you know any solution or do you have Ver. 1.52 ?? Where can I find it?
  • Edward J Brown, Tue 31 of Jul, 2007 [23:33 UTC]: Has anybody experienced Choppy voice quality when using a Linksys SPA942 in an Asterisk Conference bridge? It works fine with my polycom and Cisco, but sucks with my Linksys.
  • www.astawerks.com, Fri 27 of Jul, 2007 [18:00 UTC]: does anyone use asterisk on top of clark connect? does it work good?
  • simon, Fri 27 of Jul, 2007 [14:16 UTC]: Hi All, Has anyone here managed to get the Cisco79x1 to successfully fail over to the backup proxy. I have 2 asterisk servers , handsets all register and function, except that backup proxy function doesn't work. Any working example would be very apprecia
  • Matthew Richmond, Thu 26 of Jul, 2007 [03:40 UTC]: using the page() application to page across our building...often the meetme conferences don't disconnect after the caller hangs up. Anyone else having this problem. (using Polycom phones)
  • Matthew Richmond, Wed 25 of Jul, 2007 [02:58 UTC]: thanks Nicholas Blasgen! I haven't worked with AGI before, but there's always a first! Thanks again!
  • Nicholas Blasgen, Tue 24 of Jul, 2007 [19:18 UTC]: Matthew Richmond, AGI will handle all that for you.
  • sam, Mon 23 of Jul, 2007 [16:39 UTC]: need help - certain voicemail extension will stop working and recording voicemail on asterisk - anyone know why and how to fix it? Thanks
  • john haji, Mon 23 of Jul, 2007 [14:55 UTC]: free calls to pakistan
  • bong, Sat 21 of Jul, 2007 [19:09 UTC]: hi good day to all can anyone help me how to configured the nortel sip to the signaling server and how to activate in mobile w/ sip compatible without mcs
Server Stats
  • Execution time: 0.23s
  • Memory usage: 2.22MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 2.77

NVBackgroundDetect

Background with Fax Detection for IAX/SIP/ZAP

Including non-silence and digit detection. Contact Newman Telecom for the code.

Synopsis

 Background a file with talk and fax detect (on IAX and SIP too)

Description

 NVBackgroundDetect(filename[|options[|sildur[|mindur[|maxdur]]]])

Plays filename, waiting for interruption from fax tones (on IAX/SIP too), a digit, or non-silence. Audio is monitored in the receive direction. If digits interrupt, they must be the start of a valid extension unless the option is included to ignore. If fax is detected, it will jump to the 'fax' extension. If a period of non-silence is greater than 'mindur' ms, yet less than 'maxdur' ms is followed by silence at least 'sildur' ms then the app is aborted and processing jumps to the 'talk' extension. If all undetected, control will continue at the next priority.

Parameters

     options:
       'n':  Attempt on-hook if unanswered (default=no)
       'x':  DTMF digits terminate without extension (default=no)
       'd':  Ignore DTMF digit detection (default=no)
       'f':  Ignore fax detection (default=no)
       't':  Ignore talk detection (default=no)
     sildur:  Silence ms after mindur/maxdur before aborting (default=1000)
     mindur:  Minimum non-silence ms needed (default=100)
     maxdur:  Maximum non-silence ms allowed (default=0/forever)

Return codes

Returns -1 on hangup, and 0 on successful completion with no exit conditions.

Notes

This code is NOT included with Asterisk at this point, however it is free. To get it, e-mail Newman Telecom at jnewman@newmantelecom.com. We'll respond quickly.

This should only work on channels that are using ULAW/ALAW.

Requirements

  • Asterisk development or stable

Sample Usage (extensions.conf)

[context-incoming]
; Answer and do some detection work
exten => s,1,Answer
exten => s,2,NVBackgroundDetect(welcome)
exten => s,3,Hangup

; If user presses "1", dial main line
exten => 1,1,Dial(SIP/5500)
exten => 1,2,Hangup

; If this is a fax, dial fax line
exten => fax,1,Dial(SIP/5501)
exten => fax,2,Hangup

; If user is talking, send him to Debra
exten => talk,1,Dial(SIP/5502)
exten => talk,2,Hangup

Installation

Easiest way to get up and running:

(1) Drop the code in your /usr/src/asterisk/apps directory

(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"

   If you encounter compiler errors like:

         error: struct ast_channel has no member cid

   Edit app_nv_faxdetect.c and enable the CALLERID_FIELD #define statement:

        #define CALLERID_FIELD cid.cid_num

  Comment out the other, existing definition.

(4) Start or restart Asterisk

(5) Type "show application nvbackgrounddetect" from the CLI and you should see it


Future Improvements

We are working on answering machine detection for this module.

See also

Created by justin_newman, Last modification by Steve Switzer on Mon 29 of Jan, 2007 [04:03 UTC]

Comments Filter

NV*Detect on FreeBSD

by kFuQ on Friday 07 of July, 2006 [03:58:04 UTC]
add
#include <stdio.h>

right above file.h line in both the faxdetect and backgrounddetect .c files



note: if so many people are having to add stdio.h, then why isn't it coming "stock" ?

by Chip Schweiss on Tuesday 06 of June, 2006 [15:14:13 UTC]

More code mods for 1.2.4?

by rdk on Friday 03 of February, 2006 [13:22:38 UTC]
Hi!

With 1.2.4, I needed to add the following to includes to get the code to compile successfully on FC4:

  1. include <stdio.h>
  2. include <string.h>
  3. include <stdlib.h>
  4. include <unistd.h>

The unistd.h include, defines various UNIX defs such that some pthread defines are enabled. I also added the above includes to app_nv_faxdetect.c as well.

NVBackgroundDetect on Debian Sarge

by Sebastian Berm on Saturday 10 of December, 2005 [22:11:11 UTC]
It works the same as the NVFaxDetect, compile it in the same way.
So far it worked like a charm.

This is how I got this done for NVBackgroundDetect:

Marcel Prisi on Monday 21 of November, 2005 21:12:27
I successfully installed this app on Debian Sarge using the following method, keeping the official packages :

Install the official sarge asterisk packages : apt-get install asterisk asterisk-dev
Download app_nv_faxdetect.c, edit and replace "#define CALLERID_FIELD cid.cid_num" by "#define CALLERID_FIELD callerid"
Compile it using "gcc -D_GNU_SOURCE -shared -o app_nv_faxdetect.so app_nv_faxdetect.c"
Copy the resulting app_nv_faxdetect.so to /usr/lib/asterisk/modules/

Restart asterisk and enjoy :-)

NVBackgroundDetect on Asterisk 1.2 (and/or AMP or @home Beta)

by justin_newman on Thursday 24 of November, 2005 [00:06:39 UTC]
If you are unable to build NVFaxDetect and/or NVBackgroundDetect on Asterisk
1.2 (and/or AMP or @home Beta), make the following changes:

1) Above the following line near the top, in both files:

   #include <asterisk/lock.h>

   Add:

   #include <stdio.h>

2) In NVBackgroundDetect, to get rid of the trigraph warning, search for
"??)" and replace it with "?)".

3) Rebuild Asterisk from /usr/src/asterisk with "make && make install".

4) Restart Asterisk with "restart now" from the CLI.

The new release will have this modification.

Justin

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2007 Arte Marketing, Inc.

Powered by bitweaver