Hi,<br>
<br>
I have developed a custom AGI in C++. Whenever I stream a file or
say out digits with STREAM FILE and SAY NUMBER and hangup the call in
between the AGI ends abruptly.<br>
I did a bit of surfing through previous posts and found out that
asterisk sends a SIGHUP signal as soon as a caller ends a call. The
suggesion was to catch the SIGHUP signal in the process and ignore it.
I wrote the following piece of code at the star of the agi.<br>
<br>
#include <csignal><br>
<br>
struct sigaction my_action;<br>
my_action.sa_handler = SIG_IGN;<br>
my_action.sa_flags = SA_RESTART;<br>
int sigret = sigaction (SIGHUP, &my_action, NULL);<br>
<br>
This should solve the problem but unfortunately the agi is still crashing straight after I hangup the call.<br>
<br>
May be I need to unblock the signal, I am not sure how. Am I missing something.<br>
<br>
Regards,<br>
Danish<br>