login | register
Wed 01 of Aug, 2007 [09:19 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.53s
  • Memory usage: 2.21MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 3.23

Asterisk cmd BackGroundDetect

Synopsis

Plays a background sound, jumping to an extension on receipt of DTMF tones or to the "talk" extension if it detects talking.

Description

 BackgroundDetect(filename[|sil[|min[|max]]])

BackgroundDetect is simmilar to Background. It plays back a given filename, waiting for interruption from a given digit (the digit must
start the beginning of a valid extension, or it will be ignored).

sil - this is for the silence after you say something. It is a time in ms
min - this is the starting point from which to start to talk. The time is in ms
max - this is the end point. This point is followed by a period of time for silence. Set by the sil parameter. The time is in ms

During the playback of the file, audio is monitored in the receive direction, and if a period of non-silence which is greater than 'min' ms yet less than 'max' ms is followed by silence for at least 'sil' ms then the audio playback is aborted and processing jumps to the 'talk' extension if available. If unspecified, by default the parameters are set to: 1000ms for the sil, 100ms for the min and infinity for the max parameter. Returns -1 on hangup, and 0 on successful playback completion with no exit conditions.

Example

   [incoming]
   exten => s,1,Answer
   exten => s,2,ResponseTimeout(5)
   exten => s,3,BackgroundDetect(mymenu)
   exten => s,3,BackgroundDetect(chooseSomething)

   exten => t,1,Goto(s,2)

   exten => i,1,Playback(pbx-invalid)
   exten => i,2,Goto(s,2)

   exten => 1,1,DoSomething

   exten => 2,1,DoSomethingElse

   exten => 3,1,Dial(...)

   exten => talk,1,Dial(...)


Basic answering machine detection


I'm using this to make outgoing calls to deliver alarm messages. It acts differently if it delivers a message to a machine vs human, so there's two different contexts.

   [detect]
   exten => s,1,DigitTimeout(5)
   exten => s,2,ResponseTimeout(5)
   exten => s,3,SetVar(MACHINE=0)
   exten => s,4,Answer
   exten => s,5,BackgroundDetect(silence/5, 1000, 50)
   exten => s,6,Noop(answering machine detected)
   exten => s,7,SetVar(MACHINE=1)
   exten => s,8,BackgroundDetect(silence/30, 1000, 50, 30050)
   exten => s,9,Noop(too long of a message)
   exten => s,10,Hangup

   exten => talk,1,GotoIf($[${MACHINE}=1]?2:3)
   exten => talk,2,Goto(detect-machine,s,1)       ; this is a machine
   exten => talk,3,Goto(detect-human,s,1)       ; this is a human


Basic theory: if there's noise followed by silence within 5 seconds, assume it's a human ("hello?"), otherwise, wait until the noise stops, and then start leaving a message for a machine. You need to have a couple files called silence/5.gsm and silence/30.gsm (see Asterisk cmd Record) in your sounds folder that are just silence.

It needs some tweaking with the timing on BackgroundDetect. One big problem (at least with my system) is that you have to be fairly loud, or it won't detect the noise.

NOTE (from Scott Stingel www.evtmedia.com): The above example is excellent, and should work fine. Assuming reliable answer supervision, for example when using an outbound PRI/BRI line, we've also had good luck using a bit shorter detection times for humans (3 seconds for example). We found in testing that some of our more cryptic users record a very short answering machine greeting, example: "This is Bob. You know the drill (beep!)" = 4 seconds :-) Also, if proper answer machine detection is critical to your application, you might do what we did and modify app_talkdetect, adding a call to pbx_builtin_setvar_helper to set a channel variable containing the actual length of the detected voice, which can then be tested in your dialplan. You can then use a single call to BackgroundDetect (with a longer period of silence), and there's no need to define "talk" extensions. UPDATE: It looks like someone kindly added the aforementioned variable, named TALK_DETECTED, to this application. Therefore, you should be able to use it to determine the length (in msec) of the detected voice.

See also



Created by yogel, Last modification by Vagif Zeynalov on Mon 30 of Jul, 2007 [13:47 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-2007 Arte Marketing, Inc.

Powered by bitweaver