summaryrefslogtreecommitdiff
path: root/main/autoservice.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/autoservice.c')
-rw-r--r--main/autoservice.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index 37bbee682..afbcbd3e0 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -313,6 +313,16 @@ int ast_autoservice_stop(struct ast_channel *chan)
return res;
}
+void ast_autoservice_chan_hangup_peer(struct ast_channel *chan, struct ast_channel *peer)
+{
+ if (chan && !ast_autoservice_start(chan)) {
+ ast_hangup(peer);
+ ast_autoservice_stop(chan);
+ } else {
+ ast_hangup(peer);
+ }
+}
+
int ast_autoservice_ignore(struct ast_channel *chan, enum ast_frame_type ftype)
{
struct asent *as;