{"id":412,"date":"2012-08-29T08:17:04","date_gmt":"2012-08-29T06:17:04","guid":{"rendered":"http:\/\/bos-info.com\/?p=412"},"modified":"2016-09-04T07:01:25","modified_gmt":"2016-09-04T05:01:25","slug":"mysqlasterisk","status":"publish","type":"post","link":"https:\/\/bos-info.com\/?p=412","title":{"rendered":"MySQL+Asterisk"},"content":{"rendered":"<p>\u0413\u0440\u043e\u0437\u044b \u043d\u0435 \u0443\u0445\u043e\u0434\u044f\u0442, \u0434\u043e\u043c\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0431\u044b\u0432\u0430\u044e)  \u041d\u0430\u0447\u043d\u0443 \u043e \u0441\u0432\u044f\u0437\u043a\u0435 MySQL+Asterisk \u0447\u0435\u0440\u0435\u0437 ODBC \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043a \u043a\u043e\u043d\u0446\u0443 \u043d\u0435\u0434\u0435\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0443.<br \/>\n\u041d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b)<br \/>\n\u0414\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 MySQL \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0431\u0435\u0437 ODBC.<br \/>\n\u0414\u043b\u044f \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f.<br \/>\n0. \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u0430\u044f \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>\n1. \u0410\u0441\u0442\u0435\u0440\u0438\u0441\u043a \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0441 unixODBC<br \/>\n2. mysql-connector-odbc<br \/>\n\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440 \u043a \u0412\u0430\u0448\u0435\u0439 \u0411\u0414, \u0431\u0443\u0434\u044c \u0442\u043e \u043f\u043e\u0441\u0442\u0433\u0440\u0435\u0441 \u0438\u043b\u0438 \u0444\u0430\u0435\u0440\u0431\u0435\u0440\u0434)<br \/>\n\u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u043e \u043f\u0440\u043e\u0448\u0443<br \/>\n<!--more--><br \/>\n\u0412\u044b\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u0437 \u0412\u0438\u043a\u0438, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c:<br \/>\n<code><br \/>\n\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 1990 \u0433. \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u043e\u0432 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u043b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b Microsoft \u0438 \u0440\u044f\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u042d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0431\u044b\u043b \u043d\u0430\u0437\u0432\u0430\u043d Open Database Connectivity, \u0438\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445(ODBC).<br \/>\n<\/code><br \/>\n\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u0437\u0443<\/p>\n<pre>\r\nCREATE DATABASE asterisk;\r\nGRANT ALL ON asterisk.* TO adminnn@localhost IDENTIFIED BY &#039;adminnn&#039;; FLUSH PRIVILEGES;\r\nSET PASSWORD FOR &#039;adminnn&#039;@&#039;localhost&#039;=PASSWORD(&#039;adminnn123&#039;);\r\n<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043c\u044b unixODBC \u0438\u043b\u0438 \u043d\u0435\u0442<\/p>\n<pre>\r\n#pkg_info | grep unixODBC\r\nunixODBC-2.3.1      ODBC library suite for Unix\r\n<\/pre>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440 \u043a \u043c\u0443\u0441\u043a\u0443\u043b\u044e<\/p>\n<pre>\r\ncd \/usr\/ports\/databases\/mysql-connector-odbc\/\r\n<\/pre>\n<p>\u0412\u0441\u0442\u0430\u043b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre>\r\n#pkg_info | grep mysql-connector\r\nmysql-connector-odbc-unixodbc-mysql55-5.1.9 ODBC driver for MySQL55 \/ unixodbc\r\n<\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u0434\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c:<\/p>\n<pre>\r\n# odbcinst -j\r\nunixODBC 2.3.1\r\nDRIVERS............: \/usr\/local\/etc\/odbcinst.ini\r\nSYSTEM DATA SOURCES: \/usr\/local\/etc\/odbc.ini\r\nFILE DATA SOURCES..: \/usr\/local\/etc\/ODBCDataSources\r\nUSER DATA SOURCES..: \/root\/.odbc.ini\r\nSQLULEN Size.......: 4\r\nSQLLEN Size........: 4\r\nSQLSETPOSIROW Size.: 2\r\n<\/pre>\n<p>\u041f\u0440\u0430\u0432\u0438\u043c \/usr\/local\/etc\/odbcinst.ini \u0434\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/p>\n<pre>\r\n[MySQL]\r\nDescription=ODBC for MySQL\r\nDriver=\/usr\/local\/lib\/libmyodbc5.so\r\nUsageCount=20002\r\n<\/pre>\n<p>\u0421 \u0432\u0435\u0440\u0441\u0438\u0438 1.6 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433 <strong> Threading = 2<\/strong>.<br \/>\n<strong>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 13.8<\/strong> \u0410\u0441\u0442\u0435\u0440\u0438\u0441\u043a\u0430  \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0443\u043b\u0438\u043d\u0433 \u0432 \u0441\u0430\u043c\u043e\u043c odbc<br \/>\n\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443(\u0422\u041e\u041b\u042c\u041a\u041e \u0414\u041b\u042f \u041e\u0422\u041b\u0410\u0414\u041a\u0418!!)<br \/>\n<code><br \/>\n[ODBC]<br \/>\nTrace       = No<br \/>\nTrace File      = \/tmp\/sql.log<br \/>\nPooling = Yes<br \/>\n<\/code><br \/>\n\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440:<\/p>\n<pre>\r\nodbcinst -i -d -f \/usr\/local\/etc\/odbcinst.ini\r\n<\/pre>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0440\u0435\u043c\u0430\u0440\u043a\u0430 \u043f\u043e \u0445\u043e\u0434\u0443 \u043f\u044c\u0435\u0441\u044b \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 odbcinst<br \/>\n<code><br \/>\nodbcinst -i -d -f template_file<br \/>\n-i install<br \/>\n-d driver<br \/>\n-f name of template file<br \/>\n<\/code><br \/>\n\u041f\u0440\u0430\u0432\u0438\u043c \/usr\/local\/etc\/odbc.ini<br \/>\n\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438)<br \/>\n<code><br \/>\n[asterisk]<br \/>\nDriver=MySQL<br \/>\nSERVER=localhost<br \/>\nPORT=3306<br \/>\nDATABASE=asterisk<br \/>\nUSER=adminnn<br \/>\nPASSWORD=adminnn123<br \/>\nCHARSET = utf8<br \/>\nreadtimeout = 2<br \/>\n<\/code><br \/>\n\u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u043a\u043e\u0437\u044f\u0431\u0440, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c CHARSET = utf8,<br \/>\n\u0430 \u0435\u0449\u0435 readtimeout &#8211; \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 lock \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0430<br \/>\n\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u043f\u0446\u0438\u0438 \u0442\u0440\u0430\u0441\u0438\u0440\u043e\u0432\u043a\u0438,<br \/>\n\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre>\r\n odbcinst -s -q\r\n[asterisk]\r\n<\/pre>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440\u0430<\/p>\n<pre>\r\necho &quot;select 1&quot; | isql -v asterisk\r\n+---------------------------------------+\r\n| Connected!                            |\r\n|                                       |\r\n| sql-statement                         |\r\n| help [tablename]                      |\r\n| quit                                  |\r\n|                                       |\r\n+---------------------------------------+\r\nSQL&gt; select 1\r\n+---------------------+\r\n| 1                   |\r\n+---------------------+\r\n| 1                   |\r\n+---------------------+\r\nSQLRowCount returns 1\r\n1 rows fetched\r\n<\/pre>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043c\u0438\u0441\u0441\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0430\u043c\u043e\u0433\u043e Asterisk\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0432\u044f\u0437\u0438 \u0410\u0441\u0442\u0435\u0440\u0438\u0441\u043a\u0430 \u0438 ODBC \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b res_odbc.conf<br \/>\n<code><br \/>\n[asterisk]<br \/>\nenabled => yes<br \/>\ndsn => asterisk<br \/>\nusername => adminnn<br \/>\npassword => adminnn123<br \/>\npre-connect => yes<br \/>\nconnect_timeout => 2<br \/>\nsanitysql => select 1<br \/>\n<\/code><\/p>\n<p>[asterisk] \u0438\u043c\u044f \u044d\u0442\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445.<br \/>\npooling \u0438 limit \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f MSSQL \u0438 Sybase \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0434\u043e \u043b\u0438\u043c\u0438\u0442\u0430<br \/>\n!!&#8211;\u041d\u0415 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c limit => 0   \u0438\u043d\u0430\u0447\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433)<br \/>\nenable \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u0441\u044e \u0441\u0435\u043a\u0446\u0438\u044e, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0435\u0435 \u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0442\u044c<br \/>\ndsn (data source name) \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \/usr\/local\/etc\/odbc.ini<br \/>\nusername \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0434 \u043a\u0430\u043a\u0438\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0411\u0414<br \/>\npassword \u043f\u0430\u0440\u043e\u043b\u044c \u043a \u0431\u0430\u0437\u0435<br \/>\npre-connect \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b \u043a \u0431\u0430\u0437\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f<br \/>\nconnect_timeout &#8211; \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0434\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0431\u0430\u0437\u044b<br \/>\nsanitysql &#8211; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0431\u0430\u0437\u044b<br \/>\n<strong>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 13.8<\/strong><br \/>\n\u041f\u0443\u043b\u0438\u043d\u0433 \u0438 \u0448\u0430\u0440\u0438\u043d\u0433 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u043f\u0438\u043b\u0438\u043d\u044b \u0438\u0437 \u0410\u0441\u0442\u0435\u0440\u0430 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 unixODBC(\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0443\u043b\u0438\u043d\u0433)<br \/>\n\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u0437  res_odbc.conf:<br \/>\n&#8220;pooling&#8221;,<br \/>\n&#8220;shared_connection&#8221;,<br \/>\n&#8220;limit&#8221;,<br \/>\n&#8220;idlecheck&#8221;  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0430\u043c\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c (func_odbc.conf)<br \/>\n\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0430\u043c\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0435<br \/>\n\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b(\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0411\u041e\u041b\u042c\u0428\u0418\u041c\u0418 \u0431\u0443\u043a\u0432\u0430\u043c\u0438<br \/>\n\u0414\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<br \/>\n ${ARG1}, ${ARG2} &#8230; ${ARGn}<br \/>\n\u0414\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0437\u0430\u043f\u0438\u0441\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f  ${VAL1}, ${VAL2} &#8230; ${VALn}  \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c.  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ${VALUE}.<br \/>\n\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0430 SQL_ESC().<\/p>\n<p><strong>readhandle <\/strong> -\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 \u0441\u043f\u0438\u0441\u043e\u043a DSN(\u0434\u043e 5) \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d readsql. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 writehandle \u0438\u043b\u0438 dsn<br \/>\n<strong>writehandle<\/strong> \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 \u0441\u043f\u0438\u0441\u043e\u043a DSN \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d writesql. &#8220;dsn&#8221; \u0441\u0438\u043d\u043e\u043d\u0438\u043c &#8220;writehandle&#8221;.<br \/>\n<strong>readsql<\/strong> \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438<br \/>\n<strong>writesql<\/strong>     \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438<br \/>\n<strong>insertsql<\/strong>    \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438, \u043d\u043e \u0431\u0430\u0437\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e 0 \u0441\u0442\u0440\u043e\u043a \u0431\u044b\u043b\u043e \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u043e (0 rows were affected)<br \/>\n<strong>prefix<\/strong>       \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 &#8220;ODBC&#8221;, \u0443\u043a\u0430\u0437\u0430\u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443.<br \/>\n<strong>escapecommas<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0437\u0430\u043f\u044f\u0442\u044b\u0445 \u0432 \u043f\u043e\u043b\u044f\u0445. \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u044f\u0442\u0430\u044f &#8220;escaped&#8221;(\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e), \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0437\u0430\u043f\u044f\u0442\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ARRAY() \u0438\u043b\u0438 HASH(). \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u044f\u0442\u044b\u0435 \u043d\u0435 &#8220;escaped&#8221;, \u0442\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043e \u043f\u043e \u043f\u043e\u043b\u044f\u043c(\u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c \u0437\u0430\u043f\u044f\u0442\u0430\u044f). \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0432 \u044d\u0442\u0443 \u043e\u043f\u0446\u0438\u044e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f HASH(), \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<br \/>\n<strong>synopsis<\/strong>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 &#8216;core show function <function name>&#8216;<br \/>\n<strong>mode<\/strong> \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8216;multirow&#8217;, \u0438 \u0442\u043e\u0433\u0434\u0430 \u0432\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c, \u0431\u043e\u043b\u0435\u0435 1 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u044b func_odbc. \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u043e\u0437\u0430\u0447\u043d\u044b\u0439 ID, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d ODBC_FETCH() \u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043a\u0430\u0436\u0434\u043e\u0439  \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. ODBC_FETCH_STATUS \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 SUCCESS \u0438\u043b\u0438 FAILURE, \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043b\u0438 \u043a\u0430\u043a\u0438\u0435 \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c ODBC_Finish \u0434\u043b\u044f ID, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.  \u0422\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f ODBCROWS \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<br \/>\n<strong>rowlimit <\/strong>    \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 mode=multirow, \u0438\u043d\u0430\u0447\u0435 func_odbc \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 resultset, \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, rowlimit \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u042d\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u044b \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ODBC_FETCH().<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<br \/>\n1. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0434\u0438\u0430\u043b\u043f\u043b\u0430\u043d\u0430.<\/p>\n<pre>\r\n[SQL]\r\ndsn=mysql1\r\nreadsql=${ARG1}\r\n<\/pre>\n<p>2. \u0411\u043b\u0435\u043a\u043b\u0438\u0441\u0442(\u0410\u043d\u0442\u0438 \u0431\u044b\u0432\u0448\u0430\u044f \u0431\u0430\u0431\u0430)<\/p>\n<pre>\r\n[ANTIGF]\r\ndsn=asterisk,mysql2   ; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c asterisk \u043a\u0430\u043a \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u0443\u044e \u0431\u0430\u0437\u0443, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c mysql2.\r\nreadsql=SELECT COUNT(*) FROM names WHERE CID=&#039;${SQL_ESC(${ARG1})}&#039;\r\nsyntax=&lt;callerid&gt;\r\nsynopsis=\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u044c\u0441\u044f \u043b\u0438 \u044d\u0442\u043e\u0442 CID \u0432 \u0431\u0430\u0437\u0435\r\n<\/pre>\n<p>3. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f<\/p>\n<pre>\r\n[PRESENCE]\r\ndsn=mysql1\r\nreadsql=SELECT location FROM presence WHERE id=&#039;${SQL_ESC(${ARG1})}&#039;\r\nwritesql=UPDATE presence SET location=&#039;${SQL_ESC(${VAL1})}&#039; WHERE id=&#039;${SQL_ESC(${ARG1})}&#039;\r\n<\/pre>\n<p>4. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438:<br \/>\n\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441(\u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430)<br \/>\nfunc_odbc.conf<\/p>\n<pre>\r\n[ALL_AVAIL_EXTENS]\r\nprefix=GET\r\ndsn=asterisk\r\nmode=multirow\r\nreadsql=SELECT extension FROM ast_hotdesk WHERE status = &#039;${ARG1}&#039;\r\n<\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f:<br \/>\nextensions.conf<\/p>\n<pre>\r\nexten =&gt; 0000,1,Goto(multirow_example,start,1)\r\n\r\n[multirow_example]\r\nexten =&gt; start,1,Verbose(1,Looping example)\r\nsame =&gt; n,Set(ODBC_ID=${GET_ALL_AVAIL_EXTENS(1)})\r\nsame =&gt; n, Verbose(ID=${ODBC_ID} rows=${ODBCROWS})\r\nsame =&gt; n,GotoIf($[${ODBCROWS} &lt; 1]?no_rows,1)\r\nsame =&gt; n,Verbose(do counterr)\r\nsame =&gt; n,Set(COUNTERR=1)\r\nsama =&gt; n,Verbose(posle counterr)\r\nsame =&gt; n,While($[${COUNTERR} &lt;= ${ODBCROWS}])\r\nsame =&gt; n,Set(AVAIL_EXTEN_${COUNTERR}=${ODBC_FETCH(${ODBC_ID})})\r\nsame =&gt; n,Verbose(${AVAIL_EXTEN_${COUNTERR}})\r\nsame =&gt; n,Set(COUNTERR=$[${COUNTERR} + 1])\r\nsame =&gt; n,EndWhile()\r\nsame =&gt; n,ODBCFinish()\r\n\r\nexten =&gt; no_rows,1,Verbose(1,No rows returned)\r\nsame =&gt; n,Playback(silence\/1&amp;invalid)\r\nsame =&gt; n,Hangup()\r\n<\/pre>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043a\u0441\u0442\u0435\u043d\u0448\u0435\u043d\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0430\u0442\u0443\u0441 =1. <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u0434\u0435\u0441\u043a\u0430, \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u0446\u0435\u043d\u0442\u0440\u0430, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0434\u043d\u044e \u0432 \u043d\u0435\u0434\u0435\u043b\u044e. \u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u0442\u043e\u043b\u0430, \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u043d\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0438\u0437 \u0441\u0442\u043e\u043b\u043e\u0432 \u0441\u0438\u0434\u0438\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a)<br \/>\n1.\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 sip.conf.<br \/>\n2.\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<pre>\r\nCREATE TABLE ast_hotdesk\r\n(\r\n  id serial NOT NULL,\r\n  extension int8,\r\n  first_name text,\r\n  last_name text,\r\n  cid_name text,\r\n  cid_number varchar(10),\r\n  pin int4,\r\n  context text,\r\n  status bool DEFAULT false,\r\n  location text,\r\n  CONSTRAINT ast_hotdesk_id_pk PRIMARY KEY (id)\r\n);\r\n<\/pre>\n<p>3.\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<pre>\r\nINSERT INTO ast_hotdesk (extension, first_name, last_name, cid_name, \r\ncid_number, pin, context, location)\r\nVALUES (1102, &#039;Alexey&#039;, &#039;Bogomaz&#039;, &#039;BOS2&#039;, \r\n&#039;7102&#039;, &#039;555&#039;, &#039;test&#039;, &#039;7102&#039;);\r\nINSERT INTO ast_hotdesk (extension, first_name, last_name, cid_name, \r\ncid_number, pin, context, location)\r\nVALUES (1107, &#039;Alexey&#039;, &#039;Bogomaz&#039;, &#039;BOS7&#039;, \r\n&#039;7107&#039;, &#039;555&#039;, &#039;test&#039;, &#039;7107&#039;);\r\n<\/pre>\n<p>4. \u041f\u0440\u0430\u0432\u0438\u043c extensions.conf<br \/>\n\u0422\u0430\u043a \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430 \u0438 \u0435\u0433\u043e \u043f\u0438\u043d<\/p>\n<pre>\r\nexten =&gt; _*110[2-7],1,NoOp()\r\n   same =&gt; n,Set(E=${EXTEN:1})  ; strip off the leading hash (#) symbol\r\n   same =&gt; n,Verbose(1,Hot Desk Extension ${E} is changing status)\r\n   same =&gt; n,Verbose(1,Checking current status of extension ${E})\r\n   same =&gt; n,Set(${E}_STATUS=${HOTDESK_INFO(status,${E})})\r\n   same =&gt; n,Set(${E}_PIN=${HOTDESK_INFO(pin,${E})})\r\n   same =&gt; n,GotoIf($[${ODBCROWS} &lt; 0]?invalid_user,1)\r\n; \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430, \u0435\u0441\u043b\u0438 1 \u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u043c. \r\n   same =&gt; n,GotoIf($[${${E}_STATUS} = 1]?logout,1:login,1)\r\n;\u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044f\r\nexten =&gt; login,1,NoOp() ;\r\n   same =&gt; n,Set(PIN_TRIES=1)     ; \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u043f\u044b\u0442\u043a\u0438\r\n   same =&gt; n,Set(MAX_PIN_TRIES=3) ; \u043c\u0430\u043a\u0441 \u043a-\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a\r\n   same =&gt; n,Playback(silence\/1)  ; \u0438\u0433\u0440\u0430\u0435\u043c \u0442\u0438\u0448\u0438\u043d\u0443 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0436\u0440\u0430\u043b\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \r\n   same =&gt; n(get_pin),NoOp()\r\n   same =&gt; n,Set(PIN_TRIES=$[${PIN_TRIES} + 1])   ; \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u043f\u044b\u0442\u043a\u0438\r\n   same =&gt; n,Read(PIN_ENTERED,enter-password,${LEN(${${E}_PIN})}) ;\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0438\u043d\r\n   same =&gt; n,GotoIf($[&quot;${PIN_ENTERED}&quot; = &quot;${${E}_PIN}&quot;]?valid_login,1) ; \u0441\u043e\u0432\u043f\u0430\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e\r\n   same =&gt; n,Playback(pin-invalid)   ;\u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u043b\u043e\r\n   same =&gt; n,GotoIf($[${PIN_TRIES} &lt;= ${MAX_PIN_TRIES}]?get_pin:login_fail,1) ; \u043f\u043b\u043e\u0445\u043e) \r\n; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043e\u0442\u043a\u0443\u0434\u0430 \u0436 \u043d\u0430\u043c \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e CHANNEL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CUT()\r\nexten =&gt; valid_login,1,NoOp()\r\n; \u041e\u0431\u0440\u0435\u0437\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430, \u043e\u0441\u0442\u0430\u0447\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 LOCATION \r\n   same =&gt; n,Set(LOCATION=${CUT(CHANNEL,\/,2)})\r\n;  \u041e\u0431\u0440\u0435\u0437\u0430\u0435\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043e\u0441\u0442\u0430\u0447\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 LOCATION \r\n   same =&gt; n,Set(LOCATION=${CUT(LOCATION,-,1)})\r\n\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u044e\u0437\u0435\u0440\u0430(\u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d \u0438\u043b\u0438 \u043d\u0435\u0442)\r\n   same =&gt; n,Set(USERS_LOGGED_IN=${HOTDESK_CHECK_PHONE_\r\nLOGINS(${LOCATION})})\r\n   same =&gt; n,GotoIf($[${USERS_LOGGED_IN} &gt; 0]?logout_login,1)\r\n   same =&gt; n(set_login_status),NoOp()\r\n;\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 1, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0445\u043e\u0434\u0438\u0442\r\n   same =&gt; n,Set(HOTDESK_STATUS(${E})=1,${LOCATION})\r\n   same =&gt; n,GotoIf($[${ODBCROWS} &lt; 1]?error,1)\r\n   same =&gt; n,Playback(agent-loginok)\r\n   same =&gt; n,Hangup()\r\nexten =&gt; logout_login,1,NoOp()\r\n; \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0432\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435\r\n   same =&gt; n,Set(LOGGED_IN_ID=${HOTDESK_LOGGED_IN_USER(${LOCATION})})\r\n   same =&gt; n(start_loop),NoOp()\r\n   same =&gt; n,Set(WHO=${ODBC_FETCH(${LOGGED_IN_ID})})\r\n   same =&gt; n,GotoIf($[&quot;${ODBC_FETCH_STATUS}&quot; = &quot;FAILURE&quot;]?cleanup) ;\u0435\u0441\u0442\u044c \u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\r\n   same =&gt; n,Set(HOTDESK_STATUS(${WHO})=0)           ; \u0432\u044b\r\n   same =&gt; n,Goto(start_loop)\r\n   same =&gt; n(cleanup),ODBCFinish(${LOGGED_IN_ID})\r\n   same =&gt; n,Goto(valid_login,set_login_status)      ; return to logging in\r\nexten =&gt; logout,1,NoOp()\r\n   same =&gt; n,Set(HOTDESK_STATUS(${E})=0)\r\n   same =&gt; n,GotoIf($[${ODBCROWS} &lt; 1]?error,1)\r\n   same =&gt; n,Playback(silence\/1&amp;agent-loggedoff)\r\n   same =&gt; n,Hangup()\r\nexten =&gt; login_fail,1,NoOp()\r\n   same =&gt; n,Playback(silence\/1&amp;login-fail)\r\n   same =&gt; n,Hangup()\r\nexten =&gt; error,1,NoOp()\r\n   same =&gt; n,Playback(silence\/1&amp;connection-failed)\r\n   same =&gt; n,Hangup()\r\nexten =&gt; invalid_user,1,NoOp()\r\n   same =&gt; n,Verbose(1,Hot Desk extension ${E} does not exist)\r\n   same =&gt; n,Playback(silence\/2&amp;invalid)\r\n   same =&gt; n,Hangup()\r\n;\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 (\u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0448\u0442\u0430\u0442\u043e\u0432, \u0441 \u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0442\u0434)\r\ninclude =&gt; hotdesk_outbound\r\n[hotdesk_outbound]\r\nexten =&gt; _X.,1,NoOp()\r\n   same =&gt; n,Set(LOCATION=${CUT(CHANNEL,\/,2)})\r\n   same =&gt; n,Set(LOCATION=${CUT(LOCATION,-,1)})\r\n   same =&gt; n,Set(WHO=${HOTDESK_PHONE_STATUS(${LOCATION})})\r\n   same =&gt; n,GotoIf($[${ISNULL(${WHO})}]?no_outgoing,1)\r\n   same =&gt; n,Set(${WHO}_CID_NAME=${HOTDESK_INFO(cid_name,${WHO})})\r\n   same =&gt; n,Set(${WHO}_CID_NUMBER=${HOTDESK_INFO(cid_number,${WHO})})\r\n   same =&gt; n,Set(${WHO}_CONTEXT=${HOTDESK_INFO(context,${WHO})})\r\n   same =&gt; n,Goto(${${WHO}_CONTEXT},${EXTEN},1)\r\n\r\n[international]\r\nexten =&gt; _011.,1,NoOp()\r\n   same =&gt; n,Set(E=${EXTEN})\r\n   same =&gt; n,Goto(outgoing,call,1)\r\nexten =&gt; i,1,NoOp()\r\n   same =&gt; n,Playback(silence\/2&amp;sorry-cant-let-you-do-that2)\r\n   same =&gt; n,Hangup()\r\ninclude =&gt; longdistance\r\n\r\n[longdistance]\r\nexten =&gt; _1NXXNXXXXXX,1,NoOp()\r\n   same =&gt; n,Set(E=${EXTEN})\r\n   same =&gt; n,Goto(outgoing,call,1)\r\nexten =&gt; _NXXNXXXXXX,1,Goto(1${EXTEN},1)\r\nexten =&gt; i,1,NoOp()\r\n   same =&gt; n,Playback(silence\/2&amp;sorry-cant-let-you-do-that2)\r\n   same =&gt; n,Hangup()\r\ninclude =&gt; local\r\n\r\n[local]\r\nexten =&gt; _416NXXXXXX,1,NoOp()\r\n   same =&gt; n,Set(E=${EXTEN})\r\n   same =&gt; n,Goto(outgoing,call,1)\r\nexten =&gt; i,1,NoOp()\r\n   same =&gt; n,Playback(silence\/2&amp;sorry-cant-let-you-do-that2)\r\n   same =&gt; n,Hangup()\r\n[outgoing]\r\nexten =&gt; call,1,NoOp()\r\n   same =&gt; n,Set(CALLERID(name)=${${WHO}_CID_NAME})\r\n   same =&gt; n,Set(CALLERID(number)=${${WHO}_CID_NUMBER})\r\n   same =&gt; n,Dial(SIP\/service_provider\/${E})\r\n   same =&gt; n,Playback(silence\/2&amp;pls-try-call-later)\r\n   same =&gt; n,Hangup()\r\n\r\n<\/pre>\n<p>5. func_odbc.conf<\/p>\n<pre>\r\n[INFO]\r\nprefix=HOTDESK\r\ndsn=asterisk\r\nreadsql=SELECT ${ARG1} FROM ast_hotdesk WHERE extension = &#039;${ARG2}&#039;\r\n\r\n; \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0441\u0435 \u043b\u044b \u0432\u044b\u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0438\u0441\u044c, \u0438\u043b\u0438 \u043a\u0442\u043e\u0442\u043e  \u0437\u0430\u0431\u044b\u043b\r\n[CHECK_PHONE_LOGINS]\r\nprefix=HOTDESK\r\ndsn=asterisk\r\n; \u044d\u0442\u0430 \u0421\u0442\u0440\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0426\u0415\u041b\u041e\u0419(\u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u0432)\r\nreadsql=SELECT COUNT(status) FROM ast_hotdesk WHERE status = &#039;1&#039; AND location = &#039;${ARG1}&#039;\r\n\r\n[STATUS]\r\nprefix=HOTDESK\r\ndsn=asterisk\r\nwritesql=UPDATE ast_hotdesk SET status = &#039;${VAL1}&#039;,  location = &#039;${VAL2}&#039; WHERE extension = &#039;${ARG1}&#039;\r\n\r\n;\u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445\r\n[PHONE_STATUS]\r\nprefix=HOTDESK\r\ndsn=asterisk\r\nreadsql=SELECT extension FROM ast_hotdesk WHERE status = &#039;1&#039; AND location = &#039;${ARG1}&#039;\r\n<\/pre>\n<p>\u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e ARRAY, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438!<br \/>\nfunc_odbc.conf<\/p>\n<pre>\r\nreadsql=SELECT pin,status FROM ast_hotdesk WHERE extension = &#039;${E}&#039;\r\n<\/pre>\n<p>extensions.conf<\/p>\n<pre>\r\nexten =&gt; _110[2-7],n,Set(ARRAY(${E}_PIN,${E}_STATUS)=${HOTDESK_INFO(${E})})\r\n<\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u0445\u043e\u0434 ODBC<br \/>\n\u0422\u0435\u043e\u0440\u0438\u044f:<br \/>\n\u0432 \u0432\u0435\u0440\u0441\u0438\u0438 1.8 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 mysql \u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<br \/>\n\u0432 \u0432\u0435\u0440\u0441\u0438\u0438 1.8 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0431\u0435\u0437 \u0431\u0435\u043a\u0441\u043b\u0435\u0448\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0435\u0439 &#8230;..<br \/>\n\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u041e\u0414\u041d\u0410 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 MYSQL(),\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u044b \u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437<\/p>\n<p><strong>MYSQL(Connect connid dhhost dbuser dbpass dbname)<\/strong> connid -\u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 id \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439<br \/>\ndbhost  &#8211; \u043e\u0431\u044b\u0447\u043d\u043e localhost<br \/>\ndbuser &#8211; \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b \u043a \u0411\u0414<br \/>\ndbpass &#8211; \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043a\u0434\u043b \u043a \u0411\u0414<br \/>\ndbname &#8211; \u0438\u043c\u044f \u0411\u0414 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430 \u0438 \u0432\u044b\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<br \/>\n<strong><br \/>\nMYSQL(Query resultid ${connid} query-string)<\/strong>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL, \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 query-string, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 ${connid}. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 ${resultid}.  \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 SELECT, INSERT,UPDATE&#8230;..<br \/>\n<strong>MYSQL(Fetch fetchid ${resultid} var1 var2 &#8230; varN)<\/strong> \u0414\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 2 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0442\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u0445 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c.<br \/>\nC\u043c\u044b\u0441\u043b fetchid \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439 \u0432\u043e\u0442 \u0447\u0442\u043e \u043f\u0438\u0448\u0443\u0442 \u0432 \u0438\u043d\u0435\u0442\u0440\u043d\u0435\u0442\u0430\u0445<br \/>\n${fetchid} &#8211;  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0432 1, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 MYSQL(Fetch).<br \/>\n<strong>MYSQL(Clear ${resultid})<\/strong>\u041e\u0447\u0438\u0449\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<br \/>\n<strong> MYSQL(Disconnect ${connid})<\/strong>\u041f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 MySQL \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c.<br \/>\n<strong>MYSQL(Nextresult resultid ${connid})<\/strong>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u0443\u043b \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043e\u0434\u0438\u043d  \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u044d\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432  ${resultid}. \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440.<\/p>\n<p>\u041d\u0435 \u043f\u043e\u043d\u044f\u043b \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f:((((<\/p>\n<p>\u0417\u0410\u041c\u0415\u0427\u0410\u041d\u0418\u042f<br \/>\n    \u0415\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438\u0442\u0434. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c 5\u0439 \u043f\u0443\u043d\u043a\u0442(\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434 \u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u0441\u044f) \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c, \u0438 \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u0442\u0430\u043a\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435, \u0432 MySQL \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043b\u0438\u043c\u0438\u0442 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0441 \u0431\u0430\u0437\u043e\u0439. (\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043b\u0438\u043c\u0438\u0442\u0430 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 mysql).<br \/>\n    \u041d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0442\u0438\u043f\u0430 &#8220;SELECT *&#8221;, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u0431\u0443\u0434\u0443\u0442 \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0412\u044b \u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435. \u0412\u0430\u043c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b \u0434\u043b\u044f \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u043f\u043e\u043b\u0435\u0439 \u0442\u0438\u043f\u0430: &#8220;SELECT (\u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435) as \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435_\u0438\u043c\u044f&#8221;, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043c\u044f \u043f\u043e\u043b\u044f \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u043e\u043b\u0435\u0439, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. <\/p>\n<p>\u041d\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b:<br \/>\n\u0415\u0441\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0442\u0438\u043f\u0430- \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435  &#8216;+0&#8217; \u0432 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u043b\u043e\u043d\u043a\u0438:<br \/>\nexten => 1,n,MYSQL(Query resultid ${connid} SELECT called+0  FROM  callers WHERE callbacknum=${CALLERID(num):-11:11}<br \/>\n\u0422\u0430\u043a\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0432\u0435\u0440\u043d\u0435\u0442 \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432 \u0442\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435: yyyymmddhhmmss.<br \/>\n\u041f\u0420\u0418\u041c\u0415\u0420:<\/p>\n<pre>\r\nexten =&gt; 0204,1,NoOp(start)\r\nsame =&gt; n, MySQL(Connect connid localhost root password dbname)  ;\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0438\u0441\u044c\r\nsame =&gt; n, MySQL(Query res_id ${connid} SELECT count(*) from test) ; \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\r\nsame =&gt; n, Set(COUNT=${res_id})   ; \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043a-\u0432\u043e \u0441\u0442\u0440\u043e\u043a\r\nsame =&gt; n, MYSQL(Clear ${res_id})   ; \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e\r\nsame =&gt; n, MySQL(Disconnect ${connid}) ; \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c\r\nsame =&gt; n, While($[${COUNT}&gt;0])    ;\u0432\u0445\u043e\u0434\u0438\u043c \u0432 \u0446\u0438\u043a\u043b \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u043e\u043a\u0430\r\nsame =&gt; n, MySQL(Connect connid localhost root password dbname)\r\nsame =&gt; n, MYSQL(Query resultid ${connid} SELECT number, text from test where id= ${COUNT})\r\nsame =&gt; n, MYSQL(Fetch fetchid ${resultid} number text)\r\nsame =&gt; n, MYSQL(Clear ${resultid})\r\nsame =&gt; n, MYSQL(Disconnect ${connid})\r\nsame =&gt; n, JabberSend(asterisk,bos.avenue.com.ua@gmail.com, Number: ${number} text: ${text})\r\nsame =&gt; n, Set(COUNT=${DEC(COUNT)})\r\nsame =&gt; n, EndWhile()\r\nsame =&gt; n, Hangup()\r\n<\/pre>\n<p>\u0414\u0443\u043c\u0430\u044e \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u0440\u0438\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f! <\/p>\n<p>P.S. \u041f\u043e \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c \u0442\u0440\u0443\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u043a\u043e\u0440\u043e\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0443\u043d\u043a\u0442\u0438\u043a \u043e \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 MySQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 5.5<br \/>\n1.\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 rc.conf<br \/>\n<strong>mysql_enable=&#8221;YES&#8221; <\/strong><br \/>\n2.\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433:<br \/>\n<strong>cp \/usr\/local\/share\/mysql\/my-small.cnf \/usr\/local\/etc\/my.cnf<\/strong><br \/>\n3.\u0421\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440:<br \/>\n<strong>\/usr\/local\/etc\/rc.d\/mysql-server start<\/strong><br \/>\n4.\u041f\u043e\u0441\u0442\u0438\u043d\u0441\u0442\u0430\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438(\u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a \u044e\u0437\u0435\u0440\u044b, \u043f\u0430\u0440\u043e\u043b\u044c \u0440\u0443\u0442\u0430..)<br \/>\n<strong>\/usr\/local\/bin\/mysql_secure_installation<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0413\u0440\u043e\u0437\u044b \u043d\u0435 \u0443\u0445\u043e\u0434\u044f\u0442, \u0434\u043e\u043c\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0431\u044b\u0432\u0430\u044e) \u041d\u0430\u0447\u043d\u0443 \u043e \u0441\u0432\u044f\u0437\u043a\u0435 MySQL+Asterisk \u0447\u0435\u0440\u0435\u0437 ODBC \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043a \u043a\u043e\u043d\u0446\u0443 \u043d\u0435\u0434\u0435\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0443. \u041d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b) \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 MySQL \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0431\u0435\u0437 ODBC. \u0414\u043b\u044f \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f. 0. \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u0430\u044f \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. 1. \u0410\u0441\u0442\u0435\u0440\u0438\u0441\u043a \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 &hellip; <a href=\"https:\/\/bos-info.com\/?p=412\">\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0447\u0438\u0442\u0430\u043d\u043d\u044f <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[61,26,19],"_links":{"self":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts\/412"}],"collection":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=412"}],"version-history":[{"count":5,"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts\/412\/revisions"}],"predecessor-version":[{"id":916,"href":"https:\/\/bos-info.com\/index.php?rest_route=\/wp\/v2\/posts\/412\/revisions\/916"}],"wp:attachment":[{"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bos-info.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}