12
Asterisk Configuration files Asterisk.conf defines the locations for the configuration files, the spool directory, and the modules, as well as a location to write log files to. [directories] astetcdir => /etc/asterisk ; location where Asterisk configuration files are stored astmoddir => /usr/lib/asterisk/modules ; location where Asterisk modules are stored astvarlibdir => /var/lib/asterisk ; location where Asterisk libraries are stored astagidir => /var/lib/asterisk/agi-bin ;location where agi scripts are stored astspooldir => /var/spool/asterisk ; location where all records are stored astrundir => /var/run ; location where Asterisk will store its PID file astlogdir => /var/log/asterisk ; location where Asterisk logs are stored

Asterisk Configuration files

  • Upload
    teneil

  • View
    68

  • Download
    0

Embed Size (px)

DESCRIPTION

Asterisk Configuration files. Asterisk.conf defines the locations for the configuration files, the spool directory, and the modules, as well as a location to write log files to. [directories] astetcdir => /etc/asterisk; location where Asterisk configuration files are stored - PowerPoint PPT Presentation

Citation preview

Page 1: Asterisk Configuration files

Asterisk Configuration files

Asterisk.conf defines the locations for the configuration files, the spool directory, and the modules, as well as a location to write log files to.

[directories] astetcdir => /etc/asterisk ; location where Asterisk

configuration files are stored astmoddir => /usr/lib/asterisk/modules ; location where

Asterisk modules are stored

astvarlibdir => /var/lib/asterisk ; location where Asterisk libraries are stored

astagidir => /var/lib/asterisk/agi-bin ;location where agi scripts are stored

astspooldir => /var/spool/asterisk ; location where all records are stored

astrundir => /var/run ; location where Asterisk will store its PID file

astlogdir => /var/log/asterisk ; location where Asterisk logs are stored

Page 2: Asterisk Configuration files

Manager.confThe Asterisk Manager interface is an API which external

programs can use to communicate with, and control, Asterisk.

[general] enabled = no port = 5038 bindaddr = 0.0.0.0  [magma] secret = welcome deny=0.0.0.0/0.0.0.0 permit= 192.168.1.0/255.255.255.0 read = system,call,log,verbose,command,agent,user write = system,call,log,verbose,command,agent,user

Page 3: Asterisk Configuration files

cdr_custom.conf

Asterisk will generate a CDR for every finished call by default; this file defines exactly what gets logged in this CDR line.

[mappings]Master.csv =>

"${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}”

Page 4: Asterisk Configuration files

rtp.conf

The rtp.conf file controls the Real-time Transport Protocol (RTP) ports that Asterisk uses to generate and receive RTP traffic.

[general] rtpstart=10000 rtpend=20000 rtpchecksums=no

Page 5: Asterisk Configuration files

Sip.conf

[general} sectionImplements settings on all SIP clients

PortThe port Asterisk should listen for SIP incoming clients. The default is 5060

BindaddrIf the Asterisk machine has multiple IPs, this option tells Asterisk to listen on a particular IP. Asterisk listens on all interfaces and aliases by default

ContextThe default context for SIP clients

Page 6: Asterisk Configuration files

Sip.conf

Type of Service (ToS)Sets ToS bits in an IP header to improve performance on routers that respects ToS bitsThe options are low delay, throughput, reliability, mincost, none

Allow and disallowAllows and disallows specific codecs. Codec negotiation is attempted in the order in which codecs are defined.The best practice is to disallow all and then allow a codec explicitlyFor example: disallow=allallow=g729allow=alawallow=ulaw

Page 7: Asterisk Configuration files

Sip.conf

MaxexpireyThe maximum amount of time until a peer’s registration expires

DefaultexpireyThis sets the default SIP registration expiration time, in seconds, for incoming and outgoing registrations

RegisterRegister this Asterisk with another host

Page 8: Asterisk Configuration files

Sip.confClient Options

TypeThe type option sets the connection class for the client. The options are:

  peer: A device which receives calls from an Asterisk server

user: A device that makes calls through an Asterisk server

friend: A device that can both send and receive calls through an Asterisk server

SecretSet a password for the client

Host A client’s IP address. Can also be set to dynamic if a client comes from any IP

Page 9: Asterisk Configuration files

Sip.conf

DefaultipAsterisk will send a call on this IP if a host is set to dynamic and the SIP client is not registered yet

Username A client’s username

ContextThe context to start in extensions.conf

CanreinviteConnects end-points directly

NatCan be set to yes, no, or never. If set to yes, Asterisk ignores the IP address in the SIP and SDP headers and responds to the address and port in the IP header. The never option is for devices that cannot handle rport in the SIP header, such as the Uniden UIP200.

Page 10: Asterisk Configuration files

Sip.conf

QualifySets qualify to yes, no, or a time in milliseconds. If you set qualify=yes, NOTIFY messages will be sent periodically to the remote peers to determine whether they are available and what the latency between replies is. A peer is determined unreachable if no reply is received within 2,000 ms (to change this default, set qualify to the number of milliseconds to wait for the reply). Use this option in conjunction with nat=yes to keep the path through the NAT device alive.

Page 11: Asterisk Configuration files

Iax.conf[general] section

BandwidthInstead of allowing or disallowing codecs, use low or high bandwidth options to automatically select the low bandwidth consumption codec or high bandwidth consumption codec

jitterbufferTurn the jitterbuffer on or off. The jitterbuffer is used to

maximize audio quality by balancing latency against the number of dropped packets

dropcountSets the maximum number of packets per memory size to be

dropped in order to reduce latency maxjitterbufferSets the maximum size of the jitterbuffer

Page 12: Asterisk Configuration files

Iax.conf

 maxexcessjitterbuffer:Sets the maximum excess jitterbuffer, which, if exceeded,

causes the jitterbuffer to slowly shrink in order to improve latency.