{"id":258828,"date":"2015-06-07T22:01:02","date_gmt":"2015-06-07T18:01:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258828"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258828","title":{"rendered":"SIP \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438\u0437 stm32f4-discovery"},"content":{"rendered":"<p>     \t\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 sip-\u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 stm32f4-discovery \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0435\u0439 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u041e\u0421 <a href=\"http:\/\/embox.github.io\">Embox<\/a>. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 stm32f4-discovery (144MHz, 192Kb RAM, 1Mb ROM) \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043c \u0441\u0430\u043c\u0438\u043c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043b\u0438? \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e, \u0430 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u2014 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/y2Eg_zwuI7M?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h2>\n<p>  \u041f\u041e \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043e\u0444\u0442-\u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 PJSIP \u0438 \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 \u041e\u0421 Embox. PJSIP \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 sip-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u0430. Embox \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 PJSIP \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 pthread, \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0430\u0443\u0434\u0438\u043e \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u041e\u0421. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f POSIX-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 unix-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u041e\u0421 \u043d\u0430 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u0435\u0440\u0435\u043d\u043e\u0441 PJSIP \u043d\u0430 \u041e\u0421 Embox \u043f\u0440\u043e\u0448\u0435\u043b \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043b\u0435\u0433\u043a\u043e, \u0430 \u0432\u043e\u0442 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c PJSIP \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438. \u041e \u043d\u0438\u0445 \u2014 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0430\u0448 \u0443\u0441\u043f\u0435\u0445, \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e. \u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f stm32f4discovery + stm32dis-bb, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e com-\u043f\u043e\u0440\u0442\u0443 \u043a \u043d\u0435\u0439 (\u0435\u0441\u0442\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f), \u0445\u043e\u0441\u0442 \u0441 \u043b\u0438\u043d\u0443\u043a\u0441\u043e\u043c, ethernet \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u043b\u0430\u0442\u043e\u0439 \u0438 \u0445\u043e\u0441\u0442\u043e\u043c.<\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/github.com\/embox\/pjsip\">github.com\/embox\/pjsip<\/a> \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u044d\u0442\u043e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433. \u0417\u0434\u0435\u0441\u044c \u043b\u0435\u0436\u0430\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043a \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0448\u0430\u0433 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 Embox&#8217;\u0430 \u043d\u0430 discovery. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0437\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ELF.<br \/>  \u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437, \u0444\u0430\u0439\u043b embox.<br \/>  \u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c Embox \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:  <\/p>\n<ul>\n<li>\u0441\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 <a href=\"https:\/\/github.com\/embox\/embox\">github.com\/embox\/embox<\/a>   <\/li>\n<li>\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432<br \/> \n<pre><code class=\"bash\">make confload-platform\/pjsip\/stm32f4discovery <\/code><\/pre>\n<p>   <\/li>\n<li>\u0441\u043e\u0431\u0435\u0440\u0438\u0442\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 <br \/> \n<pre><code class=\"bash\">make <\/code><\/pre>\n<p>   <\/li>\n<li>\u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0437 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438 build\/base\/bin\/embox<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443 \u043a discovery, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 115200 8n1. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0448\u0435\u043b\u043b-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 discovery.  <\/p>\n<ul>\n<li>E\u0441\u043b\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c<br \/> \n<pre><code class=\"bash\">route del 192.168.1.0 dev eth0 ifconfig eth0 (ip-\u0430\u0434\u0440\u0435\u0441) netmask (\u043c\u0430\u0441\u043a\u0430) up&quot; route add (\u043f\u043e\u0434\u0441\u0435\u0442\u044c) netmask (\u043c\u0430\u0441\u043a\u0430) eth0 <\/code><\/pre>\n<p>   <\/li>\n<li>\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 pjsip_simpleua<\/li>\n<\/ul>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0445\u043e\u0441\u0442-\u043a\u043b\u0438\u0435\u043d\u0442. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u0435.  <\/p>\n<ul>\n<li>\u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 <a href=\"http:\/\/www.pjsip.org\/release\/2.4\/pjproject-2.4.tar.bz2\">www.pjsip.org\/release\/2.4\/pjproject-2.4.tar.bz2<\/a> \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 (pjsip)<\/li>\n<li>\u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0445\u043e\u0441\u0442-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 PJSIP, \u0441\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0439\u0442\u0435 <br \/> \n<pre><code class=\"bash\">.\/build_pjproject.sh <\/code><\/pre>\n<p>   <\/li>\n<li>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0445\u043e\u0441\u0442-\u043a\u043b\u0438\u0435\u043d\u0442, \u0441\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0439\u0442\u0435 <br \/> \n<pre><code class=\"bash\">make <\/code><\/pre>\n<p>   <\/li>\n<li>\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <br \/> \n<pre><code class=\"bash\">simpleua sip:test@(ip-\u0430\u0434\u0440\u0435\u0441 \u043f\u043b\u0430\u0442\u044b) <\/code><\/pre>\n<p>   <\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u044d\u0442\u043e?<\/h2>\n<p>  \u041d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435. \u0411\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0438 \u0434\u0435\u0448\u0451\u0432\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 stm32f4-discovery \u2014 \u043d\u0435 8-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043d\u043e \u0438 \u043d\u0435 \u0433\u0438\u0433\u0430\u0433\u0435\u0440\u0446\u043e\u0432\u0430\u044f RaspberryPi \u0438\u043b\u0438 Beaglebone. \u0421\u0442\u0430\u043b\u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 discovery: \u043f\u043e\u043c\u0438\u043c\u043e ethernet \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0430 \u0437\u0432\u0443\u043a\u0430.<\/p>\n<p>  \u0410 \u0442\u0443\u0442 \u0441\u043e\u0448\u043b\u0438\u0441\u044c \u0437\u0432\u0451\u0437\u0434\u044b: \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u201c\u043f\u043e \u0446\u0435\u0445\u0443\u201d \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438 sip-\u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 OMAP137 \u0441 \u041b\u0438\u043d\u0443\u043a\u0441\u043e\u043c. \u0418 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043e\u0444\u0442 \u0442\u0430\u043c \u0431\u044b\u043b\u043e \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043c\u0443\u0447\u0435\u043d\u0438\u0435: bitbake, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043c\u0438\u043d\u0443\u0442\u0443 \u0434\u0443\u043c\u0430\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0435\u043c\u0443 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443, \u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0438 challenge: SIP-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u0430\u0431\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435.<\/p>\n<p>  \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0441\u0442\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/company\/embox\/blog\/255835\/#comment_8379557\">\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/a>  <a href=\"http:\/\/habrahabr.ru\/users\/indemsys\/\" class=\"user_link\">Indemsys<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b \u043f\u0440\u043e \u0441\u043e\u0444\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u041b\u0438\u043d\u0443\u043a\u0441\u0435 \u0438 \u043d\u0435\u0442 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 (\u0433\u043e\u043b\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 RTOS).<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f \u2014 \u0432\u044b\u0431\u043e\u0440 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u041f\u041e \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 sip-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0438 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0430\u0443\u0434\u0438\u043e. \u041f\u0435\u0440\u0432\u044b\u043c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0432\u044b\u0434\u0430\u0447\u0438 google \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f <a href=\"http:\/\/www.pjsip.org\/\">www.pjsip.org<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0432\u0441\u0451 \u043d\u0443\u0436\u043d\u043e\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u043e\u043f\u043e\u0440\u043e\u043c \u0438 \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0432 \u0448\u0438\u0440\u043e\u043a\u0438\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445, \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0438 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u0437\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043e\u0431\u044a\u0435\u043c\u0443 \u041e\u0417\u0423 (\u0437\u0430\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f 150\u043a\u0431).<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0441\u043b\u044b\u0448\u0438\u0442 \u043e Embox \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437: \u0443 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 (<a href=\"http:\/\/habrahabr.ru\/company\/embox\/blog\/144935\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435<\/a>), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c \u201c\u043c\u043e\u0434\u0443\u043b\u044c\u201d. \u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u041f\u041e \u043c\u044b \u0432\u0432\u0435\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0442\u0447\u0435\u0439, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443. <\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 PJSIP \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/embox\/embox\/commit\/f6a2bd46ba9496e8c1bb60bec226c4710dadbe7c\">\u043a\u043e\u043c\u043c\u0438\u0442<\/a> \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0445\u043e\u0441\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b <s>(\u043d\u0438\u043a\u0430\u043a)<\/s> \u0438 \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0432 PJSIP: \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043b\u044e\u0441\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b; \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 SOCK_RDM.<\/p>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u043d\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u0439 \u0436\u0435. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043c\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0435\u043a\u043e\u0432, \u0438 \u0442.\u0434. \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u043e\u0434\u0443\u043b\u0438 PJSIP<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">package third_party.pjproject  @Build(stage=2,script=&quot;$(EXTERNAL_MAKE)&quot;) @BuildDepends(third_party.STLport.core) module core {  \tdepends embox.net.lib.getifaddrs  \tdepends embox.compat.posix.pthreads \tdepends embox.compat.posix.pthread_key \tdepends embox.compat.posix.pthread_rwlock \tdepends embox.compat.posix.semaphore \tdepends embox.compat.posix.fs.fsop \tdepends embox.compat.posix.idx.select \tdepends embox.compat.posix.net.getaddrinfo \tdepends embox.compat.posix.net.gethostbyname \tdepends embox.compat.posix.util.gethostname  \tdepends embox.compat.posix.proc.pid \tdepends embox.compat.posix.proc.exit \tdepends embox.compat.libc.stdio.fseek \tdepends embox.compat.libc.time  \tdepends third_party.STLport.core }  @AutoCmd @Cmd(name=&quot;streamutil&quot;, help=&quot;&quot;, man=&quot;&quot;) @BuildDepends(core) @Build(stage=2,script=&quot;true&quot;) module streamutil { \tsource &quot;^BUILD\/extbld\/third_party\/pjproject\/core\/install\/streamutil.o&quot; \tdepends core }  @AutoCmd @Cmd(name=&quot;pjsua&quot;, help=&quot;&quot;, man=&quot;&quot;) @BuildDepends(core) @Build(stage=2,script=&quot;true&quot;) module pjsua { \tsource &quot;^BUILD\/extbld\/third_party\/pjproject\/core\/install\/pjsua.o&quot; \tdepends core }  @AutoCmd @Cmd(name=&quot;pjsip_simpleua&quot;, help=&quot;&quot;, man=&quot;&quot;) @BuildDepends(core) @Build(stage=2,script=&quot;true&quot;) module simpleua { \tsource &quot;^BUILD\/extbld\/third_party\/pjproject\/core\/install\/simpleua.o&quot; \tdepends core } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 PJSIP<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\"> PKG_NAME := pjproject PKG_VER  := 2.2.1  PKG_SOURCES := http:\/\/www.pjsip.org\/release\/$(PKG_VER)\/$(PKG_NAME)-$(PKG_VER).tar.bz2 PKG_MD5     := 6ed4bb7750c827dc1d881e209a3b62db  include $(EXTBLD_LIB)  PKG_PATCHES := pjproject.patch \\ \tsimpleua_default_loglevel.patch \\ \tmutex_loglevel_increase.patch \\ \tkmalloc.patch  DISABLE_FEATURES := \\ \tl16-codec   \\ \tilbc-codec  \\ \tspeex-codec \\ \tspeex-aec   \\ \tgsm-codec   \\ \tg722-codec  \\ \tg7221-codec \\ \t#g711-codec  PJPROJECT_ROOT := $(ROOT_DIR)\/third-party\/pjproject PJSIP_CPPFLAGS := -I$(PJPROJECT_ROOT)\/include $(EMBOX_DEPS_CPPFLAGS) -I$(SRC_DIR)\/compat\/cxx\/include BUILD_ROOT := $(BUILD_DIR)\/$(PKG_NAME)-$(PKG_VER)  $(CONFIGURE) : \texport EMBOX_GCC_LINK=full; \\ \tcd $(BUILD_ROOT) && ( \\ \t\t.\/aconfigure \\ \t\t\tCC=$(EMBOX_GCC) \\ \t\t\tCXX=$(EMBOX_GXX) \\ \t\t\tCPPFLAGS=&quot;$(PJSIP_CPPFLAGS)&quot; \\ \t\t\t--host=$(AUTOCONF_TARGET_TRIPLET) \\ \t\t\t--target=$(AUTOCONF_TARGET_TRIPLET) \\ \t\t\t--prefix=\/ \\ \t\t\t$(DISABLE_FEATURES:%=--disable-%) \\ \t\t\t--with-external-pa; \\ \t\techo export CFLAGS+=&quot;$(PJSIP_CPPFLAGS)&quot; &gt; user.mak; \\ \t\techo export CXXFLAGS+=&quot;$(PJSIP_CPPFLAGS)&quot; &gt;&gt; user.mak; \\ \t) \tcp .\/config_site.h $(BUILD_ROOT)\/pjlib\/include\/pj\/config_site.h \ttouch $@  $(BUILD) : \tcd $(BUILD_ROOT) && ( \\ \t\tmake -j1 dep; \\ \t\tmake -j1 MAKEFLAGS='$(EMBOX_IMPORTED_MAKEFLAGS)'; \\ \t) \ttouch $@  $(INSTALL) : \tfor f in $(BUILD_ROOT)\/pjsip-apps\/bin\/samples\/$(AUTOCONF_TARGET_TRIPLET)\/*; do \\        \t\tcp $$f $(PKG_INSTALL_DIR)\/$$(basename $$f).o; \\ \tdone \tfor f in $(BUILD_ROOT)\/pjsip-apps\/bin\/*-$(AUTOCONF_TARGET_TRIPLET); do \\ \t\tfn=$$(basename $$f); \\ \t\tcp $$f $(PKG_INSTALL_DIR)\/$${fn%-$(AUTOCONF_TARGET_TRIPLET)}.o; \\ \tdone \ttouch $@ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0417\u0432\u0443\u043a<\/h2>\n<p>  \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c streamutil, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0434\u0438\u0430-\u043f\u043e\u0442\u043e\u043a.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u0430\u0445\u0430\u043b\u0438 \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c, streamutil \u0441\u0442\u0430\u043b \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0437\u0432\u0443\u043a\u0430. \u0421 \u043d\u0443\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u043b\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0435\u043c\u043e-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u043d\u0438\u044f wav-\u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0444\u043b\u0435\u0448\u043a\u0438. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0441\u0442\u043e\u044f\u043b \u0432\u043e\u043f\u0440\u043e\u0441, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f PJSIP \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0437\u0432\u0443\u043a\u043e\u0432\u044b\u0445 API. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f portaudio, \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0447\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ALSA API. \u041c\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0441 \u044d\u0442\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<p>  \u0412 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a: \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c callback, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0444\u0435\u0440 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u043e\u043f\u0443\u0441\u0442\u043e\u0448\u0435\u043d\u0438\u044e. \u0417\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 API \u043d\u0435 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0432 \u043a\u0430\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f callback, \u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043f\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 callback \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<p>  \u0421 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0442\u0438\u043f\u0430 \u201c\u0434\u044b\u0440\u044f\u0432\u0430\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f\u201d: PJSIP \u044f\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c callback \u043f\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0438 \u043a deadlock\u2019\u0443. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u043e \u201c\u0432\u0437\u0440\u043e\u0441\u043b\u044b\u0445\u201d \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438. \u0412 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u0442\u0430\u043b \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c <a href=\"https:\/\/github.com\/embox\/embox\/blob\/master\/src\/drivers\/audio\/stm32f4_pa.c\">\u0442\u0430\u043a<\/a>.<\/p>\n<p>  \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 <a href=\"http:\/\/habrahabr.ru\/company\/embox\/blog\/256565\">\u043b\u0435\u0433\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/a>. \u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c \u043b\u0451\u0433\u043a\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0434\u0443\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0435\u043a\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u0430. \u041a \u043b\u0435\u0433\u043a\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f pthread-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 portaudio-\u043f\u043e\u0442\u043e\u043a\u0430, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<h2>\u041d\u0435\u0445\u0432\u0430\u0442\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0431\u043e\u0440\u043e\u043b\u0438\u0441\u044c, \u0431\u044b\u043b\u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u043c\u0430\u0440\u043a\u0443 \u043f\u0440\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c pool\u2019\u044b \u2014 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0421\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u043f\u043e\u0440\u043e\u0439 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e boilerplate \u043a\u043e\u0434\u0430, \u0437\u0430\u0442\u043e \u0432\u0437\u0430\u043c\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 pool\u2019\u043e\u0432 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. <\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c. \u0420\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0440\u0435\u0434\u043a\u043e \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 100 \u0441\u0442\u0440\u043e\u043a, \u043f\u0440\u0430\u0432\u0434\u0430 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0440\u0430\u0437\u043c\u0435\u0440\u044b pool\u2019\u043e\u0432 \u0447\u0430\u0441\u0442\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043d\u0430\u0448\u0435\u0439 stm32f4discovery \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 2 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430: \u043d\u0430\u0431\u043e\u0440\u0442\u043d\u044b\u0439 ethernet \u0438 loopback. \u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0442\u0430\u043a\u0443\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445: \u0447\u0438\u0441\u043b\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 irq, \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 \u0432\u0441\u0451 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0430\u0451\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a PJSIP, \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 malloc\/free. \u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c streamtuil \u0432 \u043e\u0431\u044a\u0435\u043c\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u044f \u043a\u0443\u0447\u0430 \u043c\u043e\u043d\u043e\u043f\u043e\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f streamutil, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0437\u0430 \u0441\u0447\u0451\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 pool\u2019\u043e\u0432.<\/p>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 pool\u2019\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b\u0438 \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0422\u0443\u0442 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0445\u0430\u043a: \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 1514 \u0431\u0430\u0439\u0442 \u0434\u043e 214, \u0437\u0430\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e: \u043e\u0442\/\u043a streamutil \u0445\u043e\u0434\u044f\u0442 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 214 \u0431\u0430\u0439\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u0442\u0440\u044e\u043a \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<p>  \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u0443\u0447\u0438, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0438\u0445 streamutil \u0441\u0442\u0430\u043b \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0439 \u0437\u0432\u0443\u043a.<\/p>\n<h2>SIP-\u0442\u0435\u043b\u0435\u0444\u043e\u043d<\/h2>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e streamutil \u2014 \u0434\u0435\u043c\u043e-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043c\u0430\u043b\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u044f\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435. \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u2014 pjsua, \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u043d\u044b\u0439 sip-\u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 PJSIP. \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u043d\u0430\u0447\u0430\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c. \u041d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u043a\u0435\u0439, \u0443\u0442\u044f\u043d\u0443\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b pool\u2019\u043e\u0432 \u0435\u0449\u0451 \u0442\u0443\u0436\u0435. \u041d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0443\u0442 \u043d\u0430\u0441 \u043d\u0430\u0447\u0430\u043b\u0438 \u0442\u0435\u0440\u0437\u0430\u0442\u044c \u0441\u043c\u0443\u0442\u043d\u044b\u0435 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b pjsua? <\/p>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u044d\u0442\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 pjsua \u043a malloc\/free \u043d\u0430 \u0445\u043e\u0441\u0442\u0435. \u041d\u043e, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u0434 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0432 \u0441\u0442\u0440\u043e\u043a\u0443), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0432\u043e\u0434 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0431\u044b\u043b \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0445\u043b\u0430\u043c\u043b\u0451\u043d.<\/p>\n<p>  \u041c\u044b \u043f\u043e\u0448\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c: \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c malloc\/free, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0439. \u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043b\u0438 embox \u0441 pjsua \u0434\u043b\u044f beagleboard \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430 qemu. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u0442\u0440\u043e\u0438\u043b\u0438, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 200\u043a\u0431 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043a\u0443\u0447\u0443, \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 pjsua. \u0422\u0430\u043a\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0432 stm32f4 \u043d\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u043e\u0432 \u0431\u044b\u043b\u043e \u0434\u0432\u0430: \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c pjsua, \u043b\u0438\u0431\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443. <\/p>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0448\u043b\u0430\u0441\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u2014 \u0434\u0435\u043c\u043e-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 simpleua. \u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f simpleua \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0436\u0438\u0432\u043e\u0439 \u043a\u0443\u0447\u0438 \u043e\u043a\u043e\u043b\u043e 110\u043a\u0431. \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0441 .data (~4\u043a\u0431) \u0438 .bss (~25\u043a\u0431), \u0442\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0435\u0441\u0442\u0430 \u043f\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0442\u0435\u043a \u0438 \u043f\u043e\u0442\u043e\u043a\u0438, \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0430\u0443\u0434\u0438\u043e-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043a\u0443\u0447\u0438, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 (\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f 810 \u0431\u0430\u0439\u0442) \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0443. \u041c\u044b \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0431\u0430\u0433\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435 \u0438\u0445, \u0432\u044b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u044b. \u0410 \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043b\u044e\u0431\u044b\u043c \u043e\u0442\u0437\u044b\u0432\u0430\u043c \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/259721\/\"> http:\/\/habrahabr.ru\/post\/259721\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 sip-\u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 stm32f4-discovery \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0435\u0439 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u041e\u0421 <a href=\"http:\/\/embox.github.io\">Embox<\/a>. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 stm32f4-discovery (144MHz, 192Kb RAM, 1Mb ROM) \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u043c \u0441\u0430\u043c\u0438\u043c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043b\u0438? \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u043e, \u0430 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u2014 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/y2Eg_zwuI7M?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/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-258828","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258828","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=258828"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258828\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}