nodejs freeswitch esl server
call_handler = require('seem') ->
caller = @data['Channel-Caller-ID-Number']
callee = @data['Channel-Destination-Number']
new_caller = yield db.getAsync "new_caller_for_#{caller}"
yield @command 'answer'
yield @command 'play-file', 'voicemail/vm-hello'
yield @command 'set', "effective_caller_id_number=#{new_caller}"
yield @command 'bridge', "sofia/egress/#{callee}@example.net"
require('esl').server(call_handler).listen(7000)