{"id":263056,"date":"2015-08-06T16:32:02","date_gmt":"2015-08-06T12:32:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=263056"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=263056","title":{"rendered":"API \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0410\u0422\u0421 \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0438"},"content":{"rendered":"<p>     \t<img decoding=\"async\" src=\"https:\/\/zadarma.com\/images\/harbr\/2015_08_06\/api_hat.jpg\" alt=\"image\"\/>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442 Zadarma \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 API. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 IP-\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0438 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0410\u0422\u0421.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0447\u043d\u0443\u044e \u0410\u0422\u0421 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u043d\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 API, \u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0410\u0422\u0421 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<br \/>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b (\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b PHP-\u043a\u043b\u0430\u0441\u0441\u044b). \u041d\u0430\u043c \u043a\u0440\u0430\u0439\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0432\u0430\u0448\u0438 \u043e\u0442\u0437\u044b\u0432\u044b: \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 API, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 CRM \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 API:<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a SIP-\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\/\u0441\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438 \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a SIM-\u043a\u0430\u0440\u0442\u0435);<\/li>\n<li>\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 (\u043a\u0430\u043a SIP, \u0442\u0430\u043a \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0410\u0422\u0421);<\/li>\n<li>\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0432\u043e\u043d\u043a\u043e\u0432 (\u0444\u0443\u043d\u043a\u0446\u0438\u044f CallBack \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430);<\/li>\n<li>\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 SMS-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (\u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0420\u0424);<\/li>\n<li>\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c \u0437\u0432\u043e\u043d\u043a\u0435 \u0432 \u0410\u0422\u0421, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u0432\u043e\u043d\u043a\u043e\u0432 \u0432\u0430\u0448\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043a\u0443\u0449\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u043b\u044f \u043b\u0435\u0433\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c CRM, Call tracking \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445. \u041c\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u0439 \u043f\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 API \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445, \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043b\u044e\u0431\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438.<br \/>  \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430 <a href=\"https:\/\/zadarma.com\/ru\/support\/api\/\">\u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<h3>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438 \u043a\u043b\u0430\u0441\u0441\u044b:<\/h3>\n<p>  \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 PHP \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API, \u0435\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/zadarma\/user-api-v1\">Github<\/a>. \u0422\u0430\u043c-\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<br \/>  \u041a\u0440\u043e\u043c\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0434 PHP \u0438 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 Windows.<\/p>\n<h3>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Zadarma. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b <a href=\"https:\/\/zadarma.com\/ru\/services\/pbx\/\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0410\u0422\u0421<\/a>\/<a href=\"https:\/\/zadarma.com\/ru\/tariffs\/numbers\/\">\u043d\u043e\u043c\u0435\u0440\u0430<\/a>\/<a href=\"https:\/\/zadarma.com\/ru\/tariffs\/roaming-sim\/\">SIM-\u043a\u0430\u0440\u0442\u044b<\/a>, \u0442\u043e \u0438\u0445 \u0442\u0430\u043a\u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c. <br \/>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 <a href=\"https:\/\/ss.zadarma.com\/api\/\">\u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435<\/a>.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c, \u0432\u0438\u0434\u0430:<br \/>  &quot;<b>Authorization: \u043a\u043b\u044e\u0447_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: \u043f\u043e\u0434\u043f\u0438\u0441\u044c&quot;<\/b><br \/>  \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443:  <\/p>\n<ul>\n<li> \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (GET, POST, PUT, DELETE) \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043a\u043b\u044e\u0447\u0430 \u043f\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0443;<\/li>\n<li> \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0443\u043d\u043a\u0446\u0438\u044f http_build_query \u0432 PHP), \u043f\u0440\u0438\u043c\u0435\u0440 \u201cfrom=DATEFROM&#038;to=DATETO\u2026\u201d;<\/li>\n<li> \u0438 \u0434\u0430\u043b\u0435\u0435 \u2014 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/li>\n<li> \u0441\u0442\u0440\u043e\u043a\u0430 = \u0438\u043c\u044f_\u043c\u0435\u0442\u043e\u0434\u0430 + \u0441\u0442\u0440\u043e\u043a\u0430_\u0437\u0430\u043f\u0440\u043e\u0441\u0430 + md5( \u0441\u0442\u0440\u043e\u043a\u0430_\u0437\u0430\u043f\u0440\u043e\u0441\u0430 ),<\/li>\n<li> \u0433\u0434\u0435 \u201c\u0438\u043c\u044f_\u043c\u0435\u0442\u043e\u0434\u0430\u201d \u2014 \u0441\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0434\u043e\u043c\u0435\u043d\u0430 (\u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u0410\u041f\u0418), \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \/v1\/sip\/&quot;<\/li>\n<li> \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u0435\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 sha1 \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/li>\n<li> \u0445\u0435\u0448 = hash( \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439_\u043a\u043b\u044e\u0447 )<\/li>\n<li> \u0438 \u0434\u0430\u043b\u0435\u0435 \u0445\u0435\u0448 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 base64<\/li>\n<li> \u043f\u043e\u0434\u043f\u0438\u0441\u044c = base64_encode( \u0445\u0435\u0448 )<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 PHP:  <\/p>\n<pre><code class=\"php\">ksort($params); $paramsStr = http_build_query($params); $sign = base64_encode(hash_hmac('sha1', $method . $paramsStr . md5($paramsStr), $secret));  $header = 'Authorization: ' . $userKey . ':' . $sign;  <\/code><\/pre>\n<h3> \u0424\u043e\u0440\u043c\u0430\u0442 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u0424\u043e\u0440\u043c\u0430\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u0430: json (\u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0438 xml.<br \/>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0410\u041f\u0418 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 xml, \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u00abformat=xml\u00bb.<br \/>  \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043b\u0438\u043c\u0438\u0442\u0430\u0445 \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"xml\">X-Zadarma-Method: \/v1\/ X-RateLimit-Reset: 1434371160 X-RateLimit-Limit: 100 X-RateLimit-Remaining: 99  <\/code><\/pre>\n<p>\u0433\u0434\u0435,  <\/p>\n<ul>\n<li>X-Zadarma-Method \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434;<\/li>\n<li>X-RateLimit-Remaining \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043b\u0438\u043c\u0438\u0442\u0430 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u0438 \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/li>\n<li>X-RateLimit-Limit \u2014 \u0446\u0438\u0444\u0440\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u043b\u0438\u043c\u0438\u0442\u0430 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443;<\/li>\n<li>X-RateLimit-Reset \u2014 \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u043b\u0438\u043c\u0438\u0442\u0430.<\/li>\n<\/ul>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u0434\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 429 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c \u00abYou exceeded the rate limit\u00bb.<br \/>  \u041e\u0442\u0432\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u00abstatus\u00bb (success \u0438\u043b\u0438 error). \u0414\u0430\u043b\u0435\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0435\u0442\u043e\u0434\u0430, \u043e\u0442\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u0432\u043e\u0438 \u043a\u043b\u044e\u0447\u0438 \u0441 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<br \/>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043e\u0442\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u00abmessage\u00bb \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0437\u0432\u043e\u043d\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 API<\/h3>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c CallBack (\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Callback <a href=\"https:\/\/zadarma.com\/ru\/services\/calls\/callback\/\">\u0437\u0434\u0435\u0441\u044c<\/a>).<br \/>  \u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b:  <\/p>\n<ol>\n<li>\u041e\u0442 \u0432\u0430\u0441 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 API \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 Zadarma<\/li>\n<li>\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0432\u043e\u043d\u043e\u043a \u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u00ab\u0414\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u0437\u0432\u043e\u043d\u043a\u0430\u00bb<\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0432\u0430\u043c \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430<\/li>\n<li>\u041a\u043e\u0433\u0434\u0430 \u0430\u0431\u043e\u043d\u0435\u043d\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043d\u0430 \u0437\u0432\u043e\u043d\u043e\u043a \u2014 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f.<\/li>\n<\/ol>\n<p>  <img decoding=\"async\" src=\"https:\/\/zadarma.com\/images\/harbr\/2015_08_06\/001_ru.jpg\" alt=\"CallBackZadarma\"\/><br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043a\u0430\u043a \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u00ab\u0432\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u00bb, \u0442\u0430\u043a \u0438 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u00ab\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0432\u043e\u043d\u0438\u0442\u0435\u00bb \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0448 SIP-\u043b\u043e\u0433\u0438\u043d \u043b\u0438\u0431\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0410\u0422\u0421. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u0441 \u043e\u0444\u0438\u0441\u043d\u044b\u0445 IP-\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432\/\u0448\u043b\u044e\u0437\u043e\u0432\/\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c SIP \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438.<br \/>  \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430: <b>\/v1\/request\/callback\/<\/b><br \/>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:  <\/p>\n<ul>\n<li>from \u2013 \u0432\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438\u043b\u0438 SIP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f callback;<\/li>\n<li>to \u2013 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438\u043b\u0438 SIP, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0437\u0432\u043e\u043d\u044f\u0442;<\/li>\n<li>sip (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) \u2013 \u043d\u043e\u043c\u0435\u0440 SIP-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d \u0445\u043e\u0447\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 CallerID, \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430 \u044d\u0442\u0438\u043c SIP-\u043e\u043c;<\/li>\n<li>predicted (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) \u2013 \u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u044d\u0442\u043e\u0442 \u0444\u043b\u0430\u0433, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0438\u0432\u043d\u044b\u043c (\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u201cto\u201d \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0435\u043c\u0443 \u0434\u043e\u0437\u0432\u0430\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c SIP \u043b\u0438\u0431\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c);<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:<br \/>  <b>JSON<\/b>  <\/p>\n<pre><code class=\"javascript\">{     &quot;status&quot;:&quot;success&quot;,     &quot;from&quot;: 442037691880,     &quot;to&quot;: 442037691881,     &quot;time&quot;: 1435573082 } <\/code><\/pre>\n<p><b>XML<\/b>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot;?&gt; &lt;answer&gt;     &lt;status&gt;success&lt;\/status&gt;     &lt;from&gt;442037691880&lt;\/from&gt;     &lt;to&gt;442037691881&lt;\/to&gt;     &lt;time&gt;1435573082&lt;\/time&gt; &lt;\/answer&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 <b>PHP<\/b> \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c Zadarma:  <\/p>\n<pre><code class=\"php\">&lt;?php include_once 'include.php'; $params = array(     'from' =&gt; '442037691880',     'to' =&gt; '442037691881', \/\/    'sip' =&gt; 'YOURSIP' ); $zd = new \\Zadarma_API\\Client(KEY, SECRET); $answer = $zd-&gt;call('\/v1\/request\/callback\/', $params); $answerObject = json_decode($answer); if ($answerObject-&gt;status == 'success') {     print_r($answerObject); } else {     echo $answerObject-&gt;message; } <\/code><\/pre>\n<h4>\u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0446\u0435\u043d\u0442\u0440\u043e\u0432<\/h4>\n<p>  \u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0446\u0435\u043d\u0442\u0440\u043e\u0432 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0432\u043e\u043d\u0438\u0442 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u201cto\u201d \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0435\u043c\u0443 \u0434\u043e\u0437\u0432\u0430\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c SIP \u043b\u0438\u0431\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c. <br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u043a\u0443\u0434\u0430 \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043b\u043b\u0446\u0435\u043d\u0442\u0440\u0430, \u0441 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438 \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e \u043d\u0430\u0431\u0438\u0440\u0430\u043b\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0438 \u0436\u0434\u0430\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0442\u0435\u0440\u044f\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u0432\u0440\u0435\u043c\u044f). <br \/>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u0432\u043e\u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0438\u0437 \u043a\u043e\u043b\u043b\u0446\u0435\u043d\u0442\u0440\u0430:  <\/p>\n<ul>\n<li>\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 callback \u0432 API<\/li>\n<li>\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 from \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u0432\u0430\u0448\u0435\u0439 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0410\u0422\u0421, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438 \u043a\u043e\u043b\u043b\u0446\u0435\u043d\u0442\u0440\u0430, \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u043b\u0430\u0433 predicted<\/li>\n<li>\u0433\u043e\u0442\u043e\u0432\u043e! \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0430\u043c\u0430 \u043e\u0431\u0437\u0432\u043e\u043d\u0438\u0442 \u0432\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u043e\u0437\u044c\u043c\u0435\u0442\u0438 \u0442\u0440\u0443\u0431\u043a\u0443 \u043a \u0432\u0430\u0448\u0438\u043c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0432\u043e\u043d\u043e\u043a \u0438 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440. \u0417\u0430\u043c\u0435\u0442\u043d\u0430\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432.<\/li>\n<\/ul>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u0437\u0432\u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0432 \u043d\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432.<\/p>\n<h3>\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c \u0437\u0432\u043e\u043d\u043a\u0435<\/h3>\n<p>  \u0421\u0438\u0441\u0442\u0435\u043c\u0430 Zadarma \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c \u0437\u0432\u043e\u043d\u043a\u0435 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0410\u0422\u0421 \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0432\u043e\u043d\u043e\u043a \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u0434\u043b\u044f \u0432\u0441\u0435\u043e\u0431\u0449\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441\u0441\u044b\u043b\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Zadarma.<br \/>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u0441\u0441\u044b\u043b\u043a\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 PHP:  <\/p>\n<pre><code class=\"php\">&lt;?php if (isset($_GET['zd_echo'])) exit($_GET['zd_echo']); ?&gt; <\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 callback-\u0441\u0441\u044b\u043b\u043a\u0443:  <\/p>\n<ul>\n<li>caller_id \u2014 \u043d\u043e\u043c\u0435\u0440 \u0437\u0432\u043e\u043d\u044f\u0449\u0435\u0433\u043e;<\/li>\n<li>called_did \u2013 \u043d\u043e\u043c\u0435\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u043b\u0438;<\/li>\n<li>callstart \u2013 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0432\u043e\u043d\u043a\u0430<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0437\u0432\u043e\u043d\u043a\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"php\">{     &quot;redirect&quot;: ID,     &quot;caller_name&quot;: NAME } <\/code><\/pre>\n<p>\u0433\u0434\u0435,  <\/p>\n<ul>\n<li>redirect \u2013 id \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0410\u0422\u0421, \u0438\u043b\u0438 \u00abblacklist\u00bb \u2014 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0432\u043e\u043d\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d \u0441 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u043e;<\/li>\n<li>caller_name \u2013 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c\u0443 \u043d\u043e\u043c\u0435\u0440\u0443.<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u043d\u0430 PHP:  <\/p>\n<pre><code class=\"php\">&lt;?php if (isset($_GET['zd_echo'])) exit($_GET['zd_echo']); if ($_POST) {     $callerId = $_POST['caller_id']; \/\/ number of calling party;     $calledDid = $_POST['called_did']; \/\/ number of called party;     $callstart = $_POST['callstart']; \/\/ start time of call     \/*     \/\/ For each request you can easily change work scenario for current call by sending in response on information:     echo json_encode(array(         'redirect' =&gt; 1,         'caller_name' =&gt; 'TestName'     ));     exit();     *\/ } <\/code><\/pre>\n<p>  <\/p>\n<h3> \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API:<\/h3>\n<p>  <b>\/v1\/info\/balance\/ <\/b> \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<br \/>  <b>\/v1\/info\/price\/<\/b> \u2014 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u0430 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<br \/>  <b>\/v1\/request\/callback\/ <\/b> \u2014 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 callback (\u043e\u043f\u0438\u0441\u0430\u043d \u0432\u044b\u0448\u0435);<br \/>  <b>\/v1\/sip\/<\/b> \u2014 \u0441\u043f\u0438\u0441\u043e\u043a SIP-\u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<br \/>  <b>\/v1\/sip\/callerid\/<\/b> \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 CallerID (\u0438\u0437 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u043d\u044b\u0445 \u043b\u0438\u0431\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432);<br \/>  <b>\/v1\/sip\/redirection\/<\/b> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0439 \u043f\u043e SIP-\u043d\u043e\u043c\u0435\u0440\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438;<br \/>  <b>\/v1\/sms\/send\/<\/b> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 SMS;<br \/>  <b>\/v1\/statistics\/<\/b> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438;<br \/>  <b>\/v1\/statistics\/pbx\/<\/b> \u2014 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0410\u0422\u0421.<\/p>\n<p>  \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0415\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 API \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.     \t<\/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\/264279\/\"> http:\/\/habrahabr.ru\/post\/264279\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t<img decoding=\"async\" src=\"https:\/\/zadarma.com\/images\/harbr\/2015_08_06\/api_hat.jpg\" alt=\"image\"\/>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442 Zadarma \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 API. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 IP-\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0438 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0410\u0422\u0421.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0447\u043d\u0443\u044e \u0410\u0422\u0421 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u043d\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 API, \u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0410\u0422\u0421 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<br \/>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b (\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b PHP-\u043a\u043b\u0430\u0441\u0441\u044b). \u041d\u0430\u043c \u043a\u0440\u0430\u0439\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0432\u0430\u0448\u0438 \u043e\u0442\u0437\u044b\u0432\u044b: \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 API, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 CRM \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.<\/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-263056","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/263056","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=263056"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/263056\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=263056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=263056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=263056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}