Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------
- firewall rules
- ------------------------
- -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
- -A INPUT -p udp -m udp --dport 10000:19999 -j ACCEPT
- ------------------------
- asterisk.conf
- ------------------------
- [directories](!)
- astetcdir => /etc/asterisk
- astmoddir => /usr/lib/asterisk/modules
- astvarlibdir => /var/lib/asterisk
- astdbdir => /var/lib/asterisk
- astkeydir => /var/lib/asterisk
- astdatadir => /var/lib/asterisk
- astagidir => /var/lib/asterisk/agi-bin
- astspooldir => /var/spool/asterisk
- astrundir => /var/run/asterisk
- astlogdir => /var/log/asterisk
- astsbindir => /usr/sbin
- [options]
- ;verbose = 3
- ;debug = 3
- ;alwaysfork = yes ; Same as -F at startup.
- ;nofork = yes ; Same as -f at startup.
- ;quiet = yes ; Same as -q at startup.
- ;timestamp = yes ; Same as -T at startup.
- ;execincludes = yes ; Support #exec in config files.
- ;console = yes ; Run as console (same as -c at startup).
- ;highpriority = yes ; Run realtime priority (same as -p at
- ; startup).
- ;initcrypto = yes ; Initialize crypto keys (same as -i at
- ; startup).
- ;nocolor = yes ; Disable console colors.
- ;dontwarn = yes ; Disable some warnings.
- ;dumpcore = yes ; Dump core on crash (same as -g at startup).
- ;languageprefix = yes ; Use the new sound prefix path syntax.
- ;systemname = my_system_name ; Prefix uniqueid with a system name for
- ; Global uniqueness issues.
- ;autosystemname = yes ; Automatically set systemname to hostname,
- ; uses 'localhost' on failure, or systemname if
- ; set.
- ;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms)
- ; If we get shorter DTMF messages, these will be
- ; changed to the minimum duration
- ;maxcalls = 10 ; Maximum amount of calls allowed.
- ;maxload = 0.9 ; Asterisk stops accepting new calls if the
- ; load average exceed this limit.
- ;maxfiles = 1000 ; Maximum amount of openfiles.
- ;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if
- ; the amount of free memory falls below this
- ; watermark.
- ;cache_record_files = yes ; Cache recorded sound files to another
- ; directory during recording.
- ;record_cache_dir = /tmp ; Specify cache directory (used in conjunction
- ; with cache_record_files).
- ;transmit_silence = yes ; Transmit silence while a channel is in a
- ; waiting state, a recording only state, or
- ; when DTMF is being generated. Note that the
- ; silence internally is generated in raw signed
- ; linear format. This means that it must be
- ; transcoded into the native format of the
- ; channel before it can be sent to the device.
- ; It is for this reason that this is optional,
- ; as it may result in requiring a temporary
- ; codec translation path for a channel that may
- ; not otherwise require one.
- ;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of
- ; directly.
- ;runuser = asterisk ; The user to run as.
- ;rungroup = asterisk ; The group to run as.
- ;lightbackground = yes ; If your terminal is set for a light-colored
- ; background.
- ;forceblackbackground = yes ; Force the background of the terminal to be
- ; black, in order for terminal colors to show
- ; up properly.
- ;defaultlanguage = en ; Default language
- documentation_language = en_US ; Set the language you want documentation
- ; displayed in. Value is in the same format as
- ; locale names.
- ;hideconnect = yes ; Hide messages displayed when a remote console
- ; connects and disconnects.
- ;lockconfdir = no ; Protect the directory containing the
- ; configuration files (/etc/asterisk) with a
- ; lock.
- ;stdexten = gosub ; How to invoke the extensions.conf stdexten.
- ; macro - Invoke the stdexten using a macro as
- ; done by legacy Asterisk versions.
- ; gosub - Invoke the stdexten using a gosub as
- ; documented in extensions.conf.sample.
- ; Default gosub.
- ;live_dangerously = no ; Enable the execution of 'dangerous' dialplan
- ; functions from external sources (AMI,
- ; etc.) These functions (such as SHELL) are
- ; considered dangerous because they can allow
- ; privilege escalation.
- ; Default yes, for backward compatability.
- ; Changing the following lines may compromise your security.
- ;[files]
- ;astctlpermissions = 0660
- ;astctlowner = root
- ;astctlgroup = apache
- ;astctl = asterisk.ctl
- [compat]
- pbx_realtime=1.6
- res_agi=1.6
- app_set=1.6
- ------------------------
- extensions.conf
- ------------------------
- [general]
- [unauthenticated]
- ; We currently are not accepting
- ; calls from unauthenticated users:
- exten => s, 1, Hangup()
- [from-local]
- ; Phone 1:
- exten => 100, 1, Dial(SIP/phone_1,10)
- same => n, VoiceMail(100@default)
- ; Phone 2:
- exten => 101, 1, Dial(SIP/phone_2,10)
- same => n, VoiceMail(101@default)
- ; Voicemail (dial "9<extension>"):
- exten => _*1, 1, ExecIf($["${CALLERID(num)}" = "phone_1"]?VoicemailMain(100@default))
- same => n, ExecIf($["${CALLERID(num)}" = "phone_2"]?VoicemailMain(101@default))
- ; Route for outbound numbers:
- exten => _NXXNXXXXXX, 1, Goto(to-pstn,${EXTEN},1)
- [to-pstn]
- exten => _NXXNXXXXXX, 1, Dial(SIP/${EXTEN}@pstn-proxy,30)
- ------------------------
- modules.conf
- ------------------------
- ;
- ; Asterisk configuration file
- ;
- ; Module Loader configuration file
- ;
- [modules]
- autoload=yes
- ;
- ; Any modules that need to be loaded before the Asterisk core has been
- ; initialized (just after the logger has been initialized) can be loaded
- ; using 'preload'. This will frequently be needed if you wish to map all
- ; module configuration files into Realtime storage, since the Realtime
- ; driver will need to be loaded before the modules using those configuration
- ; files are initialized.
- ;
- ; An example of loading ODBC support would be:
- ;preload => res_odbc.so
- ;preload => res_config_odbc.so
- ;
- ; Uncomment the following if you wish to use the Speech Recognition API
- ;preload => res_speech.so
- ;
- ; If you want Asterisk to fail if a module does not load, then use
- ; the "require" keyword. Asterisk will exit with a status code of 2
- ; if a required module does not load.
- ;
- ; require = chan_sip.so
- ; If you want you can combine with preload
- ; preload-require = res_odbc.so
- ;
- ; If you want, load the GTK console right away.
- ;
- noload => pbx_gtkconsole.so
- ;load => pbx_gtkconsole.so
- ;
- load => res_musiconhold.so
- ;
- ; Load one of: chan_oss, alsa, or console (portaudio).
- ; By default, load chan_oss only (automatically).
- ;
- noload => chan_alsa.so
- ;noload => chan_oss.so
- noload => chan_console.so
- ;
- ------------------------
- rtp.conf
- ------------------------
- [general]
- rtpstart=10000
- rtpend=19999
- dtmftimeout=8000
- strictrtp=no
- ------------------------
- sip.conf
- ------------------------
- [general]
- srvlookup=no
- tcpenable=no
- context=unauthenticated
- udpbindaddr=0.0.0.0
- externip=74.74.74.74
- localnet=192.168.0.1/255.255.255.0
- [phone](!)
- type=friend
- host=dynamic
- context=from-local
- nat=force_rport,comedia
- dtmfmode=auto
- disallow=all
- allow=ulaw
- allow=alaw
- [pstn-proxy]
- type=peer
- host=75.75.75.75
- context=from-pstn
- nat=force_rport,comedia
- dtmfmode=auto
- disallow=all
- allow=ulaw
- allow=alaw
- [phone_1](phone)
- secret=password
- [phone_2](phone)
- secret=password
- ------------------------
- voicemail.conf
- ------------------------
- [general]
- attach=yes
- [default]
- 100 => 1234,Bob Smith,bob@gmail.com
- 101 => 4321,Alice Jones,alice@gmail.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement