Hi,<br>
<br>
&nbsp;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 &lt;csignal&gt;<br>
&nbsp;<br>
&nbsp; struct sigaction my_action;<br>
&nbsp; my_action.sa_handler = SIG_IGN;<br>
&nbsp; my_action.sa_flags = SA_RESTART;<br>
&nbsp; int sigret = sigaction (SIGHUP, &amp;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>