There is now a complete script to do all this for you with minimal input!
updated Thursday 19th Feb 2009
updated Wed 28th January 2009
updated Sat 23rd August 2008
Matt Chipman email@example.com
This guide will help you to install a voip server running …
We will be using the default install of Debian and installing Asterisk from source and compiling. Freepbx will be downloaded from the website and installed.
Debian is the operating system, Asterisk is the PBX and Freepbx is the configuration tool (web GUI) for Asterisk. We have chosen to use these three tools because …
Debian in my opinion is the best Linux distribution, Asterisk is the best PBX available to us and Freepbx is the best config tool. I have used all these things in the past and find them a great combination as do many others.
We really need to appreciate all the people who give us this great software free of charge, they are truly generous.
Consider that if you use a setup like this in a business with 5 or more phones, you can save thousands of dollars a year in call costs, hardware and licensing. Think about donating a portion of that money to some of the companies in this document so they can keep developing great applications like these.
If you are not able to donate, consider helping out the open source community in other ways.
I am comfortable with where this document is however I am sure something is missing and it may not work for everyone. If you do come across errors or something you think should be included, write a comment or send me an email. I do try to update as things are brought to my attention.
I have reinstalled using this doc from scratch many times to iron out all the bugs. I am not responsible for anything that goes wrong, so dont blame me. This is a complete install. Following this doco on an existing OS probably will give you strange issues, with those, you are on your own. If you follow all the instructions, you are going to wipe everything on your hard disk. Be aware of that and don't use your family photo's hard disk.
Some will disagree on the CPU requirements mentioned here and I am not going to argue about that. What I will say is that for a 100 person call center, this pc is not going to cut it. In all cases, monitor the cpu and memory usage on your machine under different call loads. The easiest way to do that is to login to the console and run “top”
Fortunately for us, freePBX has a nice monitoring utility on the main page to help.
This howto was written from a bare metal install and took many days to research, install and document. It should take you considerably less time to get running. Somewhere around the 3 hour mark you should be able to dial a couple of extensions. Following this, the configuration fun is endless.
This howto is not a magic bullet. Finishing this howto will ensure you have a working VOIP server that you can add extentions and communicate between them. There are no hardware components required (other than the machine itself) You will also be able to add conference rooms and communicate with the outside world. Heading over to someone like Nerd Vittles will remind you how much more can be done with Asterisk.
Yes, this is a solid and stable build suitable for deployment in an office environment. Be aware there is no security in its basic form. Things such as firewalls and usernames and passwords should be added to protect the box from bad things. That is a whole other document.
If you are not familiar with Debian, have a look at the step by step Debian install document installing_debian_etch then come back here and continue.
After doing the above, we need to get Asterisk from the Digium website. We use the source and compile it ourselves.
At this point we are going to get the source files so make sure you are logged in as root and change to the linux src directory
To get Asterisk Goto the asterisk download web page and check what version is currently released as stable. (currently 22.214.171.124)
wget -c http://downloads.digium.com/pub/asterisk/releases/asterisk-126.96.36.199.tar.gz
Get DADHI Linux
wget -c http://downloads.digium.com/pub/telephony/dahdi-linux/releases/dahdi-linux-188.8.131.52.tar.gz
Get DAHDI Tools
wget -c http://downloads.digium.com/pub/telephony/dahdi-tools/releases/dahdi-tools-184.108.40.206.tar.gz
wget -c http://downloads.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz
wget -c http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.4.7.tar.gz
Because we are installing from source, they (the source files) will rely on other components of the operating system. The build environment sets up those other components so there wont be errors during the building of the source.
Install build environment
aptitude install linux-source aptitude install kernel-package aptitude install g++ aptitude install libncurses5-dev aptitude install linux-kernel-headers aptitude install sqlite aptitude install libnewt-dev aptitude install libusb-dev aptitude install zlib1g-dev aptitude install libmysqlclient15-dev aptitude install libsqlite0-dev
Now we configure the linux-source that we just downloaded, the other apps have been already been configured by Debian.
cd /usr/src tar -xjf linux-source-(version) ln -s /usr/src/linux-source-(version) /usr/src/linux cd /usr/src/linux make oldconfig make prepare make prepare scripts
The order we compile the applications is important. Compiling them out of order would mean that some of the dependancies of an application might not be fulfilled and things wont work as expected. You will need to be inside the actual directory of the source you are trying to install. eg cd dahdi_linux compile cd libpri compile
If you tried to compile and set up dahdi before installing ncurses you might get a problem like this. "Install ncurses to use the menu interface!" Basically, running make clean will not remove the configure options in the subdirectory menuconfig, so even if you do a make clean and configure again, it will still give you the above error: What you need to do is use "make distclean". This will also clean out the subdirectory and allow it to work. thanks to - http://www.venturevoip.com/news.php?rssid=1572
make menuconfig which is mentioned below is a text based GUI allowing you to configure other components of the asterisk system. I recommend you at least look at it and understand how to get to the menu. Dont forget to press x to save
make menuconfig <-- this step is not compulsory make install
./configure make menuconfig make make install make config <-- creates startup scripts
./configure make menuconfig <-- this step is not compulsory make install
./configure make install
this codec is no longer directly included in the Asterisk source. To enable it you go to the Asterisk source directory and then contrib/scripts and run the get_ilbc_source.sh script. Then you will enable it in the Asterisk menuconfig menu under codecs.
If you make a mistake and stop halfway through compiling, no problem but you will need to run make clean then
./configure and make install again.
Under your /lib/modules dir, you may end up with an extra directory put there by Asterisk. Create a link from the Asterisk modules dir into the original modules directory (asterisk wont find the new modules otherwise).
ln -s /lib/modules/2.6.18 /lib/modules/2.6.18-4-486/asterisk depmod
Freepbx is a web based GUI for control of the Asterisk server. It does all the hard work for you so no hand editing of config files. As with Asterisk, check the latest version from the webpage and use that version instead of the one here.
cd /usr/src wget http://mirror.freepbx.org/freepbx-2.5.1.tar.gz
open mc and highlight the archive, press F2 and extract the freepbx archive into the /usr/src directory
Install freepbx dependancies
aptitude install apache-ssl aptitude install php5 php5-cli aptitude install mysql-server aptitude install php-pear aptitude install php5-mysql aptitude install php-db aptitude install libapache-mod-php5 aptitude install php5-gd
The info here is largely from the “install” document inside the freepbx archive with some adjustments on the command line related to Debian.
Setup freepbx related configs
Edit the /etc/php5/apache/php.ini change upload_max_filesize = 2M change to 20M change magic_quotes_gpc = on change to off change memory_limit = 16M change to 100M
add an asterisk user (ignore the directory ownership warning you get)
adduser asterisk --disabled-password --gecos "asterisk PBX" --home /var/lib/asterisk
Setup Mysql for call detail recording
mysql -u root -p (prompts for password) create database asteriskcdrdb; create database asterisk; quit
Grant access to databases
mysql -u root -p mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109'; mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109'; mysql> quit
Import tables and DB structure
mysql -u root -p asteriskcdrdb < /usr/src/freepbx-2.3.1/SQL/cdr_mysql_table.sql mysql -u root -p asterisk < /usr/src/freepbx-2.3.1/SQL/newinstall.sql
start asterisk first or the freepbx installer will complain asterisk check asterisk is running - ps aux | grep asterisk install freepbx /usr/src/freepbx-2.5.1/install_amp
you will now be asked a series of questions which are pretty easy so I am not going to walk you through them here. In most cases, the defaults will be fine (press enter). check /etc/amportal.conf if you need to change anything related to the freepbx install (remember to do an amportal restart afterwards)
Freepbx may complain that the version of Asterisk is weird so you might need to install like this
Start web interface
amportal stop amportal start
The above commands will most likely give you an error. Need to modify /etc/asterisk/asterisk.conf and look for the pid line which will look like …
astrundir => /var/run **need to change it to** astrundir => /var/run/asterisk
Now run the install script again
/usr/src/freepbx.xxx/install_amp --my-svn-is-correct you will be asked if you want to overwrite the existing files, choose a=all
Give the web(system) user access to the asterisk and freepbx directories and files
adduser www-data asterisk
configure amportal to start at boot
edit /etc/rc.local nano /etc/rc.local insert above the "exit 0" line /usr/local/sbin/amportal start save and quit
Music on hold wont work unless we create a symlink from /moh to /mohmp3
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
Panel works from main menu but not from admin menu The error message you see is –> The requested URL /panel/index_amp.php was not found on this server
edit /var/www/amp(or html)/admin/views/panel.php change src="../../panel/index_amp.php?context='.$deptname.'"></iframe>' to src="../panel/index_amp.php?context='.$deptname.'"></iframe>'
you need to reboot the box now. Failure to do this will mean you spend the rest of your days resolving weird permissions problems because the asterisk user isnt loaded, apache hasnt been restarted etc etc.
Conferencing issues There is a real possility that the conferences wont work and possibly an Asterisk crash entering, leaving or during a conference after installing dahdi without any Digium hardware. This is due to a simple issue of a file not being created. If this happens to you ….
check if the file chan_dahdi.conf exists if it does not …
touch /etc/asterisk/chan_dahdi.conf amportal restart
the problem should be solved.
Now the fun part, asterisk is built and the gui is installed. Goto the localhost address. We installed apache-ssl so although there is a webpage at 127.0.0.1, it is the one at https://127.0.0.1/html (if you left the freepx setup as the default) that we are interested in.
There should be a green frog image in the top left hand corner and 3 links.
First link is for voicmail management (users)
Click on the panel (2nd) link and you will be prompted to install flash player. - Here you can see the status of all the extentions.
Click on the 3rd link and you should get the administration panel for the PBX. Click around a few places and make sure there are no errors or issues.
Adding some extentions
Click on the link on the left hand side and add two extentions. You can download any number of softphones to use with asterisk or use standard VOIP phones which are a good investment.
I am not going to explain much else on this as there are more than enough howto's on the web to setup a PBX once you have the GUI running. Most people have stopped reading by now anyway.
After setting it all up and you have a working system, you may need to change some things and then do a round of testing to make sure nothing has broken as a result of your changes. Below is a list of things to check as a matter of course.
You will need to stop and start asterisk from time to time.
Thats it! Hope you enjoyed building your PBX. I tried to make this doc as easy as possible to follow, hope it has helped you. Feel free to distribute this as you like provided you dont remove my name from the document. Dont try to pass this off as your own work. Send me your feedback to the address at the top of the document. -Matt
Lets add usernames and passwords to the web GUI
click on the "administrator" link in the gui edit /etc/amportal.conf change AUTHTYPE to database amportal restart
add a user to the webpage before you close it and logout
If you do get locked out, change the AUTHTYPE back to none and try again after restarting asterisk
It seems I am installing this setup alot more often these days and I need to speed it up. During my spare time I will attempt to script alot of the easy stuff. Here is the early stages of that script. I will try to leave it in a usable state each time so you can copy and paste it is you want to try.
full script coming soon
To install a zaptel card is an interesting process to say the least. I really dont think it is that easy but lets see how we go.
Firstly, install the card into an empty PCI slot. Secure it properly and reboot.
Next, we need to generate a config
log into the CLI and check the status of the card
asterisk -r zap show channels
if you get a “command not found” error or similar, it means the config files are not correct. I am not sure why Digium dont just provide a more sane error but never mind, if we know what the above error means, we can carry on.
here is a sample of my working config. This card has 2 fxo ports on it
[trunkgroups] [channels] context=default switchtype=national signalling=fxo_ls rxwink=300 ; Atlas seems to use long (250ms) winks usecallerid=yes cidsignalling=bell cidstart=ring hidecallerid=no callwaiting=yes usecallingpres=yes sendcalleridafter=2 adsi=no callwaitingcallerid=yes threewaycalling=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes ;echotraining=yes ;echotraining=800 rxgain=0.0 txgain=0.0 group=1 callgroup=1 pickupgroup=1 immediate=no busydetect=yes busycount=6 ;answeronpolarityswitch=yes ;hanguponpolarityswitch=yes faxdetect=incoming callerid=asreceived ;jitterbuffers=4 ; jbenable = yes ; jbmaxsize = 200 ; jbresyncthreshold = 1000 ; jbimpl = fixed ; jblog = no ;DO NOT REMOVE THE BELOW ;ATPSTART ;PRISTART ;PRIEND ;TDMSTART ;FXO MODULES ;Zap/1 signalling=fxs_ls group=1 callerid="" <> context=from-zaptel channel=>1 ;Zap/2 signalling=fxs_ls group=1 callerid="" <> context=from-zaptel channel=>2 ;TDMEND ;ATPEND
loadzone = au defaultzone = au fxsls=1 fxsls=2
This card is a 4 port ISDN BRI PCI card which uses mISDN to communicate with Asterisk.
When we installed this card, it was added to an existing system therefore you should have completed all the steps above prior to following these instructions.
Here we go ….
Insert the card into a spare PCI slot
start the machine
Check if the card is found
lspci look for the Digium card in the list
download latest version of mISDN
cd /usr/src/ wget http://www.misdn.org/downloads/mISDN.tar.gz wget http://www.misdn.org/downloads/mISDNuser.tar.gz tar xzf mISDN.tar.gz tar xzf mISDNuser.tar.gz cd mISDN-1_x_0 make install cd ../mISDNuser-1_x_0 make install
can we see the card?
generate a basic config for the card
Load the mISDN driver
now the lights on the card should be flashing red to signal to you the card is active with the driver. Asterisk still cant see it though
recompile Asterisk with misdn
cd /usr/src/asterisk ./configure --with-misdn
Asterisk checks for misdn towards the bottom of the configure script so scroll up and look for misdn references once configure has finished
build and install asterisk again
make make install
Start the ISDN card at boot up edit /etc/rc.local and make sure the order is the same. on pbx in a flash systems, we have found you may need to unload the ztdummy module at boot or the ISDN card may not load correctly
rmmod ztdummy /usr/sbin/misdn-init start amportal start
Once the system has rebooted, the lights on the card should be flashing which shows the misdn driver has loaded at boot.
check asterisk sees the card
asterisk -r misdn show stacks
config files there are two config files we need to adjust.
# # Configuration file for your misdn hardware # # Usage: /usr/sbin/misdn-init start|stop|restart|config|scan|help # # # Card Settings # # Syntax: card=<number>,<type>[,<option>...] # # <number> count your cards beginning with 1 # <type> either 0x1,0x4 or 0x8 for your hfcmulti hardware, # or the name of your card driver module. # <option> ulaw - uLaw (instead of aLaw) # dtmf - enable DTMF detection on all B-channels # # pcm_slave - set PCM bus into slave mode # If you have a set of cards, all wired via PCM. Set # all cards into pcm_slave mode and leave one out. # The left card will automatically be Master. # # ignore_pcm_frameclock - this can be set in conjunction with # pcm_slave. If this card has a # PCI Bus Position before the Position # of the Master, then this port cannot # yet receive a frameclock, so it must # ignore the pcm frameclock. # # rxclock - use clocking for pcm from ST Port # crystalclock - use clocking for pcm from PLL (genrated on board) # watchdog - This dual E1 Board has a Watchdog for # transparent mode # # card=1,0x4 # # Port settings # # Syntax: <port_type>=<port_number>[,<port_number>...] # # <port_type> te_ptp - TE-Mode, PTP # te_ptmp - TE-Mode, PTMP # te_capi_ptp - TE-Mode (capi), PTP # te_capi_ptmp - TE-Mode (capi), PTMP # nt_ptp - NT-Mode, PTP # nt_ptmp - NT-Mode, PTMP # <port_number> port that should be considered # te_ptp=1,2 # # Port Options # # Syntax: option=<port_number>,<option>[,<option>...] # # <option> master_clock - use master clock for this S/T interface # (only once per chip, only for HFC 8/4) # optical - optical (only HFC-E1) # los - report LOS (only HFC-E1) # ais - report AIS (only HFC-E1) # slip - report SLIP (only HFC-E1) # nocrc4 - turn off crc4 mode use double frame instead # (only HFC-E1) # # The master_clock option is essential for retrieving and transmitting # faxes to avoid failures during transmission. It tells the driver to # synchronize the Card with the given Port which should be a TE Port and # connected to the PSTN in general. # #option=1,master_clock #option=2,ais,nocrc4 #option=3,optical,los,ais,slip # # General Options for your hfcmulti hardware # # poll=<number> # # Only one poll value must be given for all cards. # Give the number of samples for each fifo process. # By default 128 is used. Decrease to reduce delay, increase to # reduce cpu load. If unsure, don't mess with it!!! # Valid is 32, 64, 128, 256. # # dsp_poll=<number> # This is the poll option which is used by mISDN_dsp, this might # differ from the one given by poll= for the hfc based cards, since # they can only use multiples of 32, the dsp_poll is dependant on # the kernel timer setting which can be found in the CPU section # in the kernel config. Defaults are there either 100Hz, 250Hz # or 1000Hz. If your setting is either 1000 or 250 it is compatible # with the poll option for the hfc chips, if you have 100 it is # different and you need here a multiple of 80. # The default is to have no dsp_poll option, then the dsp itself # finds out which option is the best to use by itself # # pcm=<number> # # Give the id of the PCM bus. All PCM busses with the same ID # are expected to be connected and have equal slots. # Only one chip of the PCM bus must be master, the others slave. # # debug=<number> # # Enable debugging (see hfc_multi.h for debug options). # # dsp_options=<number> # # set this to 2 and you'll have software bridging instead of # hardware bridging. # # # dtmfthreshold=<milliseconds> # # Here you can tune the sensitivity of the dtmf tone recognizer. # # timer=<1|0> # # set this to 1 if you want hfcmulti to register at ztdummy (zaptel) # and provide a 1khz timing source for it. This makes it possible # to have an accurate timing source for asterisk through zaptel from # hfcmulti to make applications like Meetme and faxing between wctdm # and hfcmulti work properly. # poll=128 dsp_poll=128 dsp_options=0 dtmfthreshold=100 debug=0
; ; chan_misdn sample config ; ; general section: ; ; for debugging and general setup, things that are not bound to port groups ; [general] ; ; Sets the Path to the misdn-init.conf (for nt_ptp mode checking) ; misdn_init=/etc/misdn-init.conf ; set debugging flag: ; 0 - No Debug ; 1 - mISDN Messages and * - Messages, and * - State changes ; 2 - Messages + Message specific Informations (e.g. bearer capability) ; 3 - very Verbose, the above + lots of Driver specific infos ; 4 - even more Verbose than 3 ; ; default value: 0 ; debug=0 ; set debugging file and flags for mISDNuser (NT-Stack) ; ; flags can be or'ed with the following values: ; ; DBGM_NET 0x00000001 ; DBGM_MSG 0x00000002 ; DBGM_FSM 0x00000004 ; DBGM_TEI 0x00000010 ; DBGM_L2 0x00000020 ; DBGM_L3 0x00000040 ; DBGM_L3DATA 0x00000080 ; DBGM_BC 0x00000100 ; DBGM_TONE 0x00000200 ; DBGM_BCDATA 0x00000400 ; DBGM_MAN 0x00001000 ; DBGM_APPL 0x00002000 ; DBGM_ISDN 0x00004000 ; DBGM_SOCK 0x00010000 ; DBGM_CONN 0x00020000 ; DBGM_CDATA 0x00040000 ; DBGM_DDATA 0x00080000 ; DBGM_SOUND 0x00100000 ; DBGM_SDATA 0x00200000 ; DBGM_TOPLEVEL 0x40000000 ; DBGM_ALL 0xffffffff ; ntdebugflags=0 ntdebugfile=/var/log/misdn-nt.log ; some pbx systems do cut the L1 for some milliseconds, to avoid ; dropping running calls, we can set this flag to yes and tell ; mISDNuser not to drop the calls on L2_RELEASE ntkeepcalls=no ; the big trace ; ; default value: [not set] ; ;tracefile=/var/log/asterisk/misdn.log ; set to yes if you want mISDN_dsp to bridge the calls in HW ; ; default value: yes ; bridging=no ; ; watches the L1s of every port. If one l1 is down it tries to ; get it up. The timeout is given in seconds. with 0 as value it ; does not watch the l1 at all ; ; default value: 0 ; ; this option is only read at loading time of chan_misdn, ; which means you need to unload and load chan_misdn to change the ; value, an asterisk restart should do the trick ; l1watcher_timeout=0 ; stops dialtone after getting first digit on nt Port ; ; default value: yes ; stop_tone_after_first_digit=yes ; whether to append overlapdialed Digits to Extension or not ; ; default value: yes ; append_digits2exten=yes ;;; CRYPTION STUFF ; Whether to look for dynamic crypting attempt ; ; default value: no ; dynamic_crypt=no ; crypt_prefix, what is used for crypting Protocol ; ; default value: [not set] ; crypt_prefix=** ; Keys for cryption, you reference them in the dialplan ; later also in dynamic encr. ; ; default value: [not set] ; crypt_keys=test,muh ; users sections: ; ; name your sections as you which but not "general" ! ; the sections are Groups, you can dial out in extensions.conf ; with Dial(mISDN/g:extern/101) where extern is a section name, ; chan_misdn tries every port in this section to find a ; new free channel ; ; The default section is not a group section, it just contains config elements ; which are inherited by group sections. ; [default] ; define your default context here ; ; default value: default ; context=default #context=from-pstn ; language ; ; default value: en ; language=en ; ; sets the musiconhold class ; musicclass=default ; ; Either if we should produce DTMF Tones ourselves ; senddtmf=yes ; ; If we should generate Ringing for chan_sip and others ; far_alerting=no ; ; here you can define which bearers should be allowed ; allowed_bearers=all ; Prefixes for national and international, those are put before the ; oad if an according dialplan is set by the other end. ; ; default values: nationalprefix : 0 ; internationalprefix : 00 ; nationalprefix=0 internationalprefix=00 ; set rx/tx gains between -8 and 8 to change the RX/TX Gain ; ; default values: rxgain: 0 ; txgain: 0 ; rxgain=0 txgain=0 ; some telcos especially in NL seem to need this set to yes, also in ; switzerland this seems to be important ; ; default value: no ; te_choose_channel=no ; ; This option defines, if chan_misdn should check the L1 on a PMP ; before making a group call on it. The L1 may go down for PMP Ports ; so we might need this. ; But be aware! a broken or plugged off cable might be used for a group call ; as well, since chan_misdn has no chance to distinguish if the L1 is down ; because of a lost Link or because the Provider shut it down... ; ; default: no ; pmp_l1_check=no ; ; in PMP this option defines which cause should be sent out to ; the 3. caller. chan_misdn does not support callwaiting on TE ; PMP side. This allows to modify the RELEASE_COMPLETE cause ; at least. ; reject_cause=16 ; ; Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING), ; this requests additional Infos, so we can waitfordigits ; without much issues. This works only for PTP Ports ; ; default value: no ; need_more_infos=no ; ; set this to yes if you want to disconnect calls when a timeout occurs ; for example during the overlapdial phase ; nttimeout=no ; set the method to use for channel selection: ; standard - always choose the first free channel with the lowest number ; round_robin - use the round robin algorithm to select a channel. use this ; if you want to balance your load. ; ; default value: standard ; method=standard ; specify if chan_misdn should collect digits before going into the ; dialplan, you can choose yes=4 Seconds, no, or specify the amount ; of seconds you need; ; overlapdial=yes ; ; dialplan means Type Of Number in ISDN Terms (for outgoing calls) ; ; there are different types of the dialplan: ; ; dialplan -> outgoing Number ; localdialplan -> callerid ; cpndialplan -> connected party number ; ; dialplan options: ; ; 0 - unknown ; 1 - International ; 2 - National ; 4 - Subscriber ; ; This setting is used for outgoing calls ; ; default value: 0 ; dialplan=0 localdialplan=0 cpndialplan=0 ; ; turn this to no if you don't mind correct handling of Progress Indicators ; early_bconnect=yes ; ; turn this on if you like to send Tone Indications to a Incoming ; isdn channel on a TE Port. Rarely used, only if the Telco allows ; you to send indications by yourself, normally the Telco sends the ; indications to the remote party. ; ; default: no ; incoming_early_audio=no ; uncomment the following to get into s extension at extension conf ; there you can use DigitTimeout if you can't or don't want to use ; isdn overlap dial. ; note: This will jump into the s exten for every exten! ; ; default value: no ; ;always_immediate=no ; ; set this to yes if you want to generate your own dialtone ; with always_immediate=yes, else chan_misdn generates the dialtone ; ; default value: no ; nodialtone=no ; uncomment the following if you want callers which called exactly the ; base number (so no extension is set) jump to the s extension. ; if the user dials something more it jumps to the correct extension ; instead ; ; default value: no ; ;immediate=no ; uncomment the following to have hold and retrieve support ; ; default value: no ; ;hold_allowed=yes ; Pickup and Callgroup ; ; default values: not set = 0 ; range: 0-63 ; ;callgroup=1 ;pickupgroup=1 ; ; these are the exact isdn screening and presentation indicators ; if -1 is given for both values the presentation indicators are used ; from asterisks SetCallerPres application. ; s=0, p=0 -> callerid presented not screened ; s=1, p=1 -> callerid presented but screened (the remote end does not see it!) ; ; default values s=-1, p=-1 presentation=-1 screen=-1 ; this enables echocancellation, with the given number of taps ; be aware, move this setting only to outgoing portgroups! ; A value of zero turns echocancellation off. ; ; possible values are: 0,32,64,128,256,yes(=128),no(=0) ; ; default value: no ; ;echocancel=no ; Set this to no to disable echotraining. You can enter a number > 10 ; the value is a multiple of 0.125 ms. ; ; default value: no ; yes = 2000 ; no = 0 ; echotraining=no ; ; chan_misdns jitterbuffer, default 4000 ; jitterbuffer=4000 ; ; change this threshold to enable dejitter functionality ; jitterbuffer_upper_threshold=0 ; ; change this to yes, if you want to bridge a mISDN data channel to ; another channel type or to an application. ; hdlc=no ; ; defines the maximum amount of incoming calls per port for ; this group. Calls which exceed the maximum will be marked with ; the channel variable MAX_OVERFLOW. It will contain the amount of ; overflowed calls ; max_incoming=-1 ; ; defines the maximum amount of outgoing calls per port for this group ; exceeding calls will be rejected ; max_outgoing=-1 # you will notice in the example config we have deleted a whole lot of stuff from here and replaced it with our own. [bri] ports=1,2 context=from-pstn msns=*
Setup Trunk in freepbx create a new custom trunk and add the following in the custom dial string box
save and reload (orange bar)
Always use a straight through cat5 cable to connect the ISDN card to the NTU (Telco device)
The port furthest from the motherboard should be port 1
You should now be able to dial out and recieve calls