{"id":757,"date":"2011-01-17T09:03:00","date_gmt":"2011-01-17T07:03:00","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=757"},"modified":"2011-01-17T09:09:51","modified_gmt":"2011-01-17T07:09:51","slug":"addpacasterisk-%d0%bd%d0%b5%d1%81%d0%ba%d0%be%d0%bb%d1%8c%d0%ba%d0%be-%d0%bb%d0%b8%d0%bd%d0%b8%d0%b9-%d0%bd%d0%b0-%d0%b2%d1%85%d0%be%d0%b4-%d0%b8-%d0%b2%d1%8b%d1%85%d0%be%d0%b4","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=757","title":{"rendered":"Addpac+asterisk: \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u043d\u0438\u0439 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438 \u0432\u044b\u0445\u043e\u0434"},"content":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0441\u0432\u044f\u0437\u043a\u0443 <strong>addpac&#8217;a<\/strong> \u0438 <strong>asterisk&#8217;a<\/strong>. \u041a <strong>addpac&#8217;y<\/strong> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b 3 \u043b\u0438\u043d\u0438\u0438. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0431\u044b \u0432\u0441\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0430 \u043e\u0434\u0438\u043d \u043d\u043e\u043c\u0435\u0440, \u0430 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u0438 3 \u043b\u0438\u043d\u0438\u0438, \u043f\u0440\u0438\u0447\u0451\u043c, \u0435\u0441\u043b\u0438 \u0437\u0430\u043d\u044f\u0442\u0430 \u043f\u0435\u0440\u0432\u0430\u044f, \u0442\u043e \u0437\u0432\u043e\u043d\u043e\u043a \u0438\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437 2-\u0443\u044e, \u0435\u0441\u043b\u0438 2-\u0430\u044f &#8211; \u0442\u043e \u0447\u0435\u0440\u0435\u0437 3-\u044e.<\/p>\n<p><!--more--><\/p>\n<p><strong><em><span style=\"color: #008000;\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434:<\/span><\/em><\/strong> <strong>FreeBSD 6.2, asterisk 1.4.18, addpac AP1100F<\/strong>, 3 \u043c\u0435\u0434\u043d\u044b\u0445 \u043b\u0438\u043d\u0438\u0438.<\/p>\n<p><strong>IP(addpac)=10.10.10.1, IP(asterisk)=10.10.10.4<\/strong><\/p>\n<p><strong><span style=\"color: #ff0000;\">1) \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Addpac.<\/span><\/strong><\/p>\n<p>\u0427\u0442\u043e \u0431\u044b \u0437\u0432\u043e\u043d\u043a\u0438 \u0441 3-\u0438\u0445 \u043b\u0438\u043d\u0438\u0439 \u0448\u043b\u0438 \u043d\u0430 \u043e\u0434\u0438\u043d \u043d\u043e\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e \u0431\u044b \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 <strong>connection plar<\/strong>. <strong>Addpac<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0437\u0432\u043e\u043d\u0438\u0442\u044c \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c <strong>501<\/strong>. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a (\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 3 \u043f\u043e\u0440\u0442\u0430 &#8211; <strong>0\/0,0\/1,0\/2<\/strong>):<\/p>\n<p><code>! FXO<br \/>\nvoice-port 0\/0<br \/>\nconnection plar 501<br \/>\ndescription line-1<br \/>\ntimeout tterm 600<br \/>\nring detect-timeout 40<br \/>\ncaller-id enable<br \/>\n!<br \/>\n!<br \/>\n! FXO<br \/>\nvoice-port 0\/1<br \/>\nconnection plar 501<br \/>\ndescription line-2<br \/>\ntimeout tterm 600<br \/>\nring detect-timeout 40<br \/>\ncaller-id enable<br \/>\n!<br \/>\n!<br \/>\n! FXO<br \/>\nvoice-port 0\/2<br \/>\nconnection plar 501<br \/>\ndescription line-3<br \/>\ntimeout tterm 600<br \/>\nring detect-timeout 40<br \/>\ncaller-id enable<\/code><\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 <strong>Pots peer<\/strong> \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0432\u043e\u043d\u043a\u043e\u0432 (\u0437\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>preference<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0441\u0442\u044c):<\/p>\n<p><code>dial-peer voice 0 pots<br \/>\ndestination-pattern T<br \/>\nport 0\/0<br \/>\npreference 1<br \/>\nhuntstop<br \/>\n!<br \/>\ndial-peer voice 1 pots<br \/>\ndestination-pattern T<br \/>\nport 0\/1<br \/>\npreference 2<br \/>\nhuntstop<br \/>\n!<br \/>\ndial-peer voice 2 pots<br \/>\ndestination-pattern T<br \/>\nport 0\/2<br \/>\npreference 3<br \/>\nhuntstop<\/code><\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<p><code>! Voip peer configuration.<br \/>\n!<br \/>\ndial-peer voice 1000 voip<br \/>\ndestination-pattern .T<br \/>\nsession target sip-server<br \/>\nsession protocol sip<br \/>\ncodec g711alaw<br \/>\ndtmf-relay rtp-2833<br \/>\nno vad<br \/>\nhuntstop<\/code><\/p>\n<p><code>sip-ua<br \/>\nuser-register<br \/>\nsip-server 10.10.10.4<\/code><\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p><strong><span style=\"color: #ff0000;\">2) \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c asterisk.<\/span><\/strong><\/p>\n<p>\u0412 <strong>sip.conf<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0438\u0440 <strong>addpac<\/strong> \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0432\u043e\u043d\u043a\u043e\u0432:<\/p>\n<p><code>[addpac]<br \/>\ntype=friend<br \/>\nhost=10.10.10.1<br \/>\nnat=no<br \/>\ndtmfmode=rfc2833<br \/>\ncontext=default<br \/>\ndisallow=all<br \/>\nallow=alaw<\/code><\/p>\n<p>\u0412 <strong>extensions.conf<\/strong>, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 <strong>default<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u043e\u0435 (\u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u043d\u0430 \u0433\u043e\u0440\u043e\u0434):<\/p>\n<p><code>exten =&gt; _7XXXXX,1,Dial(SIP\/addpac\/${EXTEN},100)<br \/>\nexten =&gt; _7XXXXX,n,HangUp<br \/>\n<\/code><br \/>\n\u041f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0432\u043e\u043d\u043a\u0438.<\/p>\n<p><strong><span style=\"color: #ff0000;\">3) \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a.<\/span><\/strong><\/p>\n<p>\u0412\u043e\u0442 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u043b\u0430\u0434\u043e\u043a:<\/p>\n<p>&#8211; \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u043b\u0438 <strong>Addpac<\/strong> \u043d\u0430 <strong>asterisk&#8217;e<\/strong>. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 <strong>sip show peers<\/strong><\/p>\n<p>&#8211; \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u0435\u0431\u0430\u0433 \u043d\u0430 <strong>addpac&#8217;e<\/strong> \u0438 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0432\u043e\u043d\u0438\u0442\u044c:<\/p>\n<p><code># conf<br \/>\n(config)# debug-port<br \/>\n(config)# exit<br \/>\n# debug voip call ext<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043f\u043e\u0441\u044b\u043f\u0435\u0442\u0441\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u043e\u0433 \u0437\u0432\u043e\u043d\u043a\u0430.<\/p>\n<p>&#8211; \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0435\u0431\u0430\u0433 \u043d\u0430 <strong>Asterisk&#8217;e<\/strong>:<\/p>\n<p><code>&gt; sip debug ip 10.10.10.1<\/code><\/p>\n<p><em><span style=\"color: #800080;\">\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 root.ua<\/span><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0441\u0432\u044f\u0437\u043a\u0443 addpac&#8217;a \u0438 asterisk&#8217;a. \u041a addpac&#8217;y \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b 3 \u043b\u0438\u043d\u0438\u0438. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u0431\u044b \u0432\u0441\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0432\u043e\u043d\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0430 \u043e\u0434\u0438\u043d \u043d\u043e\u043c\u0435\u0440, \u0430 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u0438 3 \u043b\u0438\u043d\u0438\u0438, \u043f\u0440\u0438\u0447\u0451\u043c, \u0435\u0441\u043b\u0438 \u0437\u0430\u043d\u044f\u0442\u0430 \u043f\u0435\u0440\u0432\u0430\u044f, \u0442\u043e \u0437\u0432\u043e\u043d\u043e\u043a \u0438\u0434\u0451\u0442 \u0447\u0435\u0440\u0435\u0437 2-\u0443\u044e, \u0435\u0441\u043b\u0438 2-\u0430\u044f &#8211; \u0442\u043e \u0447\u0435\u0440\u0435\u0437 3-\u044e.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-757","post","type-post","status-publish","format-standard","hentry","category-telephony"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=757"}],"version-history":[{"count":4,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/757\/revisions"}],"predecessor-version":[{"id":761,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/757\/revisions\/761"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}