[asterisk-users] Setting a threshold for asterisk to take ZAP line off hook ?

Maxim Vexler hq4ever at gmail.com
Sun Jul 16 12:16:15 MST 2006


On 7/16/06, Martin Joseph <ast at stillnewt.org> wrote:
>
> On Jul 16, 2006, at 11:36 AM, Maxim Vexler wrote:
>
> > Hello list
> >
> > I'm trying to setup asterisk as an answering machine.
> >
> > How can I set asterisk to Answer() incoming call ONLY after specified
> > count of ring cycles ?
> >
> > In the current situation I have the PBX connected to a home line,
> > where POTS device are also connected on the same circuit. What I'm
> > trying to do is allow a grace period where a POTS device could be
> > picked up and those stop the ring indication on the line by this
> > causing asterisk to not answer the call.
> >
> > In present situation even if the incoming phone call is taken off hook
> > by a POST device asterisk still starts playing its incoming call IVR
> > after the specified(where?) number of seconds.
> >
> I don't think you can do that, since asterisk has no way to know when
> the shared PSTN line is answered by your analog phones...
>
> I don't think asterisk "counts" the rings, as much as it waits for
> "answered" status, which it is never going to see in your current
> configuration.
>
> I am a relative newb though,  so maybe someone else here has a
> brilliant idea for you?
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>

You have a point but no way am I going to accept that as an answer.

Here's the log off such case :

Jul 16 21:59:20 DEBUG[4387] chan_zap.c: Monitor doohicky got event
Ring Begin on channel 1
Jul 16 21:59:21 DEBUG[4387] chan_zap.c: Monitor doohicky got event
Ring/Answered on channel 1
Jul 16 21:59:21 DEBUG[4387] dsp.c: dsp busy pattern set to 0,0
Jul 16 21:59:21 VERBOSE[4411] logger.c:     -- Starting simple switch
on 'Zap/1-1'
Jul 16 21:59:21 DEBUG[4373] devicestate.c: Changing state for Zap/1 -
state 2 (In use)
Jul 16 21:59:21 DEBUG[4412] app_queue.c: Device 'Zap/1' changed to
state '2' (In use)
Jul 16 21:59:29 WARNING[4411] chan_zap.c: CallerID returned with error
on channel 'Zap/1-1'
Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Answer'
Jul 16 21:59:29 VERBOSE[4411] logger.c:     -- Executing
Answer("Zap/1-1", "") in new stack
Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Took Zap/1-1 off hook
Jul 16 21:59:29 DEBUG[4411] chan_zap.c: Enabled echo cancellation on channel 1
Jul 16 21:59:29 DEBUG[4411] chan_zap.c: No echo training requested
Jul 16 21:59:29 DEBUG[4411] pbx.c: Launching 'Set'

As you can see, the first two events are "event Ring" and "event Ring/Answered".
What I need is the driver of chan_zap.c counting 5 "event Ring" before
starting Ring/Answered.

It can't be that hard (I think).
Thank you for your answer.

-- 
Cheers,
Maxim Vexler

"Free as in Freedom" - Do u GNU ?



More information about the asterisk-users mailing list