Let me be a bit more specific about my meaning:
Using a PRI interface, it is possible to get "good" call progress
supervision, where one can see if the far end has answered. This is
also possible with standard Zap interfaces, and certainly with SIP (I
assume H323 is also possible, but my experience there is weaker.)
From our brief conversation, I'll assume you are talking about
detecting an answer on a Zap line.
Looking at the DEBUG information during a Dial command, you can
clearly see when a line is picked up. The Dial program has a
'timeout' feature, which will count a number of seconds before the
Dial is aborted if there is no answer. So, in short, you can do what
you're asking for with the existing commands. You are somewhat
limited with Dial and standard Zap (X100P and FXS) ports as there
sometimes are difficulties with call progress detection, but many
people have no problems with that feature, so it's a gamble.
example:
exten => 12345,1,Dial(Zap/g1/12345,30)
exten => 12345,2,Playback(error-has-happened-recording)
exten => 12345,102,Playback(line-is-busy-recording)
You can tell the following things from the Dial statement above:
a) A call has not been answered in the number of seconds you have
provided. The call will proceed to priority 2, and the file
error-has-happened-recording will be played to the caller.
b) A call has been answered normally, and terminated normally. The
execution will stop at Priority 1, unless you have an "h" context.
c) The line 12345 was busy, in which case the Dial program will
jump to extension 102
<pokes Mark> More cool stuff would be achievable if there were some
variables that were handed to the dialplan "h" logic after a Dial
statement was executed (such as "SIP 403 Forbidden" or "Zap 33
Circuit out of order") I've whined about this before, though, so
won't beat that dead horse again.
JT
>Hi,
>
>I have a simple asterisk application that bridges a call to an operator.
>Now I want to detect if this operator has picked up his phone or not.
>Ass John Todd told me on the irc channel, that cannot easily be done
>because Asterisk understands this internally, but does not present these
>data
>to the dial plan...
>
>Is there a solution to my problem or do I have to hack the code...
>I'm sure other people have encountered this problem.. i think it's a
nice
>feature.. so if someone has a patch, tell me !
>
>Sincerely,
>
>Bart Ronsyn,
>Leuven (Belgium)
>
>PS. You could suggest working with a timeout of say 30 seconds, but is not
> 100% correct... if the 30 seconds expire, you can certainly say the
>operator
> has not picked up... it the call ends within the first 30 seconds, you
>can
> not tell if the operator has picked up his phone or not... correct me
if
>i'm
> wrong...
>