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

2011-08-05 Thread 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

--
_
-- 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


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

2011-08-05 Thread Ruben Rögels
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.roeg...@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


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

2011-08-05 Thread John Novack

Completely normal operation.
You need to read and understand more basic telephony and analog lines to 
understand why that won't work.

Asterisk needs to be in control, and once someone answers a phone not under 
Asterisk control, or the call is abandoned there is little you can do.
Sounds like a task for a simple answering machine from Wal-Mart
All you other phones should be connected to FXS ports, or you need to be 
smarter in your dialplan.
Once you answer, Asterisk is behaving normally


John Novack



Jorge Barreiro wrote:

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

--
_
-- 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



--

Dog is my Co-pilot


--
_
-- 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


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

2011-08-05 Thread Carlos M Cruz
John is absolutly right. You should connect your phones to an FXS port.

Otherwise you can't do what you wan't.

Regards,

Carlos M Cruz
--
_
-- 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

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

2011-08-05 Thread isrlgb
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.roeg...@jumping-frog.org
Sender: asterisk-users-boun...@lists.digium.com
Date: Fri, 05 Aug 2011 12:36:46 
To: Asterisk Users Mailing List - Non-Commercial 
Discussionasterisk-users@lists.digium.com
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@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

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

2011-08-05 Thread Dan Journo
 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)



I thought about that kind of solution, however...



The problem with this is that the caller will hear silence because Asterisk 
will pick up the phone as soon as it starts ringing.

In addition, if the caller happens to be talking before the call is answered, 
BackGroundDetect(silence/10) won't work.




Dan Journo
Kesher Communications (UK)
Business Phone Systemshttp://www.keshercommunications.com/ | Hosted 
PBXhttp://www.keshercommunications.com/hostedpbx.html




--
_
-- 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

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

2011-08-05 Thread Roger Burton West
On Fri, Aug 05, 2011 at 10:59:03AM +0200, Jorge Barreiro wrote:

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.

I have a couple of VoIP phones fed through Asterisk, as well as analogue
phones linked directly to the line. In this case, picking up the
analogue phone stops the VoIP phones ringing (after ten seconds or so).
I don't know whether this would be achievable with the Asterisk
console and soundcard drivers...

Roger

--
_
-- 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


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

2011-08-05 Thread Jorge Barreiro
Hi,

thanks for your time!

O Venres, 5 de Agosto de 2011 12:35:05 escribiches:
 Completely normal operation.
 You need to read and understand more basic telephony and analog lines to
 understand why that won't work.

I definitely have a lot to learn yet. 

 Asterisk needs to be in control, and once someone answers a phone not under
 Asterisk control, or the call is abandoned there is little you can do.

What I pretend is that asterisk detects that it's not under control and gets 
out of the way. The same way it detects a remote hangup and stops the 
dialplan, it could detect that someone else answered (the line is not ringing 
anymore) and discard it the same way it does when the remote part hangup.

I've read comments in forums and tutorials that seem to imply that this 
happens, but I couldn't find any confirmation (and indeed, it's not happening 
to 
me).

If you confirm me that this is the normal behavior, then I at least I know my 
solution is in the dialplan and not a card/line/driver problem.

 Sounds like a task for a simple answering machine from Wal-Mart
 All you other phones should be connected to FXS ports, or you need to be
 smarter in your dialplan. Once you answer, Asterisk is behaving normally

Yes, it's a really simple task, but this should be just a starting point. The 
plan is to start migrating services to the PBX little by little, and the 
voicemail looked like the easier thing to start. I wanted to maintain the 
current analog phones until I feel confident with the asterisk configuration. 
Maybe it wasn't such a great idea, and I should start by moving the phones to 
FXS ports in the PBX.


 
 John Novack
 
 Jorge Barreiro wrote:
  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
  
  --
  _
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  
  New to Asterisk? Join us for a live introductory webinar every Thurs:
  

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

2011-08-05 Thread Don Kelly
snip

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.



If you want to be certain that the Asterisk system won't interfere with an
active call, you can install an exclusion device between the PSTN and the
FXO card.

