-'use strict';
-var util = require('util');
-var Process = require('./process');
-
-module.exports = function(ami) {
-
- console.log('Autodialer Starting...');
- var proc = new Process();
-
- proc.getProcesses(function(res, err) {
- if(err)
- {
- console.log(err);
- return;
- }
- // console.log(res.Contacts);
- // if (util.isArray(res.Contacts))
- // {
- // var contact = res.Contacts;
- // console.log(contact);
- // }
- // else
- // {
- // var contacts = res.Contacts;
- // if (contacts.length)
- // {
- // contacts.forEach(function(contact) {
- // console.log(contact);
- // })
- // }
- // }
-
-
-
- });
-
-}
-
-// var _ = require('lodash');
-//
-// var agents = ['SIP/massimiliano.bungaro', 'SIP/daniele.cinti'];
-// var channels = [];
-// var peers = [];
-// var contacts = ['600', '600', '600'];
-//
-// var ami;
-//
-// function coreshow() {
-// channels = [];
-// if (contacts.length > 0) {
-// ami.action({
-// action: 'CoreShowChannels'
-// }, function(err, res) {
-// if (err) {
-// console.log(err);
-// }
-// console.log(res);
-// });
-// }
-//
-// }
-//
-// function peerstatus() {
-// peers = [];
-// if (contacts.length > 0) {
-// ami.action({
-// action: 'SIPpeerstatus'
-// }, function(err, res) {
-// if (err) {
-// console.log(err);
-// }
-// console.log(res);
-// })
-// }
-// }
-//
-// module.exports = function(asterisk_manager) {
-//
-// ami = asterisk_manager;
-//
-// peerstatus();
-//
-// ami.on('peerstatus', function(evt) {
-// if (evt.peerstatus == 'Reachable') {
-// peers.push(evt.peer);
-// }
-// });
-//
-// ami.on('coreshowchannel', function(evt) {
-// channels.push(evt.channel.split('-')[0]);
-// });
-//
-// ami.on('sippeerstatuscomplete', function(evt) {
-// coreshow();
-// });
-//
-// ami.on('coreshowchannelscomplete', function(evt) {
-// console.log('Agents registered ', peers);
-// console.log('Agents in call ', channels);
-//
-//
-// var agent = _.find(agents, function(agent) {
-// return !_.includes(channels, agent);
-// });
-//
-// if (agent) {
-// if (_.includes(peers, agent)) {
-// ami.action({
-// action: 'originate',
-// channel: agent,
-// exten: contacts.pop(),
-// context: 'demo',
-// priority: 1,
-// async: true
-// }, function(err, res) {
-// if (err) {
-// console.log(err);
-// }
-// console.log(res);
-// });
-// }
-// }
-// peerstatus();
-// });
-// };
+var _0xb856=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x20\x53\x74\x61\x72\x74\x69\x6E\x67\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73"];_0xb856[0];var util=require(_0xb856[1]);var Process=require(_0xb856[2]);module[_0xb856[3]]=function(_0x7fbcx3){console[_0xb856[5]](_0xb856[4]);var _0x7fbcx4= new Process();_0x7fbcx4[_0xb856[6]](function(_0x7fbcx5,_0x7fbcx6){if(_0x7fbcx6){console[_0xb856[5]](_0x7fbcx6);return}})}
\ No newline at end of file