Re: [asterisk-users] [1.4] Asterisk doesn't hang up?

2011-03-18 Thread Gilles
On Tue, 15 Mar 2011 14:54:53 +0100, Gilles codecompl...@free.fr
wrote:
   I'm trying to use ChanIsAvail() to check when the landline is back
to idle after a call, but for some reason, Asterisk doesn't detect
that the callee has hung up after listening to MoH for a few seconds:

For those trying to do the same thing: Zaptel/Dahdi does detect that
the remote party has hung up when using busydetect=yes in
zapata.conf/chan_dahdi.conf.


--
_
-- 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] [1.4] Asterisk doesn't hang up?

2011-03-17 Thread Gilles
On Wed, 16 Mar 2011 22:45:35 +1100, John Kosmas
batc...@optusnet.com.au wrote:
i have the same problem but it doesnt always happen tho from the same
caller. 

im using Asterisk 1.4 - maybe newer version updates have
had bug fixes. maybe this could rectify it. 

Thanks John, but I still get the problem with 1.6. Looks like the VoIP
plug on my ADSL modem doesn't provide either polarity reversal or open
loop, so Zaptel/Dahdi can't dectect answer/detect.

Could be on purpose, to prevent people from hooking up an IP PBX and
use this option in ways the ISP wants to prevent ;-)


--
_
-- 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] [1.4] Asterisk doesn't hang up?

2011-03-16 Thread Gilles
On Tue, 15 Mar 2011 13:45:00 -0400, Paul Belanger
pabelan...@digium.com wrote:
Is this an analog line?  If so, is your CO providing a disconnect tone?

Yes, it's an analog line, but it's actually VoIP provided by an RJ11
on an ADSL modem, not a real landline.

Is there a way to check how the ADLS/telco provides disconnection, ie.
whether it's through polarity reversal, open loop, or by just playing
call progress tones?

Thank you.


--
_
-- 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] [1.4] Asterisk doesn't hang up?

2011-03-16 Thread John Kosmas
Hi There,

i have the same problem but it doesnt always happen tho from the same
caller. 

im using Asterisk 1.4 - maybe newer version updates have
had bug fixes. maybe this could rectify it. 

Regards,




On Tue, 2011-03-15 at 14:54 +0100, Gilles wrote:
 Hello
 
   I'm trying to use ChanIsAvail() to check when the landline is back
 to idle after a call, but for some reason, Asterisk doesn't detect
 that the callee has hung up after listening to MoH for a few seconds:
 
 == extensions.conf
 ;Play MoH for a few seconds, hang up, and
 ;check ChanIsAvail() able to detect when line idle again
 exten = ,1,Answer()
 exten = ,n,Playback(/var/tmp/manolo_camp-morning_coffee)
 exten = ,n,Hangup
 
 == CLI
 ;keep line engaged for a few seconds, and hang up from remote end
 
 originate Zap/1/5551234 extension @internal
 
 == extensions.conf
 ;call from XLite to check line status
 
 ;Loop until Zap/1 is available
 exten = ,1,Set(INDEX=0)
 exten = ,n,While(1)
 exten = ,n,ChanIsAvail(Zap/1)
 exten = ,n,GotoIf($[${AVAILORIGCHAN} !=  | ${INDEX} 
 10]?exit)
 exten = ,n,Wait(5)
 exten = ,n,Set(INDEX=$[${INDEX} + 1])
 exten = ,n,EndWhile()
 
 ;how did we exit loop?
 exten = ,n(exit),GotoIf($[${AVAILORIGCHAN} = ]?na:ok)
 exten = ,n(na),NoOp(Channel still N.A.)
 exten = ,n,Goto(end)
 exten = ,n(ok),NoOp(Channel OK)
 exten = ,n(end),Hangup
 == 
 
 Even after callee at 5551234 hangs up, Asterisk keeps looping in
 extension , and only runs 's Hangup after  runs Hangup.
 
 I also tried calling out through a callfile, same result.
 
 Is there another instruction I should use in  to have
 Asterisk/Zaptel close the channel after the remote end has hung up?
 
 Thank you.
 
 
 --
 _
 -- 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


[asterisk-users] [1.4] Asterisk doesn't hang up?

2011-03-15 Thread Gilles
Hello

I'm trying to use ChanIsAvail() to check when the landline is back
to idle after a call, but for some reason, Asterisk doesn't detect
that the callee has hung up after listening to MoH for a few seconds:

== extensions.conf
;Play MoH for a few seconds, hang up, and
;check ChanIsAvail() able to detect when line idle again
exten = ,1,Answer()
exten = ,n,Playback(/var/tmp/manolo_camp-morning_coffee)
exten = ,n,Hangup

== CLI
;keep line engaged for a few seconds, and hang up from remote end

originate Zap/1/5551234 extension @internal

== extensions.conf
;call from XLite to check line status

;Loop until Zap/1 is available
exten = ,1,Set(INDEX=0)
exten = ,n,While(1)
exten = ,n,ChanIsAvail(Zap/1)
exten = ,n,GotoIf($[${AVAILORIGCHAN} !=  | ${INDEX} 
10]?exit)
exten = ,n,Wait(5)
exten = ,n,Set(INDEX=$[${INDEX} + 1])
exten = ,n,EndWhile()

;how did we exit loop?
exten = ,n(exit),GotoIf($[${AVAILORIGCHAN} = ]?na:ok)
exten = ,n(na),NoOp(Channel still N.A.)
exten = ,n,Goto(end)
exten = ,n(ok),NoOp(Channel OK)
exten = ,n(end),Hangup
== 

Even after callee at 5551234 hangs up, Asterisk keeps looping in
extension , and only runs 's Hangup after  runs Hangup.

I also tried calling out through a callfile, same result.

Is there another instruction I should use in  to have
Asterisk/Zaptel close the channel after the remote end has hung up?

Thank you.


--
_
-- 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] [1.4] Asterisk doesn't hang up?

2011-03-15 Thread Gilles
On Tue, 15 Mar 2011 14:54:53 +0100, Gilles codecompl...@free.fr
wrote:
   I'm trying to use ChanIsAvail() to check when the landline is back
to idle after a call, but for some reason, Asterisk doesn't detect
that the callee has hung up after listening to MoH for a few seconds:

It looks like neither Playback() nor Background() check for hangup and
will simply play the file all the way to the end, so I simply replaced
the long MoH with a short beep:

==
exten = ,1,Wait(2)
exten = ,n,Answer()

;exten = ,n,Playback(/var/tmp/manolo_camp-morning_coffee)
;exten = ,n,Read(key,/var/tmp/manolo_camp-morning_coffee,1,,10,2)

;exten = ,n,Background(/var/tmp/manolo_camp-morning_coffee)
exten = ,n,Background(beep)

exten = ,n,WaitExten(10)
exten = ,n,Hangup
==

HTH,


--
_
-- 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] [1.4] Asterisk doesn't hang up?

2011-03-15 Thread Paul Belanger

On 11-03-15 09:54 AM, Gilles wrote:

Even after callee at 5551234 hangs up, Asterisk keeps looping in
extension , and only runs 's Hangup after  runs Hangup.

I also tried calling out through a callfile, same result.

Is there another instruction I should use in  to have
Asterisk/Zaptel close the channel after the remote end has hung up?


Is this an analog line?  If so, is your CO providing a disconnect tone?

--
Paul Belanger
Digium, Inc. | Software Developer
twitter: pabelanger | IRC: pabelanger (Freenode)
Check us out at: http://digium.com  http://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