Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ Plays the specified `file`. Playback can be stopped using one of the (optional)

Hangs up the current channel.

#### 2.3 Channel events

* 'hangup'

Emitted when the current channel is hung up.

## LICENSE

Expand Down
3 changes: 3 additions & 0 deletions lib/agi-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ var AGIChannel = function(request, mapper) {
util.inherits(AGIChannel, events.EventEmitter);

AGIChannel.prototype.handleReply = function(reply) {
if (reply == 'hangup') {
this.emit('hangup') ;
}
if (this.callback) {
if (reply == 'hangup') {
this.callback('hangup');
Expand Down