[Asterisk-Users] Detect line is busy with Zap?

Wilson Pickett spamsucks2005 at gmail.com
Thu Dec 16 09:50:30 MST 2004


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

I had this problem too when first testing asterisk while we had normal
phones connected to both lines. You know, the period in development
where you are using rmmod, make, and modprobe every 5 minutes or so?
There is AFAIK absolutely no solution.

What I did though was to inhibit any action by asterisk when certain
manually set flags were found. This allowed me to tell * to answer
only my line (or no lines if an important call was expected) while not
dealing with the company main line.

When a call was detected, the flag was checked (a "do nothing" flag)
and if set, sent the dialplan to [do-nothing] which from memory looked
like this:

[do-nothing]
exten => s,1, Wait(15)

(probably could just as well contain a single NoOp)

I gave up on trying to deal with lines connected also to phones.



More information about the asterisk-users mailing list