Hi there!
I am implementing an IVR solution using fastAGI running my logic in c# on a Win2003 server.
My problem is that I need to check the call duration at the end of the call to generate some radius requests. If the callee hangsup I can then check the ANSWEREDTIME variable but if the caller hangsup then the TCP connection is closed by * and I don’t see a way of retrieving that info anymore.
I cannot believe that I am the first one with that kind of application and I also cannot imagine that the only way of getting that info is to parse the ami events in parallel just in order to get the cdr info. I am just hoping that there is something a little more “straightforward” 
Thanks for your help!
Best regards,
Tillman
There is extension h.
Using that extension you can make what you want after hangup.
You mean something like:
- first connecting the caller to the fastAGI server and executing the DIAL
- then the caller hangsup and the TCP is closed
- then the caller will fall through to the h extension and there I will connect to the fastAGI server again but this time using a different “script” in order to be able to signal the server “hey, this is just for letting you know about the ANSWEREDTIME”
It sounds a bit like a hack to me because of the tcp re-connect and the different scripts, especially because after the first disconnect my call-thread automatically disposes on the fastAGI server.
I was thinking more into the direction of deadAGI perhaps - I gotta have another look at that because I guess I need some way to prevent * from disconnecting the TCP session when the caller has hung up.
Thanks for taking the time to answer anyway, I appreciate that!
Update: ok, my current guess is that I am gonna use fastAGI and then deadAGI on the h extension. Then I will check the ANSWEREDTIME, create the radius requests and close the TCP session from my end.
Not really beautiful but this sounds like it could work…
After all it was way simpler than I originally thought.
Just using deadAGI will not kill the TCP connection when the caller hangs up.
The DIAL app will properly return with result==-1 and I can call GET VARIABLE to check the ANSWEREDTIME variable and then perform my radius requests. After that I send hangup (just in case) and I close the TCP connection myself.
That’s what I call straightforward… 