Google telephone exclusion device.

--Don

Don Kelly

PCF Corp
People Come First
651 842-1000
651 842-1001 fax


--
_
-- 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


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

2011-08-05 Thread Doug Lytle

Don Kelly wrote:

There are analog phones connected to the same PSTN.


And that is why what you want to do won't work.  To have it do what 
you'd like, you'd need to have Asterisk as the only one receiving the call.


Then your other analog phones would need to be on something like a ATAs 
that would allow them to be connected to your phone system as extensions.


Incoming calls could then be set to ring all of the phones and the one 
that answered first would get the call.


The way you have it setup now, as soon as a ring is detected on the FXO, 
Asterisk will try to process it, when you're picking up a phone that's 
on the same wire as the FXO, Asterisk is still going to process that call.


Doug

--

Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


--
_
-- 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


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

2011-08-05 Thread Shaun Ruffell
On Fri, Aug 05, 2011 at 01:14:58PM +0200, Jorge Barreiro wrote:
 Hi,
 
 thanks for your time!
 
 O Venres, 5 de Agosto de 2011 12:35:05 escribiches:
  Completely normal operation.
  You need to read and understand more basic telephony and analog lines to
  understand why that won't work.
 
 I definitely have a lot to learn yet. 
 
  Asterisk needs to be in control, and once someone answers a phone not under
  Asterisk control, or the call is abandoned there is little you can do.
 
 What I pretend is that asterisk detects that it's not under control and gets 
 out of the way. The same way it detects a remote hangup and stops the 
 dialplan, it could detect that someone else answered (the line is not ringing 
 anymore) and discard it the same way it does when the remote part hangup.
 
 I've read comments in forums and tutorials that seem to imply that this 
 happens, but I couldn't find any confirmation (and indeed, it's not happening 
 to 
 me).

When I first installed Asterisk in my home I used it in the way that you
described: as a glorified answering machine to email to me any voice mail.

I think what you want is the WaitForRing()[1] dial plan application.  This
function will wait x number of seconds, then look for *another* ring to come
in. If someone answered the phone before the timeout to that function Asterisk
would stop processing the dial plan.

[1] https://wiki.asterisk.org/wiki/display/AST/Application_WaitForRing

I ran into a couple of issues with WaitForRing(). The first being if someone
answered the phone and then quickly hung up *and* a new phone call came in
within the timeout period, Asterisk wouldn't know that the line was ringing
due to a new call. The second problem was I never got the dial tone detection
working so that if I tried to *place* a call from Asterisk while someone was
on the house line I would aggravate my wife.

Since coming to work for Digium I've seen in the data sheets for the FXO
interfaces that there is a capability to detect when a parallel device on a
line goes off hook. This would allow Asterisk to have a better sense of the
state of the line (like it currently can detect when a port is unplugged and
there is not battery by generating a red alarm.) but I haven't looked into
getting that information off the hardware and up into Asterisk.

Hope this helps,
Shaun

-- 
Shaun Ruffell
Digium, Inc. | Linux Kernel Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com  www.asterisk.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


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

