Adesh Pandey
Adesh Pandey

Reputation: 769

Is there any way to know which peer disconnected the call Asterisk

I am trying to collect some info about the ongoing call in asterisk but during hangup I want to log which peer initiated the process of hangup. I am new to asterisk so I have no idea if its possible or not. Please help me if it can be done. I have tried to use HANGUPCAUSE_KEYS but it does not provide much information.

Actually I want to know who has released the line first? If A and B are connected with bridge and B releases I want to record that B has released the channel and vice versa. Thanks!

Upvotes: 2

Views: 1324

Answers (1)

Tamás Mazuk
Tamás Mazuk

Reputation: 141

I can see 2 ways. 1) Set a Hangup Handler in your dialplan (extensions.conf). Maybe it is the easiest way, but limited. WIKI: Hangup Handler 2) Use AMI and try to monitor the channels. It can be complicated, but almost limitless and powerful. WIKI: Asterisk AMI

Upvotes: 1

Related Questions