{"id":267450,"date":"2015-11-04T07:37:02","date_gmt":"2015-11-04T04:37:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=267450"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=267450","title":{"rendered":"Asterisk: \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043c VIP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0437\u0432\u043e\u043d\u043a\u043e\u0432, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0441\u0432\u044f\u0436\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f"},"content":{"rendered":"<p>       Asterisk \u2014 \u044d\u0442\u043e fun!<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u0441 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u044f \u0440\u0430\u0434\u0443\u044e\u0441\u044c, \u0440\u0430\u0434\u0443\u044e\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u0433\u043e\u043b\u043e\u0432\u043e\u0439 \u0432 \u044d\u0442\u043e \u0447\u0443\u0434\u0435\u0441\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u0442\u0432\u0430, \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b\u0441\u043b\u0438. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e \u0438 \u044d\u0442\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u043e.<br \/>  \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 <a href=\"http:\/\/thecall.ru\/our_projects\/\">\u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b<\/a> \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0430\u0436\u0434\u043e\u0439.<\/p>\n<p>  1. \u041e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 VIP-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0417\u0432\u043e\u043d\u043a\u0438 \u043e\u0442 VIP-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 Asterisk, \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p>  2. \u0421\u0432\u044f\u0437\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043e\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<br \/>  \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Asterisk \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u0435\u0433\u043e \u00ab\u043f\u0430\u043c\u044f\u0442\u0438\u00bb, \u043d\u0430 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u0440\u0438\u043d\u044f\u043b \u0432\u044b\u0437\u043e\u0432. \u041f\u043e\u0437\u0432\u043e\u043d\u0438\u043b \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441 \u043d\u043e\u043c\u0435\u0440\u0430 8913*75*5*0 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0410\u043b\u0451\u043d\u0430 \u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0443\u0442\u043e\u043a, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u0441 \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0410\u043b\u0451\u043d\u0430 \u0438 \u043d\u0438\u043a\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439.<br \/>  \u041d\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435, \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0410\u043b\u0435\u043d\u043e\u0439, \u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0443 * \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0443\u0436\u0435 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443.<\/p>\n<p>  \u0421 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e, \u043d\u0435\u043c\u043d\u043e\u0433\u043e Python, MySQL \u0438 \u0445\u0438\u0442\u0440\u043e\u0433\u043e dialplan \u0436\u0434\u0443\u0442 \u0432\u0430\u0441 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  <b>\u0421\u043f\u0438\u0441\u043e\u043a VIP-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/b><br \/>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0432 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0447\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0443\u0434\u0430 \u0434\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0447\u0442\u043e-\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u043e\u0435. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0441\u043f\u0443\u0441\u0442\u044f \u043f\u043e\u043b \u0447\u0430\u0441\u0430, \u0443 \u043c\u0435\u043d\u044f \u0443\u0436\u0435 \u0431\u044b\u043b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e\u0439 \u043d\u0430 php \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 MySQL \u2014 \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e.<br \/>  \u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c <a href=\"http:\/\/sourceforge.net\/projects\/php-addressbook\/\">PHP Address Book<\/a> \u0437\u0430 \u0438\u0445 \u0442\u0440\u0443\u0434.<br \/>  \u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043d\u0435 \u0441\u0442\u0430\u043d\u0443 \u2014 \u0432\u0441\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e \u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043c\u0430\u043d\u0443\u0430\u043b\u0435, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0432 \u0430\u0440\u0445\u0438\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2b9\/79c\/29b\/2b979c29b44342d987d467d1edbc76dc.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c Python-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0442 Asterisk CALLERID, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0411\u0414 \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u0432\u0448\u0435\u043c\u0443 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<br \/>  \u041a\u043e\u0434 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439:  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python #-*- coding: utf-8 -*- import MySQLdb,sys,re  def WhatKindOfNumber(WKONnumber):     if re.match(r'^[8]{1,1}[3]{1,1}[8]{1,1}4{1,1}[3]{1,1}(\\d{6,6})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 11 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 83843(8 + \u043a\u043e\u0434 \u0433\u043e\u0440\u043e\u0434\u0430 \u041d\u043e\u0432\u043e\u043a\u0443\u0437\u043d\u0435\u0446\u043a): &quot;         return WKONnumber[5:11],&quot;our-town&quot;      if re.match(r'^[3]{1,1}[8]{1,1}4{1,1}[3]{1,1}(\\d{6,6})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 10 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 3843(\u043a\u043e\u0434 \u0433\u043e\u0440\u043e\u0434\u0430 \u041d\u043e\u0432\u043e\u043a\u0443\u0437\u043d\u0435\u0446\u043a): &quot;         return WKONnumber[4:10],&quot;our-town&quot;      if re.match(r'^[3]{1,1}(\\d{6,6})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 7 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 3(\u0433\u043e\u0440\u043e\u0434 \u041d\u043e\u0432\u043e\u043a\u0443\u0437\u043d\u0435\u0446\u043a, \u0442\u043e\u043b\u044c\u043a\u043e 7 \u0446\u0438\u0444\u0440): &quot;         return WKONnumber[1:7],&quot;our-town&quot;      if re.match(r'^(\\d{6,6})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 6 \u0446\u0438\u0444\u0440: &quot;         return WKONnumber,&quot;our-town&quot;      if re.match(r'^\\+(\\d{11,11})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 11 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 +7: &quot;         return WKONnumber[2:12],&quot;mobile&quot;      if re.match(r'^[8]{1,1}[9]{1,1}(\\d{9,9})$', WKONnumber) or re.match(r'^[7]{1,1}[9]{1,1}(\\d{9,9})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 11 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 89 \u0438\u043b\u0438 79: &quot;         return WKONnumber[1:11],&quot;mobile&quot;      if re.match(r'^[9]{1,1}(\\d{9,9})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 10 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 9: &quot;         return WKONnumber,&quot;mobile&quot;      if re.match(r'^[8]{1,1}[^9]{1,1}(\\d{9,9})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 11 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 8, \u043d\u043e \u043d\u0435 \u0441\u043e\u0442\u043e\u0432\u044b\u0439: &quot;         return WKONnumber[1:11],&quot;another-town&quot;      if re.match(r'^[^9]{1,1}(\\d{9,9})$', WKONnumber):         #print &quot;\u0415\u0441\u043b\u0438 10 \u0446\u0438\u0444\u0440 \u0438 \u043d\u0435 \u0441\u043e\u0442\u043e\u0432\u044b\u0439: &quot;         return WKONnumber,&quot;another-town&quot;      #print &quot;\u0415\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439, \u0432\u0435\u0440\u043d\u0435\u043c \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438&quot;     return WKONnumber,&quot;default&quot;  def agi_command(cmd):     print cmd     sys.stdout.flush()     return sys.stdin.readline().strip()  def mysqlconnect(sql):     db=MySQLdb.connect(host=&quot;127.0.0.1&quot;,port=3306,user=&quot;asterisk_user&quot;,passwd=&quot;password&quot;,db=&quot;asterisk&quot;)     cursor = db.cursor()     cursor.execute(sql)     sql = &quot;&quot;&quot;SELECT FOUND_ROWS(); &quot;&quot;&quot;     cursor.execute(sql)     row = cursor.fetchone()     db.close()     return row[0]  def main():     number, typeofnumber = WhatKindOfNumber(sys.argv[1])      if typeofnumber == &quot;our-town&quot; or typeofnumber == &quot;default&quot;:         sql = &quot;&quot;&quot;select SQL_CALC_FOUND_ROWS * from addressbook where  mobile= '&quot;&quot;&quot; + number + &quot;&quot;&quot;' or home= '&quot;&quot;&quot; + number + &quot;&quot;&quot;' or  work= '&quot;&quot;&quot; + number +  &quot;&quot;&quot;' or fax='&quot;&quot;&quot; + number + &quot;&quot;&quot;' limit 1;&quot;&quot;&quot;      if typeofnumber == &quot;mobile&quot; or typeofnumber == &quot;another-town&quot;:         sql = &quot;&quot;&quot;select SQL_CALC_FOUND_ROWS * from addressbook where mobile like '%&quot;&quot;&quot; + number + &quot;&quot;&quot;' or home like '%&quot;&quot;&quot; + number + &quot;&quot;&quot;' or  work like '%&quot;&quot;&quot; + number +  &quot;&quot;&quot;' or fax like '%&quot;&quot;&quot; + number + &quot;&quot;&quot;' or  mobile like '&quot;&quot;&quot; + number + &quot;&quot;&quot;' or home like '&quot;&quot;&quot; + number + &quot;&quot;&quot;' or  work like '&quot;&quot;&quot; + number +  &quot;&quot;&quot;' or fax like '&quot;&quot;&quot; + number + &quot;&quot;&quot;' limit 1;&quot;&quot;&quot;      result = mysqlconnect(sql)     if result == 0:         response = agi_command(&quot;EXEC Set QUEUE_PRIO=5&quot;)          if result &gt; 0:         response = agi_command(&quot;EXEC Set QUEUE_PRIO=10&quot;)      sys.exit(0)  if __name__ == &quot;__main__&quot;:     main()  <\/code><\/pre>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 WhatKindOfNumber \u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0435\u0433\u043e \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043c\u043d\u0435 \u0432\u0438\u0434\u0443 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u0435\u0433\u043e \u0442\u0438\u043f. \u0414\u0430\u043b\u0435\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414 \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432 Asterisk&#8217;\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u2014 5 \u0435\u0441\u043b\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u043d\u0435\u0442 \u0438 10 \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c.<br \/>  \u0411\u041e\u043b\u044c\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 QUEUE_PRIO \u2014 \u0431\u041e\u043b\u044c\u0448\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442.<\/p>\n<p>  \u0414\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c AGI \u043f\u0435\u0440\u0435\u0434 Queue.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a(\u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u043d\u0430 ael \u2014 \u043d\u0435 \u043e\u0431\u0435\u0441\u0441\u0443\u0434\u044c\u0442\u0435):  <\/p>\n<pre><code class=\"html\">200601 =&gt; { \t&recording(${CALLERID(num)},${EXTEN});         Answer();         AGI(vip_or_not.py,${CALLERID(num)});         Queue(first_TD,tT,,,20);         Hangup();         } <\/code><\/pre>\n<p>  \u0421 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0432\u0441\u0435, \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <b>\u0421\u0432\u044f\u0437\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 &lt;-&gt; \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440(\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440).<\/b><br \/>  \u041f\u0440\u0438\u043c\u0435\u043c \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c Asterisk \u0438 MySQL \u0443\u0436\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u0430(\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <a href=\"http:\/\/blog.thecall.ru\/page\/asterisk-18-cdr-v-mysql-cdr_adaptive_odbc\">\u0442\u0443\u0442<\/a>).<\/p>\n<p>  \u0418\u0434\u0435\u043c \u0432 mysql \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c.  <\/p>\n<pre><code class=\"bash\">mysql&gt;use asterisk; mysql&gt; CREATE TABLE `numbers_remember` (   `id` int(9) unsigned NOT NULL auto_increment,   `number` varchar(80) NOT NULL default 'NULL', `date` varchar(80), `agent` varchar(120) NOT NULL default '',  PRIMARY KEY  (`id`), UNIQUE KEY `ix_phone` (`number`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=UTF8; mysql&gt; grant all on asterisk.* to 'asterisk_user'@'localhost' identified by 'password'; mysql&gt; flush privileges; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043d\u0435\u0441\u0435\u043c \u0432 func_odbc.conf \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0438\u0437 \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0430.  <\/p>\n<pre><code>[GET_DATA] dsn=asterisk readsql=SELECT agent, date, number FROM asterisk.numbers_remember WHERE number='${ARG1}' [SET_DATA] dsn=asterisk writesql=INSERT INTO asterisk.numbers_remember (number,date,agent) VALUES ('${SQL_ESC(${VAL1})}','${SQL_ESC(${VAL2})}', '${SQL_ESC(${VAL3})}') [UPDATE_TIME] dsn=asterisk writesql=UPDATE asterisk.numbers_remember SET date='${SQL_ESC(${VAL1})}' WHERE number='${SQL_ESC(${VAL2})}' [DELETE_DATA] dsn=asterisk writesql=DELETE FROM asterisk.numbers_remember WHERE number='${SQL_ESC(${VAL1})}' AND date='${SQL_ESC(${VAL2})}' <\/code><\/pre>\n<p>  \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d:  <\/p>\n<pre><code>globals {     TIMEOUT_OF_NUMBER=86400; \/\/ \u0442\u0430\u0439\u043c\u0430\u0443\u0442 \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 }; 1333 =&gt; { Set(__DYNAMIC_FEATURES=delete_number_by_client); \/\/&recording(${CALLERID(number)},${EXTEN}); \/\/Set(DB(clients\/number)=${CALLERID(num)}); Set(__CALLFROMNUM=${CALLERID(num)});  Set(ARRAY(AGENT,DATE,NUMBER)=${ODBC_GET_DATA(${CALLERID(num)})}); if(&quot;${NUMBER}&quot;!=&quot;&quot;) {     NoOp(== IF THE NUMBER ISN'T EQUAL &quot;NULL&quot;  ==);     Set(DATERESULT=${MATH(${EPOCH}-${DATE},i)});     if(${DATERESULT}&lt;${TIMEOUT_OF_NUMBER}) {         NoOp(== IF ${DATERESULT} &lt; ${TIMEOUT_OF_NUMBER} ==);         Set(_NUM_TO_DEL=${CALLERID(NUM)});         &recording(${CALLFROMNUM},${EXTEN});         Dial(SIP\/${AGENT},20,g);         if(&quot;${DIALSTATUS}&quot;!=&quot;ANSWER&quot;) {             &recording(${CALLFROMNUM},${EXTEN});             Queue(Novokuznetsk,cnF);             Set(AGENT=${CUT(MEMBERINTERFACE,\/,2)});             Set(ODBC_DELETE_DATA()=${NUMBER},${DATE});             Set(ODBC_SET_DATA()=${CALLFROMNUM},${EPOCH},${AGENT});             };         Set(ODBC_UPDATE_TIME()=${EPOCH},${NUMBER});};     if(${DATERESULT}&gt;${TIMEOUT_OF_NUMBER}) {             NoOp(== IF ${DATERESULT} &gt; ${TIMEOUT_OF_NUMBER}  ==);             Set(ODBC_DELETE_DATA()=${NUMBER},${DATE});             &recording(${CALLFROMNUM},${CALLFROMNUM});             Queue(Novokuznetsk,cnF);             Set(AGENT=${CUT(MEMBERINTERFACE,\/,2)});             Set(ODBC_SET_DATA()=${CALLFROMNUM},${EPOCH},${AGENT});             }; } else {         NoOp(== IF THE NUMBER DOESN'T EXIST IN DB ==);         &recording(${CALLFROMNUM},${EXTEN});         Queue(Novokuznetsk,cnF);         Set(AGENT=${CUT(MEMBERINTERFACE,\/,2)});         NoOp(${CALLFROMNUM},${EPOCH},${AGENT});         Set(ODBC_SET_DATA()=${CALLFROMNUM},${EPOCH},${AGENT});         };  HangUp();  }; <\/code><\/pre>\n<p>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0430 \u0442\u0430\u043a\u0430\u044f:<br \/>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438 \u0432 \u0431\u0430\u0437\u0435 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u0435\u043b \u0432\u044b\u0437\u043e\u0432.<br \/>  1. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0438\u0434\u0435\u043c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 else NoOp(== IF THE NUMBER DOESN&#8217;T EXIST IN DB ==); \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 AGENT \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0438\u0432\u0448\u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0418 \u0438\u043d\u0441\u0435\u0440\u0442\u0438\u043c \u0432 \u0411\u0414 \u2014 \u041d\u041e\u041c\u0415\u0420, \u0414\u0410\u0422\u0423 \u0432 UTC, \u0410\u0413\u0415\u041d\u0422\u0410.<\/p>\n<p>  2. \u0415\u0441\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 \u0432 \u0411\u0414 \u0435\u0441\u0442\u044c, \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u044f. \u0415\u0441\u043b\u0438 \u0434\u0430\u0442\u0430 \u0432 \u0411\u0414 \u043c\u0435\u043d\u0435\u0435 TIMEOUT_OF_NUMBER, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0437\u0432\u043e\u043d\u043e\u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0433\u0435\u043d\u0442\u0443 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0432\u0440\u0435\u043c\u044f, \u0435\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c.<\/p>\n<p>  *\u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 MEMBERINTERFACE \u043d\u0443\u0436\u043d\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u041a\u0410\u0416\u0414\u041e\u0419 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 setinterfacevar=yes<br \/>  \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"bash\">[general] persistentmembers = yes autofill = yes updatecdr=yes  [StandardQueue](!) setinterfacevar=yes music=default strategy=rrmemory timeout = 12 retry = 1 timeoutpriority = conf joinempty=yes leavewhenempty=no ringinuse=yes  [Novokuznetsk](StandardQueue) ... [Kemerovo](StandardQueue) ... [Mejdurechensk](StandardQueue) ... <\/code><\/pre>\n<p>  \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0411\u0414.<br \/>  \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 bash:  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin TIMEOUT_OF_NUMBER=`grep TIMEOUT_OF_NUMBER= \/etc\/asterisk\/extensions.ael| sed s\/[^0-9]\/\/g` CURRENT_DATE=`date +%s` THRESHOLD_DATE=$(($CURRENT_DATE-$TIMEOUT_OF_NUMBER)) mysql -e &quot;delete from numbers_remember where date&lt;$THRESHOLD_DATE;&quot; -uroot -p123 asterisk <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043a\u0440\u043e\u043d\u0443, \u0445\u043e\u0442\u044c \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 \u2014 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f TIMEOUT_OF_NUMBER<br \/>  \u0414\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u0432\u0448\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 features.conf \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443  <\/p>\n<pre><code>delete_number_by_client =&gt; *,peer,Macro,delnum<\/code><\/pre>\n<p>  \u0438 \u0442\u043e\u0433\u0434\u0430, \u0435\u0441\u043b\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u0436\u043c\u0435\u0442 *, \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u0432\u0437\u044f\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u2014 <a href=\"http:\/\/habrahabr.ru\/post\/204048\/\">habrahabr.ru\/post\/204048<\/a>,<br \/>  \u043d\u043e \u0442\u0430\u043c \u0430\u0432\u0442\u043e\u0440 \u0441\u043a\u0440\u043e\u043c\u043d\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043b \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u044e\u0430\u043d\u0441\u044b.<\/p>\n<p>  <b>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/b><br \/>  \u0423 \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0432\u043a\u0443\u0441\u0438\u0435 \u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, Asterisk \u2014 \u044d\u0442\u043e \u0446\u0435\u043b\u044b\u0439 \u043c\u0438\u0440 \u0438 \u043f\u043e\u0440\u043e\u0439 \u043e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u0432 \u043d\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f, \u0433\u043e\u043b\u043e\u0432\u0430 \u0438\u0434\u0435\u0442 \u043a\u0440\u0443\u0433\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435\u0435 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u043b\u0433\u043e \u043d\u0430\u0434 \u0447\u0435\u043c-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c, \u0441\u0443\u043c\u0435\u0435\u0448\u044c \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0435\u0449\u0435 \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0448\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u2014 \u0431\u0443\u0434\u0435\u0448\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.<br \/>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044f \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e, \u043b\u044e\u0431\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u0442\u0440\u0443\u0434, \u0443\u0434\u0430\u0447\u0438 \u0432\u0430\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445, \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447!               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/270125\/\"> http:\/\/habrahabr.ru\/post\/270125\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       Asterisk \u2014 \u044d\u0442\u043e fun!<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u0441 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u044f \u0440\u0430\u0434\u0443\u044e\u0441\u044c, \u0440\u0430\u0434\u0443\u044e\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u0433\u043e\u043b\u043e\u0432\u043e\u0439 \u0432 \u044d\u0442\u043e \u0447\u0443\u0434\u0435\u0441\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u0442\u0432\u0430, \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u044b\u0441\u043b\u0438. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e \u0438 \u044d\u0442\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u043e.<br \/>  \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 <a href=\"http:\/\/thecall.ru\/our_projects\/\">\u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b<\/a> \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0430\u0436\u0434\u043e\u0439.<\/p>\n<p>  1. \u041e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 VIP-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0417\u0432\u043e\u043d\u043a\u0438 \u043e\u0442 VIP-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 Asterisk, \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p>  2. \u0421\u0432\u044f\u0437\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043e\u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<br \/>  \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Asterisk \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u0435\u0433\u043e \u00ab\u043f\u0430\u043c\u044f\u0442\u0438\u00bb, \u043d\u0430 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u0440\u0438\u043d\u044f\u043b \u0432\u044b\u0437\u043e\u0432. \u041f\u043e\u0437\u0432\u043e\u043d\u0438\u043b \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441 \u043d\u043e\u043c\u0435\u0440\u0430 8913*75*5*0 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0410\u043b\u0451\u043d\u0430 \u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0443\u0442\u043e\u043a, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u0441 \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0410\u043b\u0451\u043d\u0430 \u0438 \u043d\u0438\u043a\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439.<br \/>  \u041d\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435, \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u0410\u043b\u0435\u043d\u043e\u0439, \u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0448\u0443 * \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0443\u0436\u0435 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443.<\/p>\n<p>  \u0421 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e, \u043d\u0435\u043c\u043d\u043e\u0433\u043e Python, MySQL \u0438 \u0445\u0438\u0442\u0440\u043e\u0433\u043e dialplan \u0436\u0434\u0443\u0442 \u0432\u0430\u0441 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-267450","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267450"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267450\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}