For a simple call file like Channel: Zap/g1/XXXXXXX RetryTime: 60 WaitTime: 30 Context: from-file Extension: s Priority: 1 I noticed that s@from-file started to execute regardless of the state of the outgoing call. Is this supposed to be? So far I can only set a Wait() in the local leg and hope the remote party picks up soon enough. I thought call file extension will start execution only when the outgoing leg is answered. Or is there some way to detect this? Yuan Liu
Eric "ManxPower" Wieling
2007-Mar-04 11:41 UTC
[asterisk-users] When does local leg in call file start?
Yuan LIU wrote:> For a simple call file like > > Channel: Zap/g1/XXXXXXX > RetryTime: 60 > WaitTime: 30 > Context: from-file > Extension: s > Priority: 1 > > I noticed that s@from-file started to execute regardless of the state of > the outgoing call. Is this supposed to be? So far I can only set a > Wait() in the local leg and hope the remote party picks up soon enough. > > I thought call file extension will start execution only when the > outgoing leg is answered. Or is there some way to detect this?FXO ports are considered "answered" as soon as dialing is finished. This is because most telcos do not provide answer supervision. PRI (and maybe E&M ports) and FXS ports do not have this issue.
Yuan LIU wrote:> I noticed that s@from-file started to execute regardless of the state > of the outgoing call. Is this supposed to be? So far I can only set > a Wait() in the local leg and hope the remote party picks up soon enough. > > I thought call file extension will start execution only when the > outgoing leg is answered. Or is there some way to detect this?If you are dialing via a PRI or a device that supports call supervision, this is the case. If you are using a standard POTS line, the call is assumed answered immediately. This has been covered many times on this list, search the archives for code fragments on how to deal with such a situation. Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Apparently Analagous Threads
- CDR custom variable on second call leg - via originate or .call file
- Auto Dial Problem
- POTS supervision with DAHDI in 1.4 releases
- Asterisk outbound calling does not wait for answer before playback
- auto-dail for ZAP channel, the application gets executed before the call attended