Index: res/res_agi.c =================================================================== --- res/res_agi.c (revision 343749) +++ res/res_agi.c (working copy) @@ -3483,7 +3483,7 @@ if (pid > -1) { kill(pid, SIGHUP); } else if (agi->fast) { - send(agi->ctrl, "HANGUP\n", 7, 0); + ast_agi_send(agi->fd, chan, "HANGUP\n"); } } } @@ -3598,7 +3598,7 @@ } waitpid(pid, status, WNOHANG); } else if (agi->fast) { - send(agi->ctrl, "HANGUP\n", 7, 0); + ast_agi_send(agi->fd, chan, "HANGUP\n"); } } fclose(readf);