[asterisk-users] Answering machine answers after pickup a phone.

isrlgb at gmail.com isrlgb at gmail.com
Fri Aug 5 05:44:02 CDT 2011


You should change in dahdi conf the amount of time (rings) it should wait before answering

The dialplan doesn't handle that 
-----Original Message-----
From: Ruben Rögels <ruben.roegels at jumping-frog.org>
Sender: asterisk-users-bounces at lists.digium.com
Date: Fri, 05 Aug 2011 12:36:46 
To: Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users at lists.digium.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
	<asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] Answering machine answers after pickup a phone.

Hi!

I'm sorry that I have misundertood your question, didn't read it
carefully enough.
So you have your asterisk and your phone conntected to the same incoming
line.

Maybe you can try with to detect an answered call with BackGroundDetect()

exten => s,1,Answer()
exten => s,n,BackGroundDetect(silence/10)
exten => s,n,Voicemail(1234)

exten => talk,1,HangUp()


I can't try it for your setup with a POTS line, but I think this might
work, especially when you tune the time values for BackGroundDetect().

Quote of the manual:

--- SNIP ---
 -= Info about application 'BackgroundDetect' =-

[Synopsis]
Background a file with talk detect

[Description]
  BackgroundDetect(filename[|sil[|min|[max]]]):  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).
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, sil, min, and max default to 1000, 100, and
infinity respectively.
--- SNAP ---

Hope this helps.

regards,
Ruben


Am 05.08.2011 10:59, schrieb Jorge Barreiro:
> Hi again,
> 
> thanks for your answer, but it didn't solve the problem. That Dial command 
> returns inmediately, so I don't even have the delay.
> 
> I'll try to explain myself better. The PBX has only one FXO card, connected to 
> the PSTN. There is no other phones connected to the PBX nor SIP extensions. 
> There are analog phones connected to the same PSTN.
> 
> What I try to do is that, when there is an incoming call from the ouside, if 
> someone answers on a phone, then the PBX won't answer.
> 
> 
> Thanks.
> 
> O Venres, 5 de Agosto de 2011 00:04:02 Ruben Rögels escribiu:
>> Hi,
>>
>> your concept using Wait() won't work here.
>> Try it like this:
>>
>> [incoming]
>> exten => s,1,Dial(DAHDI/1234,30) ; This will ring the phone 30s
>> exten => s,n,BackGround(wellcome-message)
>> exten => s,n,Voicemail(1234)
>> exten => #,1,Hangup()
>>
>> So, of you answer the call within 30s, you'll get the call on your
>> phone. After 30s, the Voicemail will answer the phone.
>>
>>
>> regards,
>> Ruben
>>
>> Am 04.08.2011 21:39, schrieb Jorge Barreiro:
>>> Hello,
>>>
>>> I'm configuring an Asterisk PBX to use as an answering machine. I have a
>>> FXO card connected to the line, and other analog telephones connected to
>>> the same line. The PBX answers and redirects you to the voicemail after
>>> a delay.
>>>
>>> The problem is that even if I pickup any analog phone in the line before
>>> the PBX does, it answers after the delay anyway. And I couldn't find how
>>> to prevent this, or even if this is supposed to happen.
>>>
>>> My FXO card is a cheap X100P (source of problems, I know), and I'm using
>>> the Asterisk version included in Debian Squeeze (1.6.2.9).
>>> My dial plan looks like this:
>>>
>>> [incoming]
>>> exten => s,1,Wait(8)
>>> exten => s,2,Answer
>>> exten => s,3,BackGround(wellcome-message)
>>> exten => s,4,Voicemail(1234)
>>> exten => #,1,Hangup
>>>
>>> I don't know if this is related, but I'm in Spain and I had to add:
>>> hanguponpolarityswitch=yes
>>> to the chan_dahdi.conf file so that asterisk detects the remote hangup.
>>> I also added:
>>> answeronpolarityswitch=yes
>>> but this didn't help. It seems to be used just to detect the answer when
>>> you are calling, not when receiving a call.
>>>
>>>
>>> I'd appreciate any help you could provide.
>>>
>>> Thanks!
>>>
>>> --
>>>_____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>                http://www.asterisk.org/hello
>>>
>>> asterisk-users mailing list
>>>
>>> To UNSUBSCRIBE or update options visit:
>>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>> --
>>_____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>                http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
jumping frog - Webhosting & Housing

Ruben Rögels
Moltkestraße 24
79098 Freiburg

Tel.: 0761 / 384 78 85

Web: http://www.jumping-frog.org/
eMail: ruben.roegels at jumping-frog.org

Support: http://support.jumping-frog.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


More information about the asterisk-users mailing list