2011-08-05 Thread Jorge Barreiro
O Venres, 5 de Agosto de 2011 17:42:28 Shaun Ruffell escribiu:
 On Fri, Aug 05, 2011 at 01:14:58PM +0200, Jorge Barreiro wrote:
  Hi,
  
  thanks for your time!
  
  O Venres, 5 de Agosto de 2011 12:35:05 escribiches:
   Completely normal operation.
   You need to read and understand more basic telephony and analog lines
   to understand why that won't work.
  
  I definitely have a lot to learn yet.
  
   Asterisk needs to be in control, and once someone answers a phone not
   under Asterisk control, or the call is abandoned there is little you
   can do.
  
  What I pretend is that asterisk detects that it's not under control and
  gets out of the way. The same way it detects a remote hangup and stops
  the dialplan, it could detect that someone else answered (the line is
  not ringing anymore) and discard it the same way it does when the remote
  part hangup.
  
  I've read comments in forums and tutorials that seem to imply that this
  happens, but I couldn't find any confirmation (and indeed, it's not
  happening to me).
 
 When I first installed Asterisk in my home I used it in the way that you
 described: as a glorified answering machine to email to me any voice mail.
 
 I think what you want is the WaitForRing()[1] dial plan application.  This
 function will wait x number of seconds, then look for *another* ring to
 come in. If someone answered the phone before the timeout to that function
 Asterisk would stop processing the dial plan.
 
 [1] https://wiki.asterisk.org/wiki/display/AST/Application_WaitForRing
 
 I ran into a couple of issues with WaitForRing(). The first being if
 someone answered the phone and then quickly hung up *and* a new phone call
 came in within the timeout period, Asterisk wouldn't know that the line
 was ringing due to a new call. The second problem was I never got the dial
 tone detection working so that if I tried to *place* a call from Asterisk
 while someone was on the house line I would aggravate my wife.
 
 Since coming to work for Digium I've seen in the data sheets for the FXO
 interfaces that there is a capability to detect when a parallel device on a
 line goes off hook. This would allow Asterisk to have a better sense of the
 state of the line (like it currently can detect when a port is unplugged
 and there is not battery by generating a red alarm.) but I haven't looked
 into getting that information off the hardware and up into Asterisk.
 
 Hope this helps,
 Shaun


That application looks like a good solution. I can't test it until Monday, but 
I'll try it and let you know. The drawbacks you mention doesn't seem too 
inconvenient in my case.

Anyway, I started with this cause I thought it was an easy first step, if it 
gets so complicated I think I'll go forward and put all phones under the 
control of the PBX.

Thank you everybody for your help.



--
_
-- 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


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

2011-08-05 Thread John Novack



Jorge Barreiro wrote:

O Venres, 5 de Agosto de 2011 17:42:28 Shaun Ruffell escribiu:

On Fri, Aug 05, 2011 at 01:14:58PM +0200, Jorge Barreiro wrote:

Hi,

thanks for your time!

O Venres, 5 de Agosto de 2011 12:35:05 escribiches:

Completely normal operation.
You need to read and understand more basic telephony and analog lines
to understand why that won't work.

I definitely have a lot to learn yet.


Asterisk needs to be in control, and once someone answers a phone not
under Asterisk control, or the call is abandoned there is little you
can do.

What I pretend is that asterisk detects that it's not under control and
gets out of the way. The same way it detects a remote hangup and stops
the dialplan, it could detect that someone else answered (the line is
not ringing anymore) and discard it the same way it does when the remote
part hangup.

I've read comments in forums and tutorials that seem to imply that this
happens, but I couldn't find any confirmation (and indeed, it's not
happening to me).

When I first installed Asterisk in my home I used it in the way that you
described: as a glorified answering machine to email to me any voice mail.

I think what you want is the WaitForRing()[1] dial plan application.  This
function will wait x number of seconds, then look for *another* ring to
come in. If someone answered the phone before the timeout to that function
Asterisk would stop processing the dial plan.

[1] https://wiki.asterisk.org/wiki/display/AST/Application_WaitForRing

I ran into a couple of issues with WaitForRing(). The first being if
someone answered the phone and then quickly hung up *and* a new phone call
came in within the timeout period, Asterisk wouldn't know that the line
was ringing due to a new call. The second problem was I never got the dial
tone detection working so that if I tried to *place* a call from Asterisk
while someone was on the house line I would aggravate my wife.

Since coming to work for Digium I've seen in the data sheets for the FXO
interfaces that there is a capability to detect when a parallel device on a
line goes off hook. This would allow Asterisk to have a better sense of the
state of the line (like it currently can detect when a port is unplugged
and there is not battery by generating a red alarm.) but I haven't looked
into getting that information off the hardware and up into Asterisk.

Hope this helps,
Shaun


That application looks like a good solution. I can't test it until Monday, but
I'll try it and let you know. The drawbacks you mention doesn't seem too
inconvenient in my case.

Anyway, I started with this cause I thought it was an easy first step, if it
gets so complicated I think I'll go forward and put all phones under the
control of the PBX.

