login | register
Sat 17 of May, 2008 [13:37 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.44s
  • Memory usage: 2.19MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 0.90

NVLineDetect

Answer Detection, Dialtone Detection, and Dead Channel Detection for ZAP and IAX, SIP, others

Including busy detect, congestion detection, and ring detection. Search the web for the code.

Synopsis

 Detects answer/dead/other signals on ZAP and other channels

Description

 NVLineDetect([waitdur[|options[|deaddur[|sildur[|mindur[|maxdur]]]]]])

This application listens for certain tones (on ZAP and most channel types) for max waitdur seconds of time. In particular, it detects presence of conditions: ANSWER, PICKUP, RING, BUSY, CONGESTION, DIALTONE, and DEAD. The respective extension name (in lowercase letters) will be called (i.e. 'answer', 'pickup', etc.). In addition, the variable TONE_DETECTED is set. If all undetected, control will continue at the next priority.

Parameters

     waitdur:  Maximum number of seconds to wait (default=30)
     options:
       'n':  Attempt on-hook if unanswered (default=no)
       'd':  Ignore answer detection of ring+talk (default=no)
       'a':  Ignore pickup detection of ring+sil (default=no)
       'b':  Ignore busy detection (default=no)
       'c':  Ignore congestion detection (default=no)
       'r':  Return after ring/ringing detection (default=no)
       'd':  Return after dialtone detection (default=no)
       's':  Ignore dead channel detection (default=no)
     deaddur:  How many ms of no activity to wait for dead (default=30)
     sildur:  Silence ms after min/maxdur before answer/pickup (default=1000)
     mindur:  Minimum non-silence talk ms needed (default=100)
     maxdur:  Maximum non-silence talk 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, search the web.

This code works best on ZAP channel or channels using ULAW/ALAW, however it will work with other codecs.

Requirements

  • Asterisk development or stable

Sample Usage (extensions.conf)

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

; The channel is dead
exten => dead,1,Hangup

; Play welcome, send to primary
exten => answer,1,NVBackgroundDetect(welcome)
exten => answer,2,Dial(SIP/5500)
exten => answer,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_linedetect.so

(3) Go to /usr/src/asterisk and run "make", then run "make install"

(4) Start or restart Asterisk

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

NOTE: Dialtone detection requires additional changes. This will be posted shortly.


Future Improvements

None at this time.

Compatability

The copy I obtained included instructions to replace the existing dsp.c dsp.h and frame.h files with the ones supplied. This causes asterisk 1.2.9 errors when compiling.
Why isn't a patch supplied when existing files need to be modified?
Copying a modified version of source code from an older version of asterisk into a current version could introduce a number of bugs.

See also


Created by justin_newman, Last modification by justin_newman on Wed 29 of Aug, 2007 [03:27 UTC]

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-2008 VOIP-Info.org LLC

Powered by bitweaver