1call_handler = require('seem') ->
2 caller = @data['Channel-Caller-ID-Number']
3 callee = @data['Channel-Destination-Number']
4 new_caller = yield db.getAsync "new_caller_for_#{caller}"
5 yield @command 'answer'
6 yield @command 'play-file', 'voicemail/vm-hello'
7 yield @command 'set', "effective_caller_id_number=#{new_caller}"
8 yield @command 'bridge', "sofia/egress/#{callee}@example.net"
9
10require('esl').server(call_handler).listen(7000)
11