Thank you everybody for your help.

the situation gets more complex if Caller ID is sent and one wants to act upon 
it, and Asterisk doesn't handle the call

In the US the data is sent between the first and second ring, and if the call 
isn't answered by Asterisk, it thinks that another call has arrived WITHOUT the 
information, and the situation falls apart rapidly or one needs to have some 
logic to figure out if this is the third ring on call #1 or a new call

Though the chipset in the X100P supports looking at the output port, I don't 
believe the driver fully supports it

using a TDM 4xx or even better a single port T1 card with a channel bank gives 
a lot more  ports for the cost

John Novack

--

Dog is my Co-pilot


--
_
-- 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


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

2011-08-05 Thread Don Kelly
-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jorge Barreiro
Sent: Friday, August 05, 2011 12:35 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Answering machine answers after pickup a
phone.

O Venres, 5 de Agosto de 2011 17:42:28 Shaun Ruffell escribiu:
 On Fri, Aug 05, 2011 at 01:14:58PM +0200, Jorge Barreiro wrote:
  Hi,
  
  thanks for your time!
  
  O Venres, 5 de Agosto de 2011 12:35:05 escribiches:
   Completely normal operation.
   You need to read and understand more basic telephony and analog 
   lines to understand why that won't work.
  
  I definitely have a lot to learn yet.
  
   Asterisk needs to be in control, and once someone answers a phone 
   not under Asterisk control, or the call is abandoned there is 
   little you can do.
  
  What I pretend is that asterisk detects that it's not under control 
  and gets out of the way. The same way it detects a remote hangup and 
  stops the dialplan, it could detect that someone else answered (the 
  line is not ringing anymore) and discard it the same way it does 
  when the remote part hangup.
  
  I've read comments in forums and tutorials that seem to imply that 
  this happens, but I couldn't find any confirmation (and indeed, it's 
  not happening to me).
 
 When I first installed Asterisk in my home I used it in the way that 
 you
 described: as a glorified answering machine to email to me any voice mail.
 
 I think what you want is the WaitForRing()[1] dial plan application.  
 This function will wait x number of seconds, then look for *another* 
 ring to come in. If someone answered the phone before the timeout to 
 that function Asterisk would stop processing the dial plan.
 
 [1] https://wiki.asterisk.org/wiki/display/AST/Application_WaitForRing
 
 I ran into a couple of issues with WaitForRing(). The first being if 
 someone answered the phone and then quickly hung up *and* a new phone 
 call came in within the timeout period, Asterisk wouldn't know that 
 the line was ringing due to a new call. The second problem was I never 
 got the dial tone detection working so that if I tried to *place* a 
 call from Asterisk while someone was on the house line I would aggravate
my wife.
 
 Since coming to work for Digium I've seen in the data sheets for the 
 FXO interfaces that there is a capability to detect when a parallel 
 device on a line goes off hook. This would allow Asterisk to have a 
 better sense of the state of the line (like it currently can detect 
 when a port is unplugged and there is not battery by generating a red 
 alarm.) but I haven't looked into getting that information off the
hardware and up into Asterisk.
 
 Hope this helps,
 Shaun


That application looks like a good solution. I can't test it until Monday,
but I'll try it and let you know. The drawbacks you mention doesn't seem too
inconvenient in my case.

Anyway, I started with this cause I thought it was an easy first step, if it
gets so complicated I think I'll go forward and put all phones under the
control of the PBX.

Thank you everybody for your help.


I don't think this is a solution to the problem you described. No matter how
long Asterisk 'waits for ring,' if the call has already been answered when
Asterisk picks up, things won't work out well. The solution I described
earlier, adding a simple exclusion device, will preclude Asterisk 'stepping
on' a call in progress. This is the approach that Shaun suggests: ...a
capability to detect when a parallel device on a line goes off hook.  As it
has not been implemented in Asterisk, it can be handled by an inexpensive
device. This will enable you to do as you planned--test your implementation
step-by-step, starting with the answering machine.

--Don

Don Kelly

