Skip to content

Commit

Permalink
added support for transcribed callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mattaylor committed Feb 5, 2011
1 parent d6aee89 commit 1a89f23
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/twiml.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ var Record = module.exports.Record = function Record(attrs) {
this.attrs.action = uri;
this.attrs.method = 'POST';
}
if (attrs.transcribe && global.autoUri) {
var uri = global.autoUri.addCallback('POST', function(req, res) {
self.emit('transcribed', req.body, new Response(res));
}, {maxRequests: 1});
this.attrs.transcribeCallback = uri;
this.attrs.method = 'POST';
}
};

sys.inherits(Record, EventEmitter);
Expand Down

0 comments on commit 1a89f23

Please sign in to comment.