[Asterisk-Users] Detect line is busy with Zap?
Ian Chilton
mailinglist at ichilton.co.uk
Thu Dec 16 05:30:45 MST 2004
Hi,
I have an FXO card connected to my phone line which works in Asterisk as
Zap/1.
Is there any way of detecting whether something else is on the line
before picking up on this channel?
For example, I dont want to pick up and dial out on the line if someone
is on it using another phone (which is connected directly to the line,
rather than through Asterisk).
Also, when an incoming call comes in, i've got this:
[incoming_pstn]
exten => s,1,NoOp(${CALLERID} calling on Zap/1)
exten => s,2,Wait,15
exten => s,3,Answer
exten => s,4,Voicemail(su1)
exten => s,5,Hangup
I really want to wrap the Answer, Voicemail and Hangup commands in some
kind of if statement so if Asterisk didn't detect that the call had been
answered for any reason, it wouldn't answer the call if the line was
busy - otherwise it would click in and play the voicemail greeting over
the call which someone is conducting from a non-asterisk phone on the
line.
My zapata.conf looks like this:
[channels]
context=incoming_pstn
signalling=fxs_ks
usecallerid=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
rxgain=1.0
txgain=0.0
channel => 1
Thanks!
--ian
More information about the asterisk-users
mailing list