{"id":122,"date":"2018-06-12T10:05:55","date_gmt":"2018-06-12T10:05:55","guid":{"rendered":"https:\/\/hegars83.wordpress.com\/?p=122"},"modified":"2023-08-13T17:55:58","modified_gmt":"2023-08-13T07:55:58","slug":"asterisk-source-build","status":"publish","type":"post","link":"https:\/\/blog.hegars.com\/?p=122","title":{"rendered":"Asterisk Source Build"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Installation of Asterisk <\/span><\/p>\n<p><span style=\"font-weight: 400;\">AMI <\/span><\/p>\n<p><span style=\"font-weight: 400;\">https:\/\/wiki.debian.org\/Cloud\/AmazonEC2Image\/Jessie<\/span><\/p>\n<p><strong>PREREQS<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install vim screen -y<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install build-essential<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install linux-headers-$(uname -r)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install libxml2 libxml2-dev openssl libssl-dev libncurses5 libncurses5-dev libnewt0.52 libnewt-dev vim-nox libsqlite3-dev subversion<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Summary:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install build-essential linux-headers-$(uname -r) libxml2 libxml2-dev openssl libssl-dev libncurses5 libncurses5-dev libnewt0.52 libnewt-dev vim-nox libsqlite3-dev autoconf subversion<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install libmysqlclient18 mysql-common libmysqlclient-dev<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install unixODBC unixODBC-dev<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install uuid-dev<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> apt-get install libjansson4 libjansson-dev<\/span><br \/>\n<span style=\"font-weight: 400;\"> Libgsmme-dev<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> libgsm1-dev<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install pkg-config<\/span><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install pkg-config<\/span><br \/>\n<span style=\"font-weight: 400;\">apt-get install <\/span><span style=\"font-weight: 400;\">libmysqlclient18 mysql-common libmysqlclient-dev <\/span><span style=\"font-weight: 400;\">unixODBC unixODBC-dev uuid-dev libjansson4 libjansson-dev \u00a0Libgsmme-dev libgsm1-dev pkg-config -y<\/span><\/p>\n<p><strong>PJSIP <\/strong><\/p>\n<p><span style=\"font-weight: 400;\">apt-get install libpj2 libpjlib-util2 libpjsip2 libpjsua2<\/span><\/p>\n<p><span style=\"font-weight: 400;\">cd \/usr\/src\/<\/span><\/p>\n<p><span style=\"font-weight: 400;\">wget http:\/\/www.pjsip.org\/release\/2.x\/pjproject-2.x.tar.bz2<\/span><\/p>\n<p><span style=\"font-weight: 400;\">tar -jxvf pjproject-2.x.tar.bz2<\/span><\/p>\n<p><span style=\"font-weight: 400;\">cd pjproject-2.x<\/span><\/p>\n<p><span style=\"font-weight: 400;\">.\/configure &#8211;prefix=\/usr &#8211;enable-shared &#8211;disable-sound &#8211;disable-resample &#8211;disable-video &#8211;disable-opencore-amr CFLAGS=&#8217;-O2 -DNDEBUG&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">make dep &amp;&amp; make &amp;&amp; make install &amp;&amp; ldconfig<\/span><\/p>\n<p><span style=\"font-weight: 400;\">http:\/\/www.pjsip.org\/using.htm<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Apt-get install git<\/span><\/p>\n<p><span style=\"font-weight: 400;\">git clone -b 13 <\/span><a href=\"http:\/\/gerrit.asterisk.org\/asterisk\"><span style=\"font-weight: 400;\">http:\/\/gerrit.asterisk.org\/asterisk<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">git clone http:\/\/gerrit.asterisk.org\/asterisk asterisk<\/span><\/p>\n<p><strong>DAHDI install<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">wget http:\/\/downloads.asterisk.org\/pub\/telephony\/certified-asterisk\/asterisk-certified-13.8-current.tar.gz<\/span><\/p>\n<p><span style=\"font-weight: 400;\">tar -zxvf dahdi-linux-complete-current.tar.gz<\/span><\/p>\n<p><strong>Asterisk Install<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">cd \/usr\/src<\/span><\/p>\n<p><span style=\"font-weight: 400;\">wget <\/span><a href=\"http:\/\/downloads.asterisk.org\/pub\/telephony\/certified-asterisk\/asterisk-certified-13.8-current.tar.gz\"><span style=\"font-weight: 400;\">http:\/\/downloads.asterisk.org\/pub\/telephony\/certified-asterisk\/asterisk-certified-13.8-current.tar.gz<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\"> tar -zxvf asterisk-certified-13.8-current.tar.gz<\/span><\/p>\n<p><span style=\"font-weight: 400;\">cd asterisk-certified-13.8-cert2\/<\/span><\/p>\n<p><span style=\"font-weight: 400;\">.\/contrib\/scripts\/install_prereq install<\/span><\/p>\n<p><span style=\"font-weight: 400;\">.\/contrib\/scripts\/get_mp3_source.sh<\/span><\/p>\n<p><span style=\"font-weight: 400;\">.\/bootstrap<\/span><\/p>\n<p><span style=\"font-weight: 400;\">.\/configure<\/span><\/p>\n<p><span style=\"font-weight: 400;\">make menuconfig<\/span><\/p>\n<p><span style=\"font-weight: 400;\">make<\/span><\/p>\n<p><span style=\"font-weight: 400;\">make install <\/span><\/p>\n<p><span style=\"font-weight: 400;\">make samples<\/span><\/p>\n<p><span style=\"font-weight: 400;\">make config<\/span><\/p>\n<p><strong>HOMER INSTALL<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">sudo apt-get install git build-essential autoconf -y<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">cd \/usr\/src\/<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">git clone https:\/\/github.com\/sipcapture\/homer.git<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">cd homer<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">git submodule init<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">git submodule update &#8211;init &#8211;recursive<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">git submodule foreach git pull origin master<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">autoreconf -if<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">mkdir -p build<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">cd build<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">..\/configure &#8211;enable-deb<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">make setup.sh<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">export PATH=\/usr\/local\/bin:\/usr\/local\/sbin:\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/root\/bin<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">sudo .\/setup.sh<\/span><\/p>\n<h6><i><span style=\"font-weight: 400;\">Debian 8 (Jessie)<\/span><\/i><\/h6>\n<p><span style=\"font-weight: 400;\">make debian-jessie-x86_64.homer.deb<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ip-10-0-32-100*CLI&gt; <\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0== Using SIP RTP CoS mark 5<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Executing [639230990430@OSsites:1] Answer(&#8220;SIP\/10.0.33.45-00000009&#8221;, &#8220;&#8221;) in new stack<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&gt; 0x7ff408013ee0 &#8212; Probation passed &#8211; setting RTP source address to 10.0.33.45:10368<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Executing [639230990430@OSsites:2] Dial(&#8220;SIP\/10.0.33.45-00000009&#8221;, &#8220;SIP\/6700&#8221;) in new stack<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0== Using SIP RTP CoS mark 5<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Called SIP\/6700<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; SIP\/10.0.33.45-00000009 requested media update control 20, passing it to SIP\/6700-0000000a<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; SIP\/6700-0000000a answered SIP\/10.0.33.45-00000009<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/10.0.33.45-00000009 joined &#8216;simple_bridge&#8217; basic-bridge &lt;500329ef-a05b-40e7-8dd5-cfaedc31a45f&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/6700-0000000a joined &#8216;simple_bridge&#8217; basic-bridge &lt;500329ef-a05b-40e7-8dd5-cfaedc31a45f&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&gt; Bridge 500329ef-a05b-40e7-8dd5-cfaedc31a45f: switching from simple_bridge technology to native_rtp<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&gt; 0x7ff47c007150 &#8212; Probation passed &#8211; setting RTP source address to 192.168.81.254:16386<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/10.0.33.45-00000009 left &#8216;native_rtp&#8217; basic-bridge &lt;500329ef-a05b-40e7-8dd5-cfaedc31a45f&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/6700-0000000a left &#8216;native_rtp&#8217; basic-bridge &lt;500329ef-a05b-40e7-8dd5-cfaedc31a45f&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0== Spawn extension (OSsites, 639230990430, 2) exited non-zero on &#8216;SIP\/10.0.33.45-00000009&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ip-10-0-33-45*CLI&gt; <\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0== Using SIP RTP CoS mark 5<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Executing [639230990430@public:1] Answer(&#8220;SIP\/205.207.0.82-0000000b&#8221;, &#8220;&#8221;) in new stack<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&gt; 0x7f879c004140 &#8212; Probation passed &#8211; setting RTP source address to 205.207.0.82:24048<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Executing [639230990430@public:2] Dial(&#8220;SIP\/205.207.0.82-0000000b&#8221;, &#8220;SIP\/10.0.32.100\/639230990430&#8221;) in new stack<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0== Using SIP RTP CoS mark 5<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Called SIP\/10.0.32.100\/639230990430<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; SIP\/10.0.32.100-0000000c answered SIP\/205.207.0.82-0000000b<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/205.207.0.82-0000000b joined &#8216;simple_bridge&#8217; basic-bridge &lt;1cdee761-e16e-4760-b572-b4e214adba4b&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/10.0.32.100-0000000c joined &#8216;simple_bridge&#8217; basic-bridge &lt;1cdee761-e16e-4760-b572-b4e214adba4b&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&gt; Bridge 1cdee761-e16e-4760-b572-b4e214adba4b: switching from simple_bridge technology to native_rtp<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/205.207.0.82-0000000b left &#8216;native_rtp&#8217; basic-bridge &lt;1cdee761-e16e-4760-b572-b4e214adba4b&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0== Spawn extension (public, 639230990430, 2) exited non-zero on &#8216;SIP\/205.207.0.82-0000000b&#8217;<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&#8212; Channel SIP\/10.0.32.100-0000000c left &#8216;native_rtp&#8217; basic-bridge &lt;1cdee761-e16e-4760-b572-b4e214adba4b&gt;<\/span><\/p>\n<h1>Building unsupported cards,<\/h1>\n<p>Although the TDM410 and the TDM800 are no longer &#8216;supported&#8217; they can be made to work to get yourself out of a mess.<\/p>\n<p>Warning: You&#8217;re on your own with support.<\/p>\n<p>The example here is using DAHDI 3.1.0 as I found myself in the same mess.<\/p>\n<p>In file\u00a0<code>dahdi-linux-complete-3.1.0+3.1.0\/linux\/drivers\/dahdi\/wctdm24xxp\/base.c<\/code>\u00a0add back in the PCI devices for the TDM410 and the TDM800 in my case.<\/p>\n<pre><code>static DEFINE_PCI_DEVICE_TABLE(wctdm_pci_tbl) = {\n    { 0xd161, 0x2400, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wctdm2400 },\n    **{ 0xd161, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wctdm800 },**\n    { 0xd161, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wcaex800 },\n    { 0xd161, 0x8003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wcaex2400 },\n    **{ 0xd161, 0x8005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wctdm410 },**\n    { 0xd161, 0x8006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wcaex410 },\n    { 0xd161, 0x8007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wcha80000 },\n    { 0xd161, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &amp;wchb80000 },\n    { 0 }\n};<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Installation of Asterisk AMI https:\/\/wiki.debian.org\/Cloud\/AmazonEC2Image\/Jessie PREREQS apt-get install vim screen -y apt-get install build-essential apt-get install linux-headers-$(uname -r) apt-get install libxml2 libxml2-dev openssl libssl-dev libncurses5 libncurses5-dev libnewt0.52 libnewt-dev vim-nox libsqlite3-dev subversion Summary: apt-get install build-essential linux-headers-$(uname -r) libxml2 libxml2-dev openssl libssl-dev libncurses5 libncurses5-dev libnewt0.52 libnewt-dev vim-nox libsqlite3-dev autoconf subversion apt-get install libmysqlclient18 mysql-common libmysqlclient-dev apt-get [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[4,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":3,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":2414,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions\/2414"}],"wp:attachment":[{"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hegars.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}