[Asterisk-Users] Why use 'Answer'?
Rich Adamson
radamson at routers.com
Thu Dec 23 07:57:22 MST 2004
> > >Rephrased: Why do folks think they have to use Answer in the sequence
> > >when Playback (etc) is _not_ used?
> >
> > Because they don't think or they love the telephone companies ...
> >
>
> Ok, this is probably a stupid question ;)
>
> If I have a setup like the following:
>
> One TDM400P with one FXO interface in slot 4.
>
> zapata.conf chunk:
>
> signalling=fxs_ks
> language=en
> context=in5100
> channel => 4
>
> extensions.conf chunk:
>
> [in5100]
> exten => s,1,Wait,2
> exten => s,n,Answer
> exten => s,n,DigitTimeout,5
> exten => s,n,ResponseTimeout,10
> exten => s,n(restart),BackGround(demo-congrats)
> exten => s,n,WaitExten
> exten => 401,1,Dial(SIP/sip1,20,tr)
>
> ///
>
> I'm just playing demo-congrats so I can hear something when I call in
> to know it's working. What I would really like to have happen for
> now is to ring the sip1 phone when the incoming line rings and only
> answer the incoming line if the sip1 phone gets answered.
>
> I've been playing with * for a while,
> but this is my first zap device :)
> [been all sip and iax til now]
>
> Clues?
As in many cases with *, there are usually multiple ways to accomplish
a task. Here's a couple that you'll need to tailor to your environment.
[in5100]
exten => s,1,Dial(SIP/sip1,20,tr)
The above assumes the pstn line is _not_ sending any digits to you. If
it does, then replace "s" with whatever they are sending to you.
Or, if you don't want to maintain multiple instances of the Dial command,
then do something like:
[in5100]
exten => s,1,Goto(local-extns,sip1,1)
The above assumes your sip phone dialplan reside in the [local-extns]
context, that sip1 is a valid extn number within that context, and "1"
is the first priority in that sip phone definition.
When someone answers the sip phone, the zap pstn line will be answered.
If no one answers the sip phone, the "20" second timer will expire and
ordinarily it would jump to the next priority. So, you probably want to
remove the timeout altogether from that exten definition and just let
it ring forever.
More information about the asterisk-users
mailing list