I have dialplan as
exten => 4000,1,Dial(SIP/100,20)
exten => 4000,n,Dial(SIP/101,20)
exten => 4000,n,Dial(SIP/102,20)
exten => 4000,n,Dial(SIP/103,20)
exten => 4000,n,Agi(agi://host:port/hello.agi)
exten => 4000,n,Goto(4000,1)
if I test
exten => 4000,n,Agi(agi://host:port/hello.agi)
alone it works i.e. hello.agi gets executed.
It also works if none of the Dial() are responded i.e. if nobody picks up the phone then hello.agi is executed.
But if any one Dial is responsed e.g. if SIP/101 picks the phone, then hello.agi is not called.
Is it that once Dial() is called controll is lost. What is the solution to this?
I want to call a AGI code once somebody picks up the phone and record who picked up the phone.