{"id":67,"date":"2015-01-03T21:11:39","date_gmt":"2015-01-03T21:11:39","guid":{"rendered":"http:\/\/www.otakudang.org\/?p=67"},"modified":"2015-02-03T16:29:26","modified_gmt":"2015-02-03T16:29:26","slug":"elastix-problem-pin-sets-ditanyakan-2-kali","status":"publish","type":"post","link":"https:\/\/www.otakudang.org\/?p=67","title":{"rendered":"[Elastix] Problem PIN Sets Ditanyakan 2 Kali"},"content":{"rendered":"<p>Problem ini muncul dalam instalasi Elastix 2.5 dengan Asterisk versi 11.14.1. Jika ditelusuri, maka problem ini berawal dari generate otomatis <strong>[macro-pinsets]<\/strong> oleh file <strong>\/var\/www\/html\/admin\/modules\/pinsets\/functions.inc.php<\/strong>, terutama di baris:<\/p>\n<p>[code language=&#8221;bash&#8221;]\/\/ write out a macro that handles the authenticate<br \/>\n$ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;s&#8217;, &#8221;, new ext_gotoif(&#8216;${ARG2} = 1&#8242;,&#8217;cdr,1&#8217;));<br \/>\n$ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;s&#8217;, &#8221;, new ext_execif(&#8216;$[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]&#8217;, &#8216;Authenticate&#8217;,$asterisk_conf[&#8216;astetcdir&#8217;].&#8217;\/pinset_${ARG1}&#8217;));<br \/>\n$ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;s&#8217;, &#8221;, new ext_execif(&#8216;$[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]&#8217;, &#8216;ResetCDR&#8217;));<br \/>\n\/\/ authenticate with the CDR option (a)<br \/>\n$ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;cdr&#8217;, &#8221;, new ext_execif(&#8216;$[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]&#8217;, &#8216;Authenticate&#8217;,$asterisk_conf[&#8216;astetcdir&#8217;].&#8217;\/pinset_${ARG1},a&#8217;));<br \/>\n$ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;cdr&#8217;, &#8221;, new ext_execif(&#8216;$[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]&#8217;, &#8216;ResetCDR&#8217;));<br \/>\n[\/code]<\/p>\n<p>Entah kenapa, baris di atas akan menambahkan rule PIN Set dua kali ke dalam <strong>extensions_additional.conf<\/strong>. Sehingga yang perlu dilakukan adalah me<em>remark<\/em> di semua baris tersebut (dengan \/\/). Setelah itu edit file\u00a0<strong>extensions_custom.conf<\/strong>, tambahkan baris berikut (edit dari menu file editor Elastix GUI):<\/p>\n<p>[code language=&#8221;bash&#8221;][macro-pinsets]<br \/>\nexten =&gt; s,1,GotoIf(${ARG2} = 1?cdr,1)<br \/>\nexten =&gt; s,n,ExecIf($[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]?Authenticate(\/etc\/asterisk\/pinset_${ARG1}))<br \/>\nexten =&gt; s,n,ExecIf($[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]?ResetCDR())<\/p>\n<p>exten =&gt; cdr,1,ExecIf($[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]?Authenticate(\/etc\/asterisk\/pinset_${ARG1},a))<br \/>\nexten =&gt; cdr,n,ExecIf($[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]?ResetCDR())<\/p>\n<p>[\/code]<\/p>\n<p>setelah itu klik\u00a0<strong>Save\u00a0<\/strong>dan\u00a0<strong>Reload Asterisk<\/strong>. Dan terakhir, aktifkan module PIN Sets di call route (tidak akan dibahas di sini, bisa search di internet untuk langkah-langkahnya). Lakukan test, maka IP PBX hanya akan menanyakan PIN satu kali.<\/p>\n<p>Solusi di atas\u00a0bukan solusi permanen. Hanya sekedar workaround supaya &#8220;nampak&#8221; normal. Untuk selanjutnya, Elastix perlu diupdate dengan versi FreePBX atau Asterisk yang sudah memperbaiki bug ini. Sudah beberapa orang yang submit bug tersebut. Tapi sampai dengan penulisan ini, bug tersebut belum hilang. Kita tunggu saja patch dari mereka.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem ini muncul dalam instalasi Elastix 2.5 dengan Asterisk versi 11.14.1. Jika ditelusuri, maka problem ini berawal dari generate otomatis [macro-pinsets] oleh file \/var\/www\/html\/admin\/modules\/pinsets\/functions.inc.php, terutama di baris: [code language=&#8221;bash&#8221;]\/\/ write out a macro that handles the authenticate $ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;s&#8217;, &#8221;, new ext_gotoif(&#8216;${ARG2} = 1&#8242;,&#8217;cdr,1&#8217;)); $ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;s&#8217;, &#8221;, new ext_execif(&#8216;$[&quot;${DB(AMPUSER\/${AMPUSER}\/pinless)}&quot; != &quot;NOPASSWD&quot;]&#8217;, &#8216;Authenticate&#8217;,$asterisk_conf[&#8216;astetcdir&#8217;].&#8217;\/pinset_${ARG1}&#8217;)); $ext-&amp;gt;add(&#8216;macro-pinsets&#8217;, &#8216;s&#8217;, &#8221;, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.otakudang.org\/?p=67\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;[Elastix] Problem PIN Sets Ditanyakan 2 Kali&#8221;<\/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":[5],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-asterisk","entry"],"_links":{"self":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=67"}],"version-history":[{"count":11,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":84,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=\/wp\/v2\/posts\/67\/revisions\/84"}],"wp:attachment":[{"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.otakudang.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}