{"id":349,"date":"2010-11-24T15:21:44","date_gmt":"2010-11-24T14:21:44","guid":{"rendered":""},"modified":"2018-11-01T11:07:07","modified_gmt":"2018-11-01T10:07:07","slug":"installing-freeswitch-debian-lenny","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/installing-freeswitch-debian-lenny\/","title":{"rendered":"Installing FreeSWITCH on debian (lenny)"},"content":{"rendered":"<p>There are lot of guides about installing FreeSwitch on Debian\/Ubuntu. The official guide is at <a href=\"http:\/\/wiki.freeswitch.org\/wiki\/Installation_Guide#Debian_Linux\">http:\/\/wiki.freeswitch.org\/wiki\/Installation_Guide#Debian_Linux<\/a> and another is at <a href=\"http:\/\/www.howtoforge.com\/setting-up-freeswitch-on-debian-5-lenny\">howtoforge<\/a>. Ubuntu has deb packages even  and we may use apt-get install (so easy). Debian lenny does not have bin packages. So we will install the freeswitch from the source.<\/p>\n<h2>Install prerequisities<\/h2>\n<p>During the process of compilation we may use any of following packages, so we will install them<\/p>\n<pre>\r\napt-get install subversion git-core build-essential automake autoconf libtool wget make libncurses5 libncurses5-dev  \\\r\n                libgdbm-dev libdb-dev libperl-dev zlib1g-dev libtiff4-dev libjpeg62-dev debhelper         \\\r\n                unixodbc-dev libasound2-dev libcurl4-openssl-dev libssl-dev libogg-dev libvorbis-dev      \\\r\n                libgdbm-dev libgnutls-dev devscripts curl pkg-config\r\n<\/pre>\n<h2>Downloading source files<\/h2>\n<p>We download SVN files from the freeswitch.org (aprox. 300MB), so it wil take a while (freeswitch version 1.0.4)<\/p>\n<pre>\r\ncd \/usr\/src\/\r\nsvn checkout http:\/\/svn.freeswitch.org\/svn\/freeswitch\/trunk freeswitch\r\n<\/pre>\n<h2>Building binaries<\/h2>\n<p>Go to the folder containing source files<\/p>\n<pre>\r\ncd freeswitch\r\n<\/pre>\n<p>Check dependencies, if something are missing, install it<\/p>\n<pre>\r\ndpkg-checkbuilddeps\r\ndpkg-checkbuilddeps: Unmet build dependencies: libx11-dev uuid-dev\r\n<\/pre>\n<p>In my case it is missing libx11-dev and uuid-dev, so i&#8217;ll install them<\/p>\n<pre>\r\napt-get install libx11-dev uuid-dev\r\n<\/pre>\n<p>now it should be Ok<\/p>\n<pre>\r\nserver:\/usr\/src\/freeswitch# dpkg-checkbuilddeps\r\nserver:\/usr\/src\/freeswitch#\r\n<\/pre>\n<p>now we start building packages, I&#8217;m using xen virtual server (2xCPU and 512MB of RAM, so it will take a while, preciselly 3,5 hours<\/p>\n<pre>\r\n dpkg-buildpackage -rfakeroot\r\n<\/pre>\n<p>or<\/p>\n<pre>\r\ndebuild -i -us -uc -b\r\n<\/pre>\n<p>When the process have finished, one folder up we will find deb packages, which we should install now. The folder with src files we may remve now (\/usr\/src\/freeswitch)<\/p>\n<pre>\r\nserver:\/usr\/src\/freeswitch# cd ..\r\nserver:\/usr\/src# ls -al\r\ntotal 75808\r\ndrwxrwsr-x  3 root src      4096 2010-11-24 18:47 .\r\ndrwxr-xr-x 11 root root     4096 2010-10-04 11:30 ..\r\ndrwxr-sr-x 21 root src     12288 2010-11-24 18:35 freeswitch\r\n-rw-r--r--  1 root src      7531 2010-11-24 18:47 freeswitch_1.0.4-1ubuntu2_amd64.changes\r\n-rw-r--r--  1 root src   3707826 2010-11-24 18:47 freeswitch_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src      1275 2010-11-24 15:41 freeswitch_1.0.4-1ubuntu2.dsc\r\n-rw-r--r--  1 root src  59732666 2010-11-24 15:41 freeswitch_1.0.4-1ubuntu2.tar.gz\r\n-rw-r--r--  1 root src     22730 2010-11-24 18:47 freeswitch-codec-passthru-amr_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     22800 2010-11-24 18:47 freeswitch-codec-passthru-g7231_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     22812 2010-11-24 18:47 freeswitch-codec-passthru-g729_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src   4956476 2010-11-24 18:47 freeswitch-dbg_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src   7943348 2010-11-24 18:47 freeswitch-dev_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     28158 2010-11-24 18:47 freeswitch-lang-de_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     31484 2010-11-24 18:47 freeswitch-lang-en_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     26414 2010-11-24 18:47 freeswitch-lang-es_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     29286 2010-11-24 18:47 freeswitch-lang-fr_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     25990 2010-11-24 18:47 freeswitch-lang-it_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     25986 2010-11-24 18:47 freeswitch-lang-nl_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src     38510 2010-11-24 18:47 freeswitch-lang-ru_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src    147748 2010-11-24 18:47 freeswitch-lua_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src    164040 2010-11-24 18:47 freeswitch-perl_1.0.4-1ubuntu2_amd64.deb\r\n-rw-r--r--  1 root src    518892 2010-11-24 18:47 freeswitch-spidermonkey_1.0.4-1ubuntu2_amd64.deb\r\n\r\n<\/pre>\n<p>Comparing to the guide which talks about following packages<\/p>\n<pre><span class=\"system\">Description: Freeswitch - The FreeSWITCH open source telephony platform freeswitch-codec-passthru-amr - Pass through AMR Codec support for the FreeSWITCH(TM) freeswitch-codec-passthru-g7231 - Pass through g723.1 Codec support for the FreeSWITCH(TM) freeswitch-codec-passthru-g729 - Pass through g729 Codec support for the FreeSWITCH(TM) freeswitch-dbg - The FreeSWITCH(TM) open source telephony platform Debug symbols freeswitch-dev - Development Package for the FreeSWITCH(TM) freeswitch-lang-de - German language files for the FreeSWITCH(TM) freeswitch-lang-en - English language files for the FreeSWITCH(TM) freeswitch-lang-es - Spanish language files for the FreeSWITCH(TM) freeswitch-lang-fr - French language files for the FreeSWITCH(TM) freeswitch-lang-it - Italian language files for the FreeSWITCH(TM) freeswitch-lang-nl - Dutch language files for the FreeSWITCH(TM) freeswitch-lua - A lua engine for FreeSWITCH(TM) freeswitch-perl - A perl engine for FreeSWITCH(TM) freeswitch-sounds-en-us-callie-16000 - English language files for the FreeSWITCH(TM) (16000) freeswitch-sounds-en-us-callie-32000 - English language files for the FreeSWITCH(TM) (32000) freeswitch-sounds-en-us-callie-8000 - English language files for the FreeSWITCH(TM) freeswitch-sounds-music-8000 - Music on hold files for the FreeSWITCH(TM) (8000) freeswitch-spidermonkey - A Javascript engine for FreeSWITCH(TM)<\/span><\/pre>\n<p>I&#8217;m missing all freeswitch-sound* packages<\/p>\n<h2>Installing packages<\/h2>\n<p>Now we will install binary packages, I will install all with en lang and excepting other lang packages<\/p>\n<pre>\r\ndpkg -i freeswitch_1.0.4-1ubuntu2_amd64.deb freeswitch-codec-passthru-amr_1.0.4-1ubuntu2_amd64.deb&nbsp; \/\r\nfreeswitch-codec-passthru-g7231_1.0.4-1ubuntu2_amd64.deb freeswitch-codec-passthru-g729_1.0.4-1ubuntu2_amd64.deb&nbsp;&nbsp; \/ \r\nfreeswitch-dbg_1.0.4-1ubuntu2_amd64.deb freeswitch-dev_1.0.4-1ubuntu2_amd64.deb &nbsp; \/\r\nfreeswitch-lang-en_1.0.4-1ubuntu2_amd64.deb freeswitch-lua_1.0.4-1ubuntu2_amd64.deb &nbsp; \/\r\nfreeswitch-perl_1.0.4-1ubuntu2_amd64.deb freeswitch-spidermonkey_1.0.4-1ubuntu2_amd64.deb\r\n<\/pre>\n<h2>Setting up FreeSWITCH server<\/h2>\n<p>we need to initiate freeswitch daemon and during installation of freeswitch packages we are informed about that<\/p>\n<pre>\r\nFreeSwitch Voice Switching System not enabled yet. Edit \/etc\/default\/freeswitch first.\r\n<\/pre>\n<p>so open the file and change FREESWITCH_ENABLED parameters from false to true<\/p>\n<pre>\r\nvim \/etc\/default\/freeswitch\r\n<\/pre>\n<pre>\r\n# Startup settings for FreeSWITCH\r\n\r\n# Enable initd (let init handle start and stop of freeswitch).\r\n# Set to &quot;true&quot; (lowercase) to enable.\r\n\r\nFREESWITCH_ENABLED=&quot;true&quot;\r\n<\/pre>\n<p>now we may start the freeswitch service<\/p>\n<pre>\r\nserver:\/home\/palo\/freeswitch# \/etc\/init.d\/freeswitch start\r\nserver:\/home\/palo\/freeswitch# 17626 Backgrounding.<\/pre>\n<p>we should check if the freeswitch is running (new command for me)<\/p>\n<pre>\r\nserver:\/home\/palo\/freeswitch# <span>lsof -i udp <\/span>COMMAND     PID       USER   FD   TYPE DEVICE SIZE NODE NAME\r\nportmap    1941     daemon    4u  IPv4   4265       UDP *:sunrpc\r\nrpc.statd  1958      statd    5u  IPv4   4320       UDP *:862\r\nrpc.statd  1958      statd    7u  IPv4   4328       UDP *:56801\r\nsnmpd      2785       snmp    7u  IPv4   5980       UDP localhost:snmp\r\nfreeswitc 17630 freeswitch    4u  IPv4 354573       UDP server.freeswitch.local:54680-&gt;gw.netlab.kis.fri.uniza.sk:5351\r\nfreeswitc 17630 freeswitch   36u  IPv6 355409       UDP [2001:4118:300:122:b077:48ff:fe9d:5524]:sip\r\nfreeswitc 17630 freeswitch   39u  IPv4 355430       UDP server.freeswitch.local:5080\r\nfreeswitc 17630 freeswitch   43u  IPv4 355445       UDP server.freeswitch.local:sip\r\n<\/pre>\n<p>or<\/p>\n<pre>\r\nserver:\/home\/palo\/freeswitch# <span>ps afx | grep free <\/span>24718 pts\/1    S+     0:00  |                               \\_ tee ..\/freeswitch_1.0.4-1ubuntu2_amd64.build\r\n 7139 pts\/1    S+     0:53  |                                       \\_ \/bin\/sh .\/configure --prefix=\/opt\/free \r\n...\r\n...\r\n...\r\n<\/pre>\n<p>look it is running. We may continue.<\/p>\n<h2>Configuring the FreeSWITCH<\/h2>\n<p>Soon&#8230;<\/p>","protected":false},"excerpt":{"rendered":"<p>There are lot of guides about installing FreeSwitch on Debian\/Ubuntu. The official guide is at <a href=\"http:\/\/wiki.freeswitch.org\/wiki\/Installation_Guide#Debian_Linux\">http:\/\/wiki.freeswitch.org\/wiki\/Installation_Guide#Debian_Linux<\/a> and another is at <a href=\"http:\/\/www.howtoforge.com\/setting-up-freeswitch-on-debian-5-lenny\">howtoforge<\/a>. Ubuntu has deb packages even  and we may use apt-get install (so easy). Debian lenny does not have bin packages. So we will install the freeswitch from the source.<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[779],"tags":[],"class_list":["post-349","post","type-post","status-publish","format-standard","hentry","category-freeswitch-en"],"taxonomy_info":{"category":[{"value":779,"label":"FreeSWITCH"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":2,"category_info":[{"term_id":779,"name":"FreeSWITCH","slug":"freeswitch-en","term_group":0,"term_taxonomy_id":777,"taxonomy":"category","description":"","parent":771,"count":2,"filter":"raw","cat_ID":779,"category_count":2,"category_description":"","cat_name":"FreeSWITCH","category_nicename":"freeswitch-en","category_parent":771}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=349"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/349\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}