{"id":326106,"date":"2021-07-07T15:00:43","date_gmt":"2021-07-07T15:00:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326106"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326106","title":{"rendered":"REST hooks \u0434\u043b\u044f WebRTC Click to Call. \u041e\u043f\u044b\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/216\/8e6\/b6f\/2168e6b6fe95a33e0004537ed85a2121.jpg\" width=\"1240\" height=\"826\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 &#171;Click to Call&#187; \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u2014 \u044d\u0442\u043e &#171;\u0438\u043d\u043d\u043e\u0432\u0430\u0446\u0438\u044f&#187;, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u043e\u043a\u043e\u043b\u043e 10 \u043b\u0435\u0442. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0435\u0436\u043d\u0438\u043c &#8212; \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u0430\u0439\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f JavaScript, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u2014 WebRTC SIP \u0448\u043b\u044e\u0437\u043e\u043c. \u0414\u0430\u043b\u0435\u0435 \u043e\u0434\u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u043d\u043e\u0433\u0430 \u2014 \u044d\u0442\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440-\u0448\u043b\u044e\u0437, \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u043e\u0433\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0438 \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 SIP proxy \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0441  \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0438\u043b\u0438 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0441\u043c\u044b\u0441\u043b\u0435, \u0432 \u0441\u043e\u0444\u0442\u0444\u043e\u043d \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u043f\u0440\u0430\u0432\u043d\u044b\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c VoIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/674\/594\/43d\/67459443d5a7db7c54b4119eee062c5f.png\" width=\"405\" height=\"443\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b, \u0430 \u0442\u0430\u043a\u0438\u0445, \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e. \u041a\u0440\u043e\u043c\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0437\u0432\u043e\u043d\u043e\u043a \u0441 \u043a\u043d\u043e\u043f\u043a\u0438 &#171;Click to Call&#187; \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0437\u0432\u043e\u043d\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0430\u0448\u0435\u0439 \u0410\u0422\u0421, \u0442.\u0435. \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u043c\u0435\u0440\u0430 8-800, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f. <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/flashphoner.com\/onlajn-zvonok-s-sajta-na-mobilnye-telefony-i-sip-funkciya-click-to-call\/?lang=ru\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f<\/a> \u0442\u0430\u043a\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e &#8212; \u043a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0431\u0435\u0440\u0438, \u043a\u043e\u043f\u0438\u0440\u0443\u0439 \u0438 \u0440\u0430\u0434\u0443\u0439\u0441\u044f. \u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u041d\u041e! \u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432 JS \u043a\u043e\u0434\u0435 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u0448\u0435\u0433\u043e SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u043f\u0438\u043d\u0433\u0432\u0438\u043d\u0430\u043c \u0432 \u0410\u043d\u0442\u0430\u0440\u043a\u0442\u0438\u0434\u0443 \u0438 \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c &#171;\u0412\u043e\u0439\u043d\u0443 \u0438 \u041c\u0438\u0440&#187;.  \u0418 \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 &#171;Click to call&#187; \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0443\u0431\u044b\u0442\u043a\u0438. <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f Production \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0432\u043e\u043d\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c REST Hook \u0441\u043a\u0440\u0438\u043f\u0442\u044b.<\/p>\n<h3>\u041a\u0440\u044e\u0447\u043a\u0438? \u041a\u0430\u043a\u0438\u0435 \u0442\u0430\u043a\u0438\u0435 \u043a\u0440\u044e\u0447\u043a\u0438?<\/h3>\n<p>REST Hook \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 JSON \u0432 \u0442\u0435\u043b\u0435 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0434\u0430\u044e\u0442 JSON \u0432 \u0442\u0435\u043b\u0435 HTTP \u043e\u0442\u0432\u0435\u0442\u043e\u0432.  \u0421\u043a\u0440\u0438\u043f\u0442\u044b REST Hook \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f WCS API \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430\u0445, \u0437\u0432\u043e\u043d\u043a\u0430\u0445 \u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0430\u0445 \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. <\/p>\n<p>REST Hook \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0432 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0443 \u0438\u043b\u0438 \u043f\u043e \u043f\u0430\u0440\u043e\u043b\u044e<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430\u0445, \u0434\u0438\u0441\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430\u0445, \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0437\u0432\u043e\u043d\u043a\u043e\u0432, \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u0441\u043a\u0440\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433\u0430 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 WebSockets, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0435 \u0432\u0441\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 &#171;Click to Call&#187; \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 REST Hook.<\/p>\n<h3>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b? <\/h3>\n<ol start=\"0\">\n<li>\n<p>\u0424\u0440\u043e\u043d\u0442\u0435\u043d\u0434 Web \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 web \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 &#171;Click to Call&#187;.<\/p>\n<\/li>\n<li>\n<p>WCS \u2014 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 WebRTC \u043f\u043e\u0442\u043e\u043a \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430  \u0432 SIP \u0444\u043e\u0440\u043c\u0430\u0442. <\/p>\n<\/li>\n<li>\n<p>\u0411\u044d\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 Web \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 REST Hook.<\/p>\n<\/li>\n<li>\n<p>SIP \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d. <\/p>\n<\/li>\n<\/ol>\n<p>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434, \u0431\u044d\u043a\u0435\u043d\u0434 \u0438 WCS \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0440\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/075\/47c\/8bd\/07547c8bd30758c4072176b46f4a820d.png\" width=\"963\" height=\"483\"><figcaption><\/figcaption><\/figure>\n<h3>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c? <\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441 \u0431\u044d\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c Nginx \u0438 PHP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-configure-lemp-stack-software-collections-centos-7-ru\">Nginx \u043d\u0430 CentOS 7<\/a>.  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/nginx\/nginx.conf \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u00abserver\u00bb \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u042d\u0442\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e REST Hook \u0441\u043a\u0440\u0438\u043f\u0442\u0430  \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 &#171;\/connect&#187; \u0438 &#171;\/call&#187;:  <\/p>\n<pre><code>location \/ {   try_files $uri $uri\/ \/index.php?$request_uri;   }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5d9\/a2d\/705\/5d9a2d70558fea4c68c4422578fb5627.png\" width=\"646\" height=\"727\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432 web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0443 \u043d\u0430\u0441 \/var\/www ) \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u00abindex.php\u00bb, \u0432 \u043d\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e REST Hook. \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"php\">&lt;?php   $api_method = array_pop(explode(\"\/\", $_SERVER['REQUEST_URI'])); $incoming_data = json_decode(file_get_contents('php:\/\/input'), true); $domain = \"yourdomain.com\";   switch($api_method) {     case\"connect\":  \t$origin = $incoming_data['origin'];           \/\/logs     error_log(\"sessionId: \" . $incoming_data['sessionId']);     error_log(\"origin: \" . $origin);           $found = strpos($origin, $domain);       if ($found !== false){         error_log(\"User authorized by domain \" . $domain);     }else{         error_log(\"User not authorized by domain: \" . $domain . \" Connection failed with 403 status.\");         ubnormalResponse(403);     } \t \t$rest_client_config = json_decode(file_get_contents('rest_client_config.json'), true);      $incoming_data['restClientConfig'] = $rest_client_config;    \t$incoming_data['sipLogin'] = \"10001\";     $incoming_data['sipAuthenticationName'] = \"10001\";     $incoming_data['sipPassword'] = \"Password_123\";     $incoming_data['sipDomain'] = \"172.16.30.156\";     $incoming_data['sipOutboundProxy'] = \"172.16.30.156\";     $incoming_data['sipPort'] = \"5060\";     break; \tcase \"call\":     \/\/ Callee Number     $incoming_data['callee'] = \"10002\";     break; }  header('Content-Type: application\/json'); echo json_encode($incoming_data);  function ubnormalResponse($code) {     if ($code == 403) {     header('HTTP\/1.1 403 Forbidden', true, $code);     } else {     header(':', true, $code);     }     die(); } ?&gt;<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c48\/7c5\/cbc\/c487c5cbc62146ef5d2836bf43346bf8.png\" width=\"892\" height=\"795\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/var\/www \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u00abrest_client_config.json\u00bb. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 <a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241817\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/a>.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 \u00abrest_client_config.json\u00bb \u043f\u0440\u0430\u0432\u0438\u043c \u0441\u0435\u043a\u0446\u0438\u044e \u00abcall\u00bb . \u0417\u0434\u0435\u0441\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 REST \u043c\u0435\u0442\u043e\u0434\u0430 &#8212; \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"json\">\"call\" : {   \"clientExclude\" : \"\",   \"restExclude\" : \"\",   \"restOnError\" : \"LOG\",   \"restPolicy\" : \"OVERWRITE\",   \"restOverwrite\" : \"callee\"  },<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5e3\/da1\/283\/5e3da1283e7404295f98fe458301dcbd.png\" width=\"579\" height=\"477\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a WCS \u0441\u0435\u0440\u0432\u0435\u0440\u0443.  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 WCS. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241019\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>.  WCS \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 <a href=\"https:\/\/flashphoner.com\/podderzhka-oblachnyh-serverov-amazon-ec2-v-web-call-server\/?lang=ru\">Amazon,<\/a> <a href=\"https:\/\/flashphoner.com\/google-cloud-platform-dlya-webrtc-cdn-s-balansirovkoj-i-avtomaticheskim-masshtabirovaniem\/?lang=ru\">Google Cloud<\/a> \u0438 <a href=\"https:\/\/flashphoner.com\/podderzhka-web-call-server-v-digital-ocean-marketplace\/?lang=ru\">DigitalOcean<\/a>,  \u0438\u043b\u0438 \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 <a href=\"https:\/\/flashphoner.com\/podderzhka-web-call-server-v-docker\/?lang=ru\">Docker<\/a>.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 WCS \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 REST Hook \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \/connect \u0438 \/call \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b &#171;Curl&#187;:<\/p>\n<pre><code class=\"bash\">curl http:\/\/172.16.30.123\/connect curl http:\/\/172.16.30.123\/call<\/code><\/pre>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 172.16.30.123 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434  web \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/866\/163\/1a9\/8661631a9aadd19b31debd7345b071c7.png\" width=\"416\" height=\"100\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Curl \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f SIP \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u2014 \u0437\u043d\u0430\u0447\u0438\u0442 REST Hook \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. <\/p>\n<p> \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 <a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241140\">CLI WCS \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">ssh -p 2001 admin@localhost <\/code><\/pre>\n<p>\u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: admin<\/p>\n<p>\u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 &#171;\/connect&#187; \u0438 &#171;\/call&#187; \u043d\u0430 \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 REST Hook \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">update app -l http:\/\/172.16.30.123\/ defaultApp<\/code><\/pre>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 172.16.30.123 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434  web \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb8\/725\/cba\/eb8725cbaa5c171aa85f1b250d157b83.png\" width=\"527\" height=\"154\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 web \u0441\u0435\u0440\u0432\u0435\u0440\u0443. <\/p>\n<h3>\u0411\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430 \u0431\u043e\u0433\u0443 \u043a\u043e\u0434\u0430!<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435 \u0434\u0432\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 Click-to-Call-min.html \u0438 Click-to-Call-min.js. \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u00abClick to call\u00bb.<\/p>\n<p>HTML \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt; &nbsp;&nbsp;&nbsp; &lt;meta charset=\"utf-8\"&gt; &nbsp;&nbsp;&nbsp; &lt;script type=\"text\/javascript\" src=\"https:\/\/flashphoner.com\/downloads\/builds\/flashphoner_client\/wcs_api-2.0\/current\/flashphoner.js\"&gt;&lt;\/script&gt; &nbsp;&nbsp;&nbsp; &lt;script type=\"text\/javascript\" src=\"Click-to-Call-min.js\"&gt;&lt;\/script&gt; &lt;\/head&gt; &lt;body onload=\"init_page()\"&gt; \t&lt;input type=\"button\" id=\"callBtn\" type=\"button\" Value=\"Call\"\/&gt; &nbsp;&nbsp;&nbsp; &lt;div id=\"remoteAudio\"&gt;&lt;\/div&gt; &nbsp;&nbsp;&nbsp; &lt;div id=\"localAudio\"&gt;&lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>\u0418\u0437 <a href=\"https:\/\/flashphoner.com\/vnedrenie-v-veb-stranicu-funkcionala\/?lang=ru\">JS \u043a\u043e\u0434\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/a> \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<p>JS \u043a\u043e\u0434: <\/p>\n<pre><code class=\"javascript\">var SESSION_STATUS = Flashphoner.constants.SESSION_STATUS;  var CALL_STATUS = Flashphoner.constants.CALL_STATUS; var localAudio; var remoteAudio;  function init_page(){ \tFlashphoner.init({}); \tlocalAudio = document.getElementById(\"localAudio\");     remoteAudio = document.getElementById(\"remoteAudio\");     connect(); }  function connect() { \tvar url = \"wss:\/\/172.16.30.124:8443\"     var sipOptions = {         registerRequired: true     };     var connectionOptions = {         urlServer: url,         sipOptions: sipOptions     };     console.log(\"Create new session with url \" + url);     Flashphoner.createSession(connectionOptions).on(SESSION_STATUS.ESTABLISHED, function (session) {         console.log(SESSION_STATUS.ESTABLISHED);     }).on(SESSION_STATUS.REGISTERED, function (session) {         console.log(SESSION_STATUS.REGISTERED);     }); \tcallBtn.onclick = call }  \t function call(session) { \tvar constraints = {         audio: true,         video: false     }; \tvar session = Flashphoner.getSessions()[0];      var outCall = session.createCall({         remoteVideoDisplay: remoteAudio,         localVideoDisplay: localAudio,         constraints: constraints,         stripCodecs: \"SILK\" \t});     outCall.call(); \tcallBtn.value = \"Hangup\"; \tcallBtn.onclick = function () { \t\tcallBtn.value = \"Call\"; \t\toutCall.hangup(); \t\tconnect(); \t} }<\/code><\/pre>\n<h3>\u0410\u043b\u043b\u043e, \u0434\u0435\u0432\u0443\u0448\u043a\u0430, \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435<\/h3>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f: <\/p>\n<ol start=\"0\">\n<li>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0432\u044b\u0448\u0435 (\u0444\u0440\u043e\u043d\u0442e\u043d\u0434, WCS, \u0431\u044d\u043a\u0435\u043d\u0434);<\/p>\n<\/li>\n<li>\n<p>SIP \u0441\u0435\u0440\u0432\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0430 SIP \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 <\/p>\n<\/li>\n<li>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f SIP \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 10001 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 JS \u043a\u043e\u0434\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 &#171;Click to Call&#187; \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 REST Hook. \u041a\u043d\u043e\u043f\u043a\u0430 &#171;Click to Call&#187; \u0437\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 10002. \u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 10002 \u0432\u043d\u0435\u0441\u0435\u043c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d.<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 web \u0441\u0435\u0440\u0432\u0435\u0440\u0435  HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443  \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443  &#171;Call&#187;:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/665\/55e\/378\/66555e3785a27f5f4671f9c2f4d8af91.png\" width=\"762\" height=\"169\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c  \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0432\u043e\u043d\u043e\u043a \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043c\u0435\u043d \u0430\u0443\u0434\u0438\u043e \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/682\/a48\/1d1\/682a481d18657e1a4c3fb7c1f2248517.png\" width=\"1063\" height=\"444\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u043e\u0442 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432, \u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0430\u0448\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044e \u0432 \u0441\u0432\u043e\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430\u0445. <\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p><a href=\"https:\/\/demo.flashphoner.com\/admin\/login.html\">\u041d\u0430\u0448 \u0434\u0435\u043c\u043e \u0441\u0435\u0440\u0432\u0435\u0440<\/a><\/p>\n<p><a href=\"https:\/\/flashphoner.com\/onlajn-zvonok-s-sajta-na-mobilnye-telefony-i-sip-funkciya-click-to-call\/?lang=ru\">\u041e\u043d\u043b\u0430\u0439\u043d \u0437\u0432\u043e\u043d\u043e\u043a \u0441 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435<\/a><\/p>\n<p><a href=\"https:\/\/flashphoner.com\/brauzernyj-veb-telefon-s-podderzhkoj-protokola-sip\/?lang=ru\">Web-SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241061\">\u0424\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a flashphoner.properties<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/display\/WCS52RU\/REST+hooks\">REST hooks<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241019\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044e Web Call Server<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241702\">\u0417\u0432\u043e\u043d\u043e\u043a \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0447\u0435\u0440\u0435\u0437 SIP \u0441\u0435\u0440\u0432\u0435\u0440<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/display\/WEBSDK2RU\/Click+to+Call\">Web SDK Click to Call<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/display\/ANDROIDSDK11RU\/Android+Click+to+Call\">Android Click to Call<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/display\/IOSSDK2RU\/iOS+Click+to+Call\">iOS Click to Call<\/a><\/p>\n<\/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=\"https:\/\/habr.com\/ru\/company\/flashphoner\/blog\/566360\/\"> https:\/\/habr.com\/ru\/company\/flashphoner\/blog\/566360\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 &#171;Click to Call&#187; \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u2014 \u044d\u0442\u043e &#171;\u0438\u043d\u043d\u043e\u0432\u0430\u0446\u0438\u044f&#187;, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u043e\u043a\u043e\u043b\u043e 10 \u043b\u0435\u0442. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0435\u0436\u043d\u0438\u043c &#8212; \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u0430\u0439\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f JavaScript, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u2014 WebRTC SIP \u0448\u043b\u044e\u0437\u043e\u043c. \u0414\u0430\u043b\u0435\u0435 \u043e\u0434\u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u043d\u043e\u0433\u0430 \u2014 \u044d\u0442\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440-\u0448\u043b\u044e\u0437, \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u043e\u0433\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043b\u044c \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0438 \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 SIP proxy \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0441  \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0438\u043b\u0438 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f, \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0441\u043c\u044b\u0441\u043b\u0435, \u0432 \u0441\u043e\u0444\u0442\u0444\u043e\u043d \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u043f\u0440\u0430\u0432\u043d\u044b\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c VoIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u0438.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b, \u0430 \u0442\u0430\u043a\u0438\u0445, \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e. \u041a\u0440\u043e\u043c\u0435 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0437\u0432\u043e\u043d\u043e\u043a \u0441 \u043a\u043d\u043e\u043f\u043a\u0438 &#171;Click to Call&#187; \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0437\u0432\u043e\u043d\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0430\u0448\u0435\u0439 \u0410\u0422\u0421, \u0442.\u0435. \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u043c\u0435\u0440\u0430 8-800, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f. <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/flashphoner.com\/onlajn-zvonok-s-sajta-na-mobilnye-telefony-i-sip-funkciya-click-to-call\/?lang=ru\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f<\/a> \u0442\u0430\u043a\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e &#8212; \u043a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0431\u0435\u0440\u0438, \u043a\u043e\u043f\u0438\u0440\u0443\u0439 \u0438 \u0440\u0430\u0434\u0443\u0439\u0441\u044f. \u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u041d\u041e! \u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0432 JS \u043a\u043e\u0434\u0435 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u0448\u0435\u0433\u043e SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u043f\u0438\u043d\u0433\u0432\u0438\u043d\u0430\u043c \u0432 \u0410\u043d\u0442\u0430\u0440\u043a\u0442\u0438\u0434\u0443 \u0438 \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043c &#171;\u0412\u043e\u0439\u043d\u0443 \u0438 \u041c\u0438\u0440&#187;.  \u0418 \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 &#171;Click to call&#187; \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0443\u0431\u044b\u0442\u043a\u0438. <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f Production \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0432\u043e\u043d\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c REST Hook \u0441\u043a\u0440\u0438\u043f\u0442\u044b.<\/p>\n<h3>\u041a\u0440\u044e\u0447\u043a\u0438? \u041a\u0430\u043a\u0438\u0435 \u0442\u0430\u043a\u0438\u0435 \u043a\u0440\u044e\u0447\u043a\u0438?<\/h3>\n<p>REST Hook \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 JSON \u0432 \u0442\u0435\u043b\u0435 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043e\u0442\u0434\u0430\u044e\u0442 JSON \u0432 \u0442\u0435\u043b\u0435 HTTP \u043e\u0442\u0432\u0435\u0442\u043e\u0432.  \u0421\u043a\u0440\u0438\u043f\u0442\u044b REST Hook \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f WCS API \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430\u0445, \u0437\u0432\u043e\u043d\u043a\u0430\u0445 \u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0430\u0445 \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. <\/p>\n<p>REST Hook \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0432 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0443 \u0438\u043b\u0438 \u043f\u043e \u043f\u0430\u0440\u043e\u043b\u044e<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430\u0445, \u0434\u0438\u0441\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430\u0445, \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0437\u0432\u043e\u043d\u043a\u043e\u0432, \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u0441\u043a\u0440\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u043d\u0433\u0430 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 WebSockets, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0435 \u0432\u0441\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438 &#171;Click to Call&#187; \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 REST Hook.<\/p>\n<h3>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b? <\/h3>\n<ol start=\"0\">\n<li>\n<p>\u0424\u0440\u043e\u043d\u0442\u0435\u043d\u0434 Web \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 web \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 &#171;Click to Call&#187;.<\/p>\n<\/li>\n<li>\n<p>WCS \u2014 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 WebRTC \u043f\u043e\u0442\u043e\u043a \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430  \u0432 SIP \u0444\u043e\u0440\u043c\u0430\u0442. <\/p>\n<\/li>\n<li>\n<p>\u0411\u044d\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 Web \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 REST Hook.<\/p>\n<\/li>\n<li>\n<p>SIP \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d. <\/p>\n<\/li>\n<\/ol>\n<p>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434, \u0431\u044d\u043a\u0435\u043d\u0434 \u0438 WCS \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0440\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b. <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c? <\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441 \u0431\u044d\u043a\u0435\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c Nginx \u0438 PHP, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-configure-lemp-stack-software-collections-centos-7-ru\">Nginx \u043d\u0430 CentOS 7<\/a>.  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/nginx\/nginx.conf \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u00abserver\u00bb \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u042d\u0442\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e REST Hook \u0441\u043a\u0440\u0438\u043f\u0442\u0430  \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 &#171;\/connect&#187; \u0438 &#171;\/call&#187;:  <\/p>\n<pre><code>location \/ {   try_files $uri $uri\/ \/index.php?$request_uri;   }<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432 web \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0443 \u043d\u0430\u0441 \/var\/www ) \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u00abindex.php\u00bb, \u0432 \u043d\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e REST Hook. \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"php\">&lt;?php   $api_method = array_pop(explode(\"\/\", $_SERVER['REQUEST_URI'])); $incoming_data = json_decode(file_get_contents('php:\/\/input'), true); $domain = \"yourdomain.com\";   switch($api_method) {     case\"connect\":  \t$origin = $incoming_data['origin'];           \/\/logs     error_log(\"sessionId: \" . $incoming_data['sessionId']);     error_log(\"origin: \" . $origin);           $found = strpos($origin, $domain);       if ($found !== false){         error_log(\"User authorized by domain \" . $domain);     }else{         error_log(\"User not authorized by domain: \" . $domain . \" Connection failed with 403 status.\");         ubnormalResponse(403);     } \t \t$rest_client_config = json_decode(file_get_contents('rest_client_config.json'), true);      $incoming_data['restClientConfig'] = $rest_client_config;    \t$incoming_data['sipLogin'] = \"10001\";     $incoming_data['sipAuthenticationName'] = \"10001\";     $incoming_data['sipPassword'] = \"Password_123\";     $incoming_data['sipDomain'] = \"172.16.30.156\";     $incoming_data['sipOutboundProxy'] = \"172.16.30.156\";     $incoming_data['sipPort'] = \"5060\";     break; \tcase \"call\":     \/\/ Callee Number     $incoming_data['callee'] = \"10002\";     break; }  header('Content-Type: application\/json'); echo json_encode($incoming_data);  function ubnormalResponse($code) {     if ($code == 403) {     header('HTTP\/1.1 403 Forbidden', true, $code);     } else {     header(':', true, $code);     }     die(); } ?&gt;<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/var\/www \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u00abrest_client_config.json\u00bb. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 <a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241817\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/a>.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 \u00abrest_client_config.json\u00bb \u043f\u0440\u0430\u0432\u0438\u043c \u0441\u0435\u043a\u0446\u0438\u044e \u00abcall\u00bb . \u0417\u0434\u0435\u0441\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 REST \u043c\u0435\u0442\u043e\u0434\u0430 &#8212; \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/p>\n<pre><code class=\"json\">\"call\" : {   \"clientExclude\" : \"\",   \"restExclude\" : \"\",   \"restOnError\" : \"LOG\",   \"restPolicy\" : \"OVERWRITE\",   \"restOverwrite\" : \"callee\"  },<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a WCS \u0441\u0435\u0440\u0432\u0435\u0440\u0443.  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 WCS. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241019\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>.  WCS \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 <a href=\"https:\/\/flashphoner.com\/podderzhka-oblachnyh-serverov-amazon-ec2-v-web-call-server\/?lang=ru\">Amazon,<\/a> <a href=\"https:\/\/flashphoner.com\/google-cloud-platform-dlya-webrtc-cdn-s-balansirovkoj-i-avtomaticheskim-masshtabirovaniem\/?lang=ru\">Google Cloud<\/a> \u0438 <a href=\"https:\/\/flashphoner.com\/podderzhka-web-call-server-v-digital-ocean-marketplace\/?lang=ru\">DigitalOcean<\/a>,  \u0438\u043b\u0438 \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 <a href=\"https:\/\/flashphoner.com\/podderzhka-web-call-server-v-docker\/?lang=ru\">Docker<\/a>.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 WCS \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 REST Hook \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \/connect \u0438 \/call \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b &#171;Curl&#187;:<\/p>\n<pre><code class=\"bash\">curl http:\/\/172.16.30.123\/connect curl http:\/\/172.16.30.123\/call<\/code><\/pre>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 172.16.30.123 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434  web \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Curl \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f SIP \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u2014 \u0437\u043d\u0430\u0447\u0438\u0442 REST Hook \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. <\/p>\n<p> \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 <a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241140\">CLI WCS \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">ssh -p 2001 admin@localhost <\/code><\/pre>\n<p>\u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: admin<\/p>\n<p>\u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 &#171;\/connect&#187; \u0438 &#171;\/call&#187; \u043d\u0430 \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 REST Hook \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">update app -l http:\/\/172.16.30.123\/ defaultApp<\/code><\/pre>\n<p>\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 172.16.30.123 \u043d\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434  web \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 web \u0441\u0435\u0440\u0432\u0435\u0440\u0443. <\/p>\n<h3>\u0411\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430 \u0431\u043e\u0433\u0443 \u043a\u043e\u0434\u0430!<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435 \u0434\u0432\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 Click-to-Call-min.html \u0438 Click-to-Call-min.js. \u042d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u00abClick to call\u00bb.<\/p>\n<p>HTML \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt; &nbsp;&nbsp;&nbsp; &lt;meta charset=\"utf-8\"&gt; &nbsp;&nbsp;&nbsp; &lt;script type=\"text\/javascript\" src=\"https:\/\/flashphoner.com\/downloads\/builds\/flashphoner_client\/wcs_api-2.0\/current\/flashphoner.js\"&gt;&lt;\/script&gt; &nbsp;&nbsp;&nbsp; &lt;script type=\"text\/javascript\" src=\"Click-to-Call-min.js\"&gt;&lt;\/script&gt; &lt;\/head&gt; &lt;body onload=\"init_page()\"&gt; \t&lt;input type=\"button\" id=\"callBtn\" type=\"button\" Value=\"Call\"\/&gt; &nbsp;&nbsp;&nbsp; &lt;div id=\"remoteAudio\"&gt;&lt;\/div&gt; &nbsp;&nbsp;&nbsp; &lt;div id=\"localAudio\"&gt;&lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>\u0418\u0437 <a href=\"https:\/\/flashphoner.com\/vnedrenie-v-veb-stranicu-funkcionala\/?lang=ru\">JS \u043a\u043e\u0434\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/a> \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430. <\/p>\n<p>JS \u043a\u043e\u0434: <\/p>\n<pre><code class=\"javascript\">var SESSION_STATUS = Flashphoner.constants.SESSION_STATUS;  var CALL_STATUS = Flashphoner.constants.CALL_STATUS; var localAudio; var remoteAudio;  function init_page(){ \tFlashphoner.init({}); \tlocalAudio = document.getElementById(\"localAudio\");     remoteAudio = document.getElementById(\"remoteAudio\");     connect(); }  function connect() { \tvar url = \"wss:\/\/172.16.30.124:8443\"     var sipOptions = {         registerRequired: true     };     var connectionOptions = {         urlServer: url,         sipOptions: sipOptions     };     console.log(\"Create new session with url \" + url);     Flashphoner.createSession(connectionOptions).on(SESSION_STATUS.ESTABLISHED, function (session) {         console.log(SESSION_STATUS.ESTABLISHED);     }).on(SESSION_STATUS.REGISTERED, function (session) {         console.log(SESSION_STATUS.REGISTERED);     }); \tcallBtn.onclick = call }  \t function call(session) { \tvar constraints = {         audio: true,         video: false     }; \tvar session = Flashphoner.getSessions()[0];      var outCall = session.createCall({         remoteVideoDisplay: remoteAudio,         localVideoDisplay: localAudio,         constraints: constraints,         stripCodecs: \"SILK\" \t});     outCall.call(); \tcallBtn.value = \"Hangup\"; \tcallBtn.onclick = function () { \t\tcallBtn.value = \"Call\"; \t\toutCall.hangup(); \t\tconnect(); \t} }<\/code><\/pre>\n<h3>\u0410\u043b\u043b\u043e, \u0434\u0435\u0432\u0443\u0448\u043a\u0430, \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435<\/h3>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f: <\/p>\n<ol start=\"0\">\n<li>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0432\u044b\u0448\u0435 (\u0444\u0440\u043e\u043d\u0442e\u043d\u0434, WCS, \u0431\u044d\u043a\u0435\u043d\u0434);<\/p>\n<\/li>\n<li>\n<p>SIP \u0441\u0435\u0440\u0432\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0430 SIP \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 <\/p>\n<\/li>\n<li>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f SIP \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 10001 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 JS \u043a\u043e\u0434\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 &#171;Click to Call&#187; \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 REST Hook. \u041a\u043d\u043e\u043f\u043a\u0430 &#171;Click to Call&#187; \u0437\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 10002. \u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 10002 \u0432\u043d\u0435\u0441\u0435\u043c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d.<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 web \u0441\u0435\u0440\u0432\u0435\u0440\u0435  HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443  \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443  &#171;Call&#187;:  <\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c  \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0432\u043e\u043d\u043e\u043a \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043c\u0435\u043d \u0430\u0443\u0434\u0438\u043e \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 SIP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u043e\u0442 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432, \u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0430\u0448\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044e \u0432 \u0441\u0432\u043e\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430\u0445. <\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p><a href=\"https:\/\/demo.flashphoner.com\/admin\/login.html\">\u041d\u0430\u0448 \u0434\u0435\u043c\u043e \u0441\u0435\u0440\u0432\u0435\u0440<\/a><\/p>\n<p><a href=\"https:\/\/flashphoner.com\/onlajn-zvonok-s-sajta-na-mobilnye-telefony-i-sip-funkciya-click-to-call\/?lang=ru\">\u041e\u043d\u043b\u0430\u0439\u043d \u0437\u0432\u043e\u043d\u043e\u043a \u0441 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435<\/a><\/p>\n<p><a href=\"https:\/\/flashphoner.com\/brauzernyj-veb-telefon-s-podderzhkoj-protokola-sip\/?lang=ru\">Web-SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/a><\/p>\n<p><a href=\"https:\/\/docs.flashphoner.com\/pages\/viewpage.action?pageId=9241061\">\u0424\u0430\u0439\u043b<\/a><\/p>\n<\/div>\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-326106","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326106","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=326106"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326106\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}