PCF Corp
People Come First
651 842-1000
651 842-1001 fax


--
_
-- 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


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

2011-08-05 Thread Jorge Barreiro
O Venres, 5 de Agosto de 2011 21:20:37 Don Kelly escribiu:
 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jorge
 Barreiro Sent: Friday, August 05, 2011 12:35 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] Answering machine answers after pickup a
 phone.
 
 O Venres, 5 de Agosto de 2011 17:42:28 Shaun Ruffell escribiu:
  On Fri, Aug 05, 2011 at 01:14:58PM +0200, Jorge Barreiro wrote:
   Hi,
   
   thanks for your time!
   
   O Venres, 5 de Agosto de 2011 12:35:05 escribiches:
Completely normal operation.
You need to read and understand more basic telephony and analog
lines to understand why that won't work.
   
   I definitely have a lot to learn yet.
   
Asterisk needs to be in control, and once someone answers a phone
not under Asterisk control, or the call is abandoned there is
little you can do.
   
   What I pretend is that asterisk detects that it's not under control
   and gets out of the way. The same way it detects a remote hangup and
   stops the dialplan, it could detect that someone else answered (the
   line is not ringing anymore) and discard it the same way it does
   when the remote part hangup.
   
   I've read comments in forums and tutorials that seem to imply that
   this happens, but I couldn't find any confirmation (and indeed, it's
   not happening to me).
  
  When I first installed Asterisk in my home I used it in the way that
  you
  described: as a glorified answering machine to email to me any voice
  mail.
  
  I think what you want is the WaitForRing()[1] dial plan application.
  This function will wait x number of seconds, then look for *another*
  ring to come in. If someone answered the phone before the timeout to
  that function Asterisk would stop processing the dial plan.
  
  [1] https://wiki.asterisk.org/wiki/display/AST/Application_WaitForRing
  
  I ran into a couple of issues with WaitForRing(). The first being if
  someone answered the phone and then quickly hung up *and* a new phone
  call came in within the timeout period, Asterisk wouldn't know that
  the line was ringing due to a new call. The second problem was I never
  got the dial tone detection working so that if I tried to *place* a
  call from Asterisk while someone was on the house line I would aggravate
 
 my wife.
 
  Since coming to work for Digium I've seen in the data sheets for the
  FXO interfaces that there is a capability to detect when a parallel
  device on a line goes off hook. This would allow Asterisk to have a
  better sense of the state of the line (like it currently can detect
  when a port is unplugged and there is not battery by generating a red
  alarm.) but I haven't looked into getting that information off the
 
 hardware and up into Asterisk.
 
  Hope this helps,
  Shaun
 
 That application looks like a good solution. I can't test it until Monday,
 but I'll try it and let you know. The drawbacks you mention doesn't seem
 too inconvenient in my case.
 
 Anyway, I started with this cause I thought it was an easy first step, if
 it gets so complicated I think I'll go forward and put all phones under
 the control of the PBX.
 
 Thank you everybody for your help.
 
 
 I don't think this is a solution to the problem you described. No matter
 how long Asterisk 'waits for ring,' if the call has already been answered
 when Asterisk picks up, things won't work out well.

The idea is that asterisk doesn't pick up if doesn't find the ring. 

 The solution I
 described earlier, adding a simple exclusion device, will preclude
 Asterisk 'stepping on' a call in progress. This is the approach that Shaun
 suggests: ...a capability to detect when a parallel device on a line goes
 off hook.  As it has not been implemented in Asterisk, it can be handled
 by an inexpensive device. This will enable you to do as you planned--test
 your implementation step-by-step, starting with the answering machine.

Yes, that exclusion device would be more of a solution instead of just a 
workaround. But I'm finding it hard to find where to buy one in Spain (I've 
just 
started to look for them, anyway).


Thanks.

 --Don
 
 Don Kelly
 
 PCF Corp
 People Come First
 651 842-1000
 651 842-1001 fax
 
 
 --
 _
 -- 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

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

2011-08-04 Thread 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


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

2011-08-04 Thread Ruben Rögels
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