Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- use Yate;
- sub call_route_handler($) {
- my $message = shift;
- # Event is processed and returns the following:
- return 'sip/sip:' . $message->param('called') . '@11.11.11.11';
- }
- sub call_execute_handler($) {
- my $message = shift;
- $message->dump();
- # Event is not processed. You can use 0 or undef instead.
- # or just don't use return.
- return 'false';
- }
- my $message = new Yate();
- # call.route, call.execute or any other event.
- $message->install('call.route', \&call_route_handler);
- # This processes events from other modules like conference.cpp.
- $message->install_watcher('call.execute', \&call_execute_handler);
- $message->listen();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement