Built motion from commit 20e1a16.|0.0.54
[motion.git] / server / models / telephone.js
1 var _0xc622=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x64\x35","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x54\x52\x49\x4E\x47","\x6E\x61\x6D\x65","\x73\x65\x74\x44\x61\x74\x61\x56\x61\x6C\x75\x65","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x73\x61\x6C\x74","\x6D\x61\x6B\x65\x53\x61\x6C\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x65\x6E\x63\x72\x79\x70\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x6D\x64\x35\x73\x65\x63\x72\x65\x74","\x3A\x61\x73\x74\x65\x72\x69\x73\x6B\x3A","\x6D\x64\x35\x50\x61\x73\x73\x77\x6F\x72\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x79\x6E\x61\x6D\x69\x63","\x66\x72\x69\x65\x6E\x64","\x75\x73\x65\x72","\x70\x65\x65\x72","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x75\x64\x70","\x72\x66\x63\x32\x38\x33\x33","\x69\x6E\x66\x6F","\x73\x68\x6F\x72\x74\x69\x6E\x66\x6F","\x69\x6E\x62\x61\x6E\x64","\x61\x75\x74\x6F","\x79\x65\x73","\x6E\x6F","\x6E\x6F\x6E\x61\x74","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x65\x6E","\x61\x6C\x6C","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x6E\x65\x76\x65\x72","\x22\x22\x20\x3C\x3E","\x61\x63\x63\x65\x70\x74","\x72\x65\x66\x75\x73\x65","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x75\x61\x63","\x75\x61\x73","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x41\x4C\x4C\x4F\x57\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x50\x52\x4F\x48\x49\x42\x5F\x50\x41\x53\x53\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42\x5F\x46\x41\x49\x4C\x45\x44\x5F\x53\x43\x52\x45\x45\x4E","\x50\x52\x4F\x48\x49\x42","\x75\x73\x65\x72\x73","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x62\x61\x73\x65\x36\x34","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","","\x70\x62\x6B\x64\x66\x32\x53\x79\x6E\x63","\x64\x65\x66\x69\x6E\x65"];_0xc622[0];var crypto=require(_0xc622[1]);var md5=require(_0xc622[2]);var _=require(_0xc622[3]);module[_0xc622[4]]=function(_0x1ebdx4,_0x1ebdx5){var _0x1ebdx6=_0x1ebdx4[_0xc622[60]](_0xc622[5],{name:{type:_0x1ebdx5[_0xc622[6]],unique:true,validate:{notEmpty:true},set:function(_0x1ebdx7){this[_0xc622[8]](_0xc622[7],_0x1ebdx7);this[_0xc622[8]](_0xc622[9],_0x1ebdx7)}},password:{type:_0x1ebdx5[_0xc622[6]],allowNull:false,validate:{notEmpty:true},set:function(_0x1ebdx8){this[_0xc622[10]]=this[_0xc622[11]]();this[_0xc622[8]](_0xc622[12],this[_0xc622[13]](_0x1ebdx8));this[_0xc622[8]](_0xc622[14],this[_0xc622[16]](this[_0xc622[7]]+_0xc622[15]+_0x1ebdx8))}},internal:{type:_0x1ebdx5.INTEGER(11),unique:true,set:function(_0x1ebdx9){this[_0xc622[8]](_0xc622[17],_0x1ebdx9);this[_0xc622[8]](_0xc622[18],_0x1ebdx9)}},ipaddr:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},port:{type:_0x1ebdx5.INTEGER(5),allowNull:true},regseconds:{type:_0x1ebdx5.INTEGER(11),allowNull:true},defaultuser:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},fullcontact:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},regserver:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},useragent:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},lastms:{type:_0x1ebdx5.INTEGER(11),allowNull:true},host:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[19]},type:{type:_0x1ebdx5.ENUM(_0xc622[20],_0xc622[21],_0xc622[22]),allowNull:true,defaultValue:_0xc622[20]},context:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[23]},permit:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},deny:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},secret:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},md5secret:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},remotesecret:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},transport:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[24]},dtmfmode:{type:_0x1ebdx5.ENUM(_0xc622[25],_0xc622[26],_0xc622[27],_0xc622[28],_0xc622[29]),allowNull:true,defaultValue:_0xc622[25]},directmedia:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31],_0xc622[32],_0xc622[33]),allowNull:true,defaultValue:_0xc622[31]},nat:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[34]},callgroup:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},pickupgroup:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},language:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[35]},disallow:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[36]},allow:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[37]},insecure:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[38]},trustrpid:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[31]},progressinband:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31],_0xc622[39]),allowNull:true},promiscredir:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},useclientcode:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},accountcode:{type:_0x1ebdx5.INTEGER(11),allowNull:true},setvar:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},callerid:{type:_0x1ebdx5[_0xc622[6]],allowNull:true,defaultValue:_0xc622[40]},amaflags:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},callcounter:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[30]},busylevel:{type:_0x1ebdx5.INTEGER(11),allowNull:true},allowoverlap:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},allowsubscribe:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},videosupport:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},maxcallbitrate:{type:_0x1ebdx5.INTEGER(11),allowNull:true},rfc2833compensate:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},mailbox:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x74\x69\x6D\x65\x72\x73":{type:_0x1ebdx5.ENUM(_0xc622[41],_0xc622[42],_0xc622[43]),allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x65\x78\x70\x69\x72\x65\x73":{type:_0x1ebdx5.INTEGER(11),allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x6D\x69\x6E\x73\x65":{type:_0x1ebdx5.INTEGER(11),allowNull:true},"\x73\x65\x73\x73\x69\x6F\x6E\x2D\x72\x65\x66\x72\x65\x73\x68\x65\x72":{type:_0x1ebdx5.ENUM(_0xc622[44],_0xc622[45]),allowNull:true},t38pt_usertpsource:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},regexten:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},fromdomain:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},fromuser:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},qualify:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[30]},defaultip:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},rtptimeout:{type:_0x1ebdx5.INTEGER(11),allowNull:true},rtpholdtimeout:{type:_0x1ebdx5.INTEGER(11),allowNull:true},sendrpid:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[31]},outboundproxy:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},callbackextension:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},timert1:{type:_0x1ebdx5.INTEGER(11),allowNull:true},timerb:{type:_0x1ebdx5.INTEGER(11),allowNull:true},qualifyfreq:{type:_0x1ebdx5.INTEGER(11),allowNull:true},constantssrc:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},contactpermit:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},contactdeny:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},usereqphone:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[31]},textsupport:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},faxdetect:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},buggymwi:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},auth:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},fullname:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},trunkname:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},cid_number:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},callingpres:{type:_0x1ebdx5.ENUM(_0xc622[46],_0xc622[47],_0xc622[48],_0xc622[49],_0xc622[50],_0xc622[51],_0xc622[52],_0xc622[53]),allowNull:true},mohinterpret:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},mohsuggest:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},parkinglot:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},hasvoicemail:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},subscribemwi:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},vmexten:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},description:{type:_0x1ebdx5[_0xc622[6]],allowNull:true},autoframing:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},limitonpeers:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[30]},rtpkeepalive:{type:_0x1ebdx5.INTEGER(11),allowNull:true},"\x63\x61\x6C\x6C\x2D\x6C\x69\x6D\x69\x74":{type:_0x1ebdx5.INTEGER(11),allowNull:true,defaultValue:null},g726nonstandard:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},ignoresdpversion:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},allowtransfer:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},dynamic:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true},encryption:{type:_0x1ebdx5.ENUM(_0xc622[30],_0xc622[31]),allowNull:true,defaultValue:_0xc622[31]},registry:{type:_0x1ebdx5[_0xc622[6]],allowNull:true}},{tableName:_0xc622[54],defaultScope:{where:{role:_0xc622[55]}},instanceMethods:{authenticate:function(_0x1ebdxa){return this[_0xc622[13]](_0x1ebdxa)===this[_0xc622[12]]},makeSalt:function(){return crypto[_0xc622[57]](16).toString(_0xc622[56])},encryptPassword:function(_0x1ebdx8){if(!_0x1ebdx8||!this[_0xc622[10]]){return _0xc622[58]};var _0x1ebdxb= new Buffer(this[_0xc622[10]],_0xc622[56]);return crypto[_0xc622[59]](_0x1ebdx8,_0x1ebdxb,10000,64).toString(_0xc622[56])},md5Password:function(_0x1ebdx8){if(!_0x1ebdx8){return _0xc622[58]};return md5(_0x1ebdx8)}},associate:function(_0x1ebdxc){}});return _0x1ebdx6}