{"id":170315,"date":"2013-02-28T15:56:04","date_gmt":"2013-02-28T11:56:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=170315"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=170315","title":{"rendered":"<span class=\"post_title\">Click2Call \u043d\u0430 Mac OS X<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/77f\/be7\/b19\/77fbe7b192d987961f21d2dfa63a971f.png\"\/><\/p>\n<p>  \u0415\u0449\u0435 \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043d\u0430\u0448\u0435\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 Asterisk-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043d\u0430 \u0441\u0442\u043e\u043b\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u0438\u0436\u0443 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430 \u043d\u0435 \u043d\u0430\u0431\u0438\u0440\u0430\u044f \u0438\u0445 \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0435. \u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0430 \u0441\u0432\u044f\u0437\u043a\u0435 Mac OS X + Asterisk. <\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u044b \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e SIP-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>  \u041d\u043e \u043b\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0447\u0438\u043d \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438\u043d\u0430\u0447\u0435:   <\/p>\n<ol>\n<li>\u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u0441\u0438\u043b\u044c\u043d\u0430 \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443 \u0434\u0435\u0440\u0436\u0430 \u0442\u0440\u0443\u0431\u043a\u0443 \u0432 \u0440\u0443\u043a\u0435 (\u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0433\u0440\u043e\u043c\u043a\u0443\u044e \u0441\u0432\u044f\u0437\u044c;<\/li>\n<li>\u0431\u044b\u043b \u043e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0438 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u044b, \u043d\u043e \u043d\u0435 \u043f\u0440\u0438\u0436\u0438\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043d\u0435\u0443\u0432\u044f\u0437\u043e\u043a;<\/li>\n<li>\u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0444\u0438\u0447\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0430 \u043d\u0430 SIP-\u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0438 \u0442\u043e\u0433\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0441 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 \u043d\u0435 \u0432 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043f\u0440\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u0445, \u0430 \u0432 \u043a\u043e\u0440\u0438\u0434\u043e\u0440\u0435 \u0438\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u043c\u0441\u044f \u0437\u0430 \u0441\u0442\u0435\u043d\u043e\u0439 \u043a\u0430\u0444\u0435 (\u0434\u0430\u0436\u0435 bluetooth \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 \u0432 \u044d\u0442\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442).   <\/li>\n<\/ol>\n<h4>\u0422\u0435\u043e\u0440\u0438\u044f<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 Asterisk \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 Click2Call \u041f\u041e, \u043d\u043e \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0431\u0443\u0434\u0443\u0447\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0442\u0435\u043c\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:  <\/p>\n<ul>\n<li>\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440 \u0437\u0432\u043e\u043d\u043a\u0430 \u2014 Mac OS X 10.8.2<\/li>\n<li>\u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u2014 Apache + PHP<\/li>\n<li>SIP \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 Asterisk 1.6.2<\/li>\n<li>SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u2014 Yealink VP-2009<\/li>\n<\/ul>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u0446\u0438\u0438 \u0437\u0432\u043e\u043d\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432  <\/p>\n<ol>\n<li>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 url \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440<\/li>\n<li>php \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0443 Asterisk \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0437\u0432\u043e\u043d\u043e\u043a<\/li>\n<li>Asterisk \u0437\u0432\u043e\u043d\u0438\u0442 \u043d\u0430 SIP \u043d\u043e\u043c\u0435\u0440 \u043c\u043e\u0435\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430<\/li>\n<\/ol>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043a\u0430\u0437\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0437\u0432\u043e\u043d\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u0439\u0442, \u0442\u043e \u0432 \u0441\u0445\u0435\u043c\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 PHP. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u043d \u0435\u0449\u0435 \u0438 \u043f\u043e \u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u0447\u0442\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u044f \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 PHP \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0432\u043e\u0435\u0433\u043e Mac \u0438, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0435\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0443 Asterisk \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b 3\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u0446\u0438\u0438 \u0437\u0432\u043e\u043d\u043a\u0430 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0430 \u043d\u0435 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<h4>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/h4>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0441\u0435\u0445 \u0442\u0440\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0431\u0443\u0434\u0443 \u0438\u0437\u043b\u0430\u0433\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435: Asterisk, WEB, Mac OS. <\/p>\n<h5>1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Asterisk<\/h5>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043e\u0442 Asterisk \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0410 \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0411. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u044f \u0444\u0430\u0439\u043b \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \/var\/spool\/asterisk\/outgoing \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Asterisk \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 Asterisk.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c  <\/p>\n<pre><code class=\"bash\">Channel: Local\/7777 MaxRetries: 1 RetryTime: 60 WaitTime: 30 Context: default Extension: +79201234567 Priority: 1 <\/code><\/pre>\n<p>  \u0412\u0430\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 Context, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Asterisk \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>  \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c, \u0430 \u0431\u043e\u0435\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0433\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 Asterisk<\/p>\n<p>  manager.conf  <\/p>\n<pre><code class=\"bash\">[general] enabled = yes webenabled = yes port = 5038  [asterisk] secret=mysecretpassword deny=0.0.0.0 permit=A.B.C.0                       ; \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0432\u0435\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0430 read=system,call,log,verbose,command,agent,user,originate write=system,call,log,verbose,command,agent,user,originate <\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432 \u043c\u0435\u0436\u0441\u0435\u0442\u0435\u0432\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u0440\u0442\u0443 5038 \u0434\u043b\u044f \u0432\u0435\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h5>2. \u0413\u043e\u0442\u043e\u0432\u0438\u043c web<\/h5>\n<p>  \u041d\u0430 \u0432\u0435\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c php-\u0441\u043a\u0440\u0438\u043f\u0442  <\/p>\n<pre><code class=\"php\">&lt;?php $receiver = str_replace(array(&quot; &quot;,&quot;(&quot;, &quot;)&quot;, &quot;-&quot;, &quot;.&quot;), &quot;&quot;, $receiver);  switch (strlen($receiver)) {     case 0:         exit;     break;      case 6:         $receiver=&quot;84722&quot;.$receiver;     break;      case 10:         $receiver=&quot;8&quot;.$receiver;     break; }  \/\/ IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 Asterisk $sys_ip = &quot;1.2.3.4&quot;;  \/\/ \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 $User_str = &quot;asterisk&quot;; \/\/ ... \u0438 \u0435\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c $Secret_str = &quot;mysecretpassword&quot;; $our_exten = &quot;Local\/$sender&quot;;  $WaitTime = &quot;10&quot;; $domain = &quot;127.0.0.1&quot;; \/\/ \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u0432 sip-\u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0435\u0441\u043b\u0438 \u0437\u0432\u043e\u043d\u043e\u043a \u043f\u043e\u0439\u0434\u0451\u0442 \u043a\u0443\u0434\u0430-\u043b\u0438\u0431\u043e \u043d\u0430 SIP\/xxx $strCustdata = &quot;Call to &quot;.($name!=&quot;&quot;?$name:$receiver);  $oSocket = fsockopen ($sys_ip, 5038, $errnum, $errdesc) or die (&quot;Connection to host failed&quot;); sleep (1);  fputs ($oSocket, &quot;Action: login\\r\\n&quot;); fputs ($oSocket, &quot;Username: $User_str\\r\\n&quot;); fputs ($oSocket, &quot;Secret: $Secret_str\\r\\n\\r\\n&quot;);  $wrets = fgets ($oSocket,128);  echo $wrets;  fputs ($oSocket, &quot;Events: off\\r\\n\\r\\n&quot;); fputs ($oSocket, &quot;Action: originate\\r\\n&quot;); fputs ($oSocket, &quot;Channel: $our_exten\\r\\n&quot;); fputs ($oSocket, &quot;WaitTime: $WaitTime\\r\\n&quot;); fputs ($oSocket, &quot;CallerId: $strCustdata\\r\\n&quot;); fputs ($oSocket, &quot;Exten: $receiver\\r\\n&quot;); fputs ($oSocket, &quot;Context: default\\r\\n&quot;); fputs ($oSocket, &quot;Async: yes\\r\\n&quot;); fputs ($oSocket, &quot;Priority: 1\\r\\n\\r\\n&quot;); fputs ($oSocket, &quot;Action: Logoff\\r\\n\\r\\n&quot;); sleep (2);  fclose ($oSocket); ?&gt; <\/code><\/pre>\n<p>  \u0412\u0430\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u0440\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u0430, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f Channel, Exten \u0438 Context.<\/p>\n<h5>3. \u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440 \u0437\u0432\u043e\u043d\u043a\u043e\u0432<\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0432 Apple Script Editor \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 ~\/Library\/Address Book Plug-Ins\/ \u0441\u043a\u0440\u0438\u043f\u0442  <\/p>\n<pre><code class=\"bash\">using terms from application &quot;Contacts&quot; \t \ton action property \t\treturn &quot;phone&quot; \tend action property \t \ton action title for p with e \t\treturn &quot;Dial from Yealink&quot; \tend action title \t \ton should enable action for p with e \t\tif value of e is missing value then \t\t\treturn false \t\telse \t\t\treturn true \t\tend if \tend should enable action \t \ton perform action for p with e \t\tset theName to name of p \t\tset telephone to the value of e \t\ttell application &quot;Terminal&quot; \t\t\tset param to &quot;`echo \\&quot;&lt;?php echo 'http:\/\/webserver\/click2call\/call.php?sender=7777&receiver='.urlencode('&quot; & telephone & &quot;').'&name='.urlencode('&quot; & theName & &quot;')?&gt;\\&quot; | php`&quot; \t\t\tdo shell script &quot;\/opt\/local\/bin\/wget -q -O - &quot; & param & &quot; &gt;\/dev\/null 2&gt;&1 & sleep 1&quot; \t\t\tquit saving no \t\tend tell \tend perform action \t end using terms from <\/code><\/pre>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 URL, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 wget \u0438 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 PHP \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f UTF8 \u0441\u0442\u0440\u043e\u043a \u0432 URL. \u0412\u0441\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 AppleScript \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043e\u0431\u044a\u0451\u043c\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c Terminal.app \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0434\u0435\u0442\u0441\u044f \u0443\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Contacts \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u043c \u043c\u0435\u043d\u044e \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0443\u043d\u043a\u0442 \u00abDial from Yealink\u00bb. \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u043e\u043a \u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Contacts \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u043e\u043a.<\/p>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e Services \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0447\u0435\u0440\u0435\u0437 Automator. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u043b\u043e\u043a Run Shell Script, \u0432\u0432\u043e\u0434\u0438\u043c \u0441\u0430\u043c \u0441\u043a\u0440\u0438\u043f\u0442  <\/p>\n<pre><code class=\"bash\">\/opt\/local\/bin\/wget -q -O - &quot;http:\/\/webserver\/click2call\/call.php?sender=7777&receiver=$1&quot; &gt; \/dev\/null 2&gt;&1 <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u043d\u0435 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u0432\u043e\u0434.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/aa0\/5d6\/31a\/aa05d631aa5731c0a842867628e2c214.png\"\/><\/p>\n<h4>\u0418\u0442\u043e\u0433.<\/h4>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0441\u043e \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0433\u043e SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u043e\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d17\/35f\/883\/d1735f8830304cbfd38dfc2cae40e530.png\"\/><\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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\/170315\/\"> http:\/\/habrahabr.ru\/post\/170315\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/77f\/be7\/b19\/77fbe7b192d987961f21d2dfa63a971f.png\"\/><\/p>\n<p>  \u0415\u0449\u0435 \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043d\u0430\u0448\u0435\u0439 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 Asterisk-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443 \u043c\u0435\u043d\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043d\u0430 \u0441\u0442\u043e\u043b\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u0438\u0436\u0443 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430 \u043d\u0435 \u043d\u0430\u0431\u0438\u0440\u0430\u044f \u0438\u0445 \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0435. \u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0430 \u0441\u0432\u044f\u0437\u043a\u0435 Mac OS X + Asterisk. <\/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-170315","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/170315","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=170315"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/170315\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=170315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=170315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=170315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}