{"id":166235,"date":"2013-01-18T17:54:03","date_gmt":"2013-01-18T13:54:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=166235"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=166235","title":{"rendered":"<span class=\"post_title\">YATE \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 jabber \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b1f\/b19\/97e\/b1fb1997e2d168830356f3c87798d0ae.png\"\/><\/p>\n<p>  YATE \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041e\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 SIP-T, \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u043c H323-SIP \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u041e\u041a\u0421-7 (SS7). \u0418 \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e\u0434 GPL. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041d\u043e \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0434\u0440\u0443\u0433\u043e\u043c. <s>\u041a\u0440\u043e\u043b\u0438\u043a\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0445, \u043d\u043e \u0438<\/s> Yate \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0442\u0430\u043a\u0436\u0435 jabber \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u0447\u0442\u043e Yate \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 <a href=\"http:\/\/xmpp.org\/xmpp-software\/servers\/\">xmpp.org\/xmpp-software\/servers\/<\/a>, \u0445\u043e\u0442\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 jabber \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432 \u043d\u0435\u043c \u0435\u0449\u0435 \u0432 2010 \u0433\u043e\u0434\u0443.<\/p>\n<p>  \u0422\u0440\u0443\u0434\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Yate \u0434\u043b\u044f \u0434\u0436\u0430\u0431\u0431\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c ejabberd, Openfire, Prosody \u0438 Tigase. \u042d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u0438. \u042f \u0445\u043e\u0447\u0443 \u043b\u0438\u0448\u044c \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0441 \u0441 \u0435\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 cut. (\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u043c\u043d\u043e\u0433\u043e \u0431\u0443\u043a\u0432!) \u0417\u0430\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0432 Active Directory. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0411\u0443\u0434\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f <a href=\"http:\/\/docs.yate.ro\/wiki\/Compiling_and_installing_Yate_from_SVN\">\u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e<\/a>. \u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439.<\/p>\n<p>  \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b jabber \u0441\u0435\u0440\u0432\u0435\u0440\u0430: \u0434\u043e\u043c\u0435\u043d, \u0441\u043b\u0443\u0448\u0430\u044e\u0449\u0438\u0435 \u0441\u043e\u043a\u0435\u0442\u044b, \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u043c digest \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e (\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 AD).   <\/p>\n<blockquote><p>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041e\u043f\u0446\u0438\u044f c2s_plainauthonly \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 svn, \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 4.3 \u0435\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p><\/blockquote>\n<p>  jabberserver.conf  <\/p>\n<pre><code class=\"bash\">[general] domains=mydomain.org c2s_plainauthonly=yes; force text password for LDAP auth  [listener s2s] enable=yes type=s2s port=5269  [listener c2s] enable=yes type=c2s port=5222 <\/code><\/pre>\n<p>  Yate \u0443\u043c\u0435\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 StartTLS \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0436 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u043d\u0443\u0436\u043d\u043e SSL \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c openssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043e\u043f\u0446\u0438\u0438 \u00abdomains\u00bb \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 SSL \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<br \/>  openssl.conf  <\/p>\n<pre><code class=\"bash\">[yate] certificate=yate.pem domains=mydomain.org <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<br \/>  register.conf  <\/p>\n<pre><code class=\"bash\">[general] user.auth=yes user.register=yes user.unregister=yes engine.timer=yes  [default] account=yate  [user.auth] query=SELECT password FROM users WHERE username='${username}' AND password IS NOT NULL AND password&lt;&gt;'' result=password  [user.register] query=UPDATE users SET location='${data}', expires=CURRENT_TIMESTAMP + INTERVAL ${expires}+300 second WHERE username='${username}'  [user.unregister] query=UPDATE users SET location=NULL,expires=NULL WHERE expires IS NOT NULL AND username='${username}'  [engine.timer] query=UPDATE users SET location=NULL,expires=NULL WHERE expires IS NOT NULL AND expires&lt;=CURRENT_TIMESTAMP <\/code><\/pre>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f MySQL. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 Postgres.  <\/p>\n<pre><code class=\"sql\">CREATE TABLE `offlinechat` (   `username` varchar(100) DEFAULT NULL,   `xml` text,   `time` int(11) NOT NULL,   KEY `username` (`username`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;  CREATE TABLE `roster` (   `username` varchar(100) DEFAULT NULL,   `contact` varchar(100) DEFAULT NULL,   `name` varchar(100) DEFAULT NULL,   `groups` varchar(100) DEFAULT NULL,   `subscription` varchar(100) DEFAULT NULL,   UNIQUE KEY `uc` (`username`,`contact`),   KEY `username` (`username`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;  CREATE TABLE `users` (   `username` varchar(100) NOT NULL DEFAULT '',   `password` varchar(100) DEFAULT NULL,   `vcard` text,   `location` varchar(100) DEFAULT NULL,   `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,   PRIMARY KEY (`username`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<br \/>  mysqldb.conf  <\/p>\n<pre><code class=\"bash\">[yate] database=yate user=yate password=yatepass <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e vcard \u0438 \u043e\u0444\u0444\u043b\u0430\u0439\u043d \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<br \/>  jbfeatures.conf  <\/p>\n<pre><code class=\"bash\">[general] account=yate  [vcard] get=SELECT vcard FROM users WHERE username='${username}' set=UPDATE users SET vcard='${vcard}' WHERE username='${username}'  [offline_chat] get=SELECT * FROM offlinechat WHERE username='${username}' ORDER BY time add=INSERT INTO offlinechat (username,xml,time) VALUES ('${username}', '${xml}', ${time}) clear_user=DELETE FROM offlinechat WHERE username='${username}' <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0440\u043e\u0441\u0442\u0435\u0440<br \/>  subscription.conf  <\/p>\n<pre><code class=\"bash\">[general] account=yate  user_roster_load=SELECT users.username, roster.* FROM users LEFT OUTER JOIN roster ON users.username=roster.username WHERE users.username='${username}' user_roster_delete=DELETE FROM roster WHERE username='${username}' contact_load=SELECT * FROM roster WHERE username='${username}' AND contact='${contact}' contact_subscription_set=INSERT roster (username,contact,subscription) VALUES ('${username}','${contact}','${subscription}') ON DUPLICATE KEY UPDATE subscription='${subscription}' contact_set=INSERT roster (username,contact,name,groups) VALUES ('${username}','${contact}','${name}','${groups}') ON DUPLICATE KEY UPDATE name='${name}',groups='${groups}' contact_set_full=INSERT roster (username,contact,name,groups,subscription) VALUES ('${username}','${contact}','${name}','${groups}','${subscription}') ON DUPLICATE KEY UPDATE name='${name}',groups='${groups}',subscription='${subscription}' contact_delete=DELETE FROM roster WHERE username='${username}' AND contact='${contact}' <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044e SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c, \u043d\u043e \u0437\u0430\u0442\u043e \u0434\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 Active Directory<br \/>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043c register.conf, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u0430 \u0432\u043e\u0442 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0430\u0441\u044c!).  <\/p>\n<pre><code class=\"bash\">[user.register] query=INSERT users (username,location,expires) VALUES ('${username}','${data}',CURRENT_TIMESTAMP + INTERVAL ${expires}+300 second) ON DUPLICATE KEY UPDATE  location='${data}', expires=CURRENT_TIMESTAMP + INTERVAL ${expires}+300 second <\/code><\/pre>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e Yate \u043c\u0430\u0433\u0438\u0438. \u042f\u0434\u0440\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 Engine \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b\u043c\u0438 \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 (\u043d\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439). \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 PHP, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435. \u041d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 jabber.php \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 user.auth (\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e), \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e, \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a AD. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 = 40, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 50 \u0438 \u0432\u044b\u0448\u0435, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c.<br \/>  extmodule.conf  <\/p>\n<pre><code class=\"bash\">[general] scripts_dir=\/etc\/yate\/  [scripts] jabber.php= <\/code><\/pre>\n<p>  \u0421\u0430\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u00ablibyate.php\u00bb, \u0432\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Yate, \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0432 \u043e\u0434\u0438\u043d \u0441 \u043d\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433. \u0415\u0441\u043b\u0438 \u0434\u043e\u043c\u0435\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \/etc\/openldap\/ldap.conf \u0441\u0442\u0440\u043e\u043a\u0443   <\/p>\n<pre><code class=\"bash\">TLS_REQCERT never  <\/code><\/pre>\n<p>  jabber.php  <\/p>\n<pre><code class=\"php\">#!\/usr\/bin\/php -q &lt;?php require_once(&quot;libyate.php&quot;); $ad_host = 'ldaps:\/\/dc.mydomain.org'; $ad_domain = 'mydomain.org';  \/* Always the first action to do *\/ Yate::Init();  \/* Install a handler for the call routing message *\/ Yate::Install(&quot;user.auth&quot;,40);  function ad_auth($user, $password) {         global $ad_host, $ad_domain;         $con = ldap_connect($ad_host);         return ldap_bind($con, &quot;$user@$ad_domain&quot;, $password) & true; } \/* The main loop. We pick events and handle them *\/ for (;;) {     $ev=Yate::GetEvent();     \/* If Yate disconnected us then exit cleanly *\/     if ($ev === false)         break;     \/* Empty events are normal in non-blocking operation.        This is an opportunity to do idle tasks and check timers *\/     if ($ev === true) { \/\/        Yate::Output(&quot;PHP event: empty&quot;);         continue;     }     \/* If we reached here we should have a valid object *\/     switch ($ev-&gt;type) {         case &quot;incoming&quot;:             switch ($ev-&gt;name) {                 case &quot;user.auth&quot;:                     if (!isset($ev-&gt;params[&quot;digest-uri&quot;])) {                         $username = $ev-&gt;params[&quot;username&quot;];                         $username = substr($username,0,strpos($username,'@'));                         $password = isset($ev-&gt;params[&quot;response&quot;]) ? $ev-&gt;params[&quot;response&quot;] : $ev-&gt;params[&quot;password&quot;];                         $auth = ad_auth($username, $password);                         if ($auth) {                             $ev-&gt;retval = $password;                             $ev-&gt;handled = true;                         }                     }                     break;             }             $ev-&gt;Acknowledge();             break;         case &quot;installed&quot;:             Yate::Output(&quot;PHP Installed: &quot; . $ev-&gt;name);             break;         case &quot;uninstalled&quot;:             Yate::Output(&quot;PHP Uninstalled: &quot; . $ev-&gt;name);             break;         default:             Yate::Output(&quot;PHP Event: &quot; . $ev-&gt;type);     } }  Yate::Output(&quot;PHP: bye!&quot;); \/* vi: set ts=8 sw=4 sts=4 noet: *\/ ?&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 Paul Chitescu, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Yate, \u2014 must be ready.<\/p>\n<p>  \u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0443 \u043c\u0435\u043d\u044f \u0434\u0432\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438, \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0438 \u043f\u043b\u043e\u0445\u0430\u044f:  <\/p>\n<ul>\n<li>\u0425\u043e\u0440\u043e\u0448\u0430\u044f: YATE \u0443\u043c\u0435\u0435\u0442 jingle (\u0433\u043e\u043b\u043e\u0441), \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0432\u0430\u0448\u0435\u0433\u043e jabber \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0433\u0443\u0442 \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Psi). \u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0432\u0441\u0435 \u0433\u043b\u0430\u0434\u043a\u043e, \u043d\u043e \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0438\u0448\u0443 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0437\u0436\u0435. (\u0420\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043e \u0441\u043e\u0432\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 jabber \u0438 jingle \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e).<\/li>\n<li>\u041f\u043b\u043e\u0445\u0430\u044f: YATE \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 MUC (Multi User Chat).<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0438\u043b\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0437\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.    \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\/166235\/\"> http:\/\/habrahabr.ru\/post\/166235\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b1f\/b19\/97e\/b1fb1997e2d168830356f3c87798d0ae.png\"\/><\/p>\n<p>  YATE \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u041e\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 SIP-T, \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u043c H323-SIP \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u041e\u041a\u0421-7 (SS7). \u0418 \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e\u0434 GPL. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041d\u043e \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0434\u0440\u0443\u0433\u043e\u043c. <s>\u041a\u0440\u043e\u043b\u0438\u043a\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0445, \u043d\u043e \u0438<\/s> Yate \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0442\u0430\u043a\u0436\u0435 jabber \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u0447\u0442\u043e Yate \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 <a href=\"http:\/\/xmpp.org\/xmpp-software\/servers\/\">xmpp.org\/xmpp-software\/servers\/<\/a>, \u0445\u043e\u0442\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 jabber \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432 \u043d\u0435\u043c \u0435\u0449\u0435 \u0432 2010 \u0433\u043e\u0434\u0443.<\/p>\n<p>  \u0422\u0440\u0443\u0434\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Yate \u0434\u043b\u044f \u0434\u0436\u0430\u0431\u0431\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c ejabberd, Openfire, Prosody \u0438 Tigase. \u042d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u2014 \u0437\u0430 \u0440\u0430\u043c\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u0438. \u042f \u0445\u043e\u0447\u0443 \u043b\u0438\u0448\u044c \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0441 \u0441 \u0435\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 cut. (\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u043c\u043d\u043e\u0433\u043e \u0431\u0443\u043a\u0432!) \u0417\u0430\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0432 Active Directory.   <\/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-166235","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/166235","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=166235"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/166235\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}