Asterisk - The Definitive Guide - 100
Asterisk - The Definitive Guide - 100
THIRD EDITION
!"#$%&'(!)*$+",$-&)$%!..!/!)*$&)'$01((!//$234&)5
789!5%0:6";"<=>>"#$%&"'()*$+,"-%."/(+"'$00$1$+,"(+)"23**$11"45!(+6?"@11"5%0:6*"5$*$5A$)?
B5%+6$)"%+"6:$"C+%6$)"D6(6$*"8&"@.$5%E(?
Printing History:
-3+$"<==IV T%5*6"[)%6%8+?"
@303*6"<==PV D$E8+)"[)%6%8+?"
@95%1"<=>>V Z:%5)"[)%6%8+?"
HD4MV"NPWX=XIN`XI>PYOX<
a#DHb
>Y=<>W>PWI
Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
1. A Telephony Revolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
@*6$5%*Q"(+)"/8HBV"45%)0%+0"6:$"J(9"4$6L$$+"Z5()%6%8+(1"(+)"M$6L85Q
Z$1$9:8+! <
Z:$"c(9(6("Z$1$9:8+!"B58d$E6 <
'(**%A$"7:(+0$"2$e3%5$*"T1$\% 1$"Z$E:+8180! Y
@*6$5%*QV"Z:$"K(EQ$5G*"B4f O
@*6$5%*QV"Z:$"B58&$**%8+(1G*"B4f I
Z:$"@*6$5%*Q"78..3+%6! I
Z:$"@*6$5%*Q"'(%1%+0"#%*6* `
@*6$5%*Q"_%Q%"D%6$* P
Z:$"H27"7:(++$1* P
@*6$5%*Q"C*$5"J5839* P
Z:$"@*6$5%*Q"^8E3.$+6(6%8+"B58d$E6 W
Z:$"43*%+$**"7(*$ W
78+E13*%8+ W
2. Asterisk Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
'8)31$* >=
@991%E(6%8+* ><
45%)0%+0"'8)31$* >I
7(11"^$6(%1"2$E85)%+0"'8)31$* >I
7:(++$1"[A$+6"#800%+0"'8)31$* >`
7:(++$1"^5%A$5* >P
78)$E"Z5(+*1(685* >W
T85.(6"H+6$595$6$5* >W
^%(191(+"T3+E6%8+* >N
B4f"'8)31$* <>
v
2$*835E$"'8)31$* <>
@))8+"'8)31$* <Y
Z$*6"'8)31$* <O
T%1$"D653E635$ <O
78+&%035(6%8+"T%1$* <O
'8)31$* <O
Z:$"2$*835E$"#% 5(5! <I
Z:$"D9881 <I
#800%+0 <I
Z:$"^%(191(+ <I
K(5)L(5$ <`
@*6$5%*Q"/$5*%8+%+0 <`
B5$A%83*"2$1$(*$"'$6:8)8180%$* <`
Z:$"M$L"2$1$(*$"'$6:8)8180! <P
78+E13*%8+ <W
3. Installing Asterisk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
H+*6(11(6%8+"7:$(6"D:$$6 Y>
^%*65% 36%8+"H+*6(11(6%8+ YI
7$+6FD"D$5A$5 YI
C 3+63"D$5A$5 O=
D8&6L(5$"^$9$+)$+E%$* OO
^8L+18()%+0"_:(6"g83"M$$) O`
J$66%+0"6:$"D835E$"A%("D3 A$5*%8+ OP
J$66%+0"6:$"D835E$"A%("L0$6 OP
K8L"68"H+*6(11"H6 OW
#% B2H OW
^@K^H ON
@*6$5%*Q I=
D$66%+0"T%1$"B$5.%**%8+* I=
4(*$"78+&%035(6%8+ I>
^%*( 1$"D[#%+3\ I>
H+%6%(1"78+&%035(6%8+ I<
.(Q$".$+3*$1$E6 IN
C9)(6%+0"@*6$5%*Q `O
78..8+"H**3$* ``
C905()%+0"@*6$5%*Q `W
78+E13*%8+ `N
vi | Table of Contents
Z:$"a&%1$*b"D$E6%8+ PI
Z:$"aE8.9(6b"D$E6%8+ PI
.8)31$*?E8+& PI
Z:$"a.8)31$*b"D$E6%8+ P`
%+)%E(6%8+*?E8+& PP
.3*%E8+:81)?E8+& PN
78+A$56%+0"'3*%E"68"("T85.(6"Z:(6"_85Q*"4$*6"L%6:"@*6$5%*Q PN
78+E13*%8+ W>
8. Voicemail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
78.$)%(+"'(%1 >IP
Z:$"a0$+$5(1b"D$E6%8+ >IW
Z:$"ah8+$.$**(0$*b"D$E6%8+ >``
Z:$"78+6$\6*"D$E6%8+ >`P
@+"H+%6%(1"A8%E$.(%1?E8+&"T%1$ >`W
^%(191(+"H+6$05(6%8+ >`N
Z:$"/8%E$'(%1RS"^%(191(+"@991%E(6%8+ >`N
Z:$"/8%E$'(%1'(%+RS"^%(191(+"@991%E(6%8+ >P>
75$(6%+0"("^%(1X !XM(.$"^%5$E685! >P>
C*%+0"("-%66$5 3&&$5 >P<
D685(0$"4(EQ$+)* >P<
#%+3\"T%1$*!*6$. >P<
F^47 >PY
H'@B >PY
C*%+0"@*6$5%*Q"@*"("D6(+)(18+$"/8%E$.(%1"D$5A$5 >PO
H+6$05(6%+0"@*6$5%*Q"%+68"("DHB"[+A%58+.$+6"@*"("D6(+)(18+$
/8%E$.(%1"D$5A$5 >PO
D'^H"RD%.91%&%$)"'$**(0$"^$*Q"H+6$5&(E$S >PP
78+E13*%8+ >PN
9. Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
^$A%E$*"[\6$5+(1"68"6:$"@*6$5%*Q"D$5A$5 >W<
BDZM"78++$E6%A%6!,"^@K^H,"^%0%3."7(5)*,"(+)"@+(180"B:8+$* >WI
^@K^H"^5%A$5* >WP
@*6$5%*Q >WN
7(11$5"H^ >WN
#(+03(0$"(+)U85"@EE$+6"8&"B58.96* >N=
Z%.$U^(6$"D6(.9*"(+)"B58+3+E%(6%8+ >N>
Table of Contents | ix
78+E13*%8+ <Y`
x | Table of Contents
C*%+0"#8E(1"7:(++$1* <NY
m3$3$"D6(6%*6%E*V"Z:$"e3$3$n180"T%1$ <N`
78+E13*%8+ <NN
Table of Contents | xi
16. Relational Database Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
H+*6(11%+0"(+)"78+&%035%+0"B8*605$Dm#"(+)"'!Dm# YO<
H+*6(11%+0"B8*605$Dm#"&85"7$+6FD YO<
H+*6(11%+0"B8*605$Dm#"&85"C 3+63 YO<
H+*6(11%+0"'!Dm#"&85"7$+6FD YOY
H+*6(11%+0"'!Dm#"&85"C 3+63 YOY
78+&%035%+0"B8*605$Dm# YOY
78+&%035%+0"'!Dm# YOI
H+*6(11%+0"(+)"78+&%035%+0"F^47 YO`
78+&%035%+0"F^47"&85"B8*605$Dm# YOP
78+&%035%+0"F^47"&85"'!Dm# YON
78+&%035%+0"F^47"&85"'%E58*8&6"Dm# YI=
/(1%)(6%+0"6:$"F^47"78++$E685 YI>
78+&%035%+0"5$*n8) E"68"@118L"@*6$5%*Q"68"78++$E6"Z:5830:"F^47 YI<
'(+(0%+0"^(6( (*$* YIY
Z583 1$*:886%+0"^(6( (*$"H**3$* YIY
@"J$+61$"H+658)3E6%8+"68"&3+En8) E YIO
J$66%+0"T3+Q!"L%6:"&3+En8) EV"K86X^$*Q%+0 YIO
C*%+0"2$(16%.$ Y`W
D6(6%E"2$(16%.$ Y`W
^!+(.%E"2$(16%.$ YP>
D685%+0"7(11"^$6(%1"2$E85)*"R7^2*S YPI
F^47"/8%E$.(%1 YPW
75$(6%+0"6:$"#(50$"F d$E6"Z!9$"&85"B8*605$Dm# YPN
F^47"/8%E$.(%1"D685(0$"Z( 1$"#(!836 YW>
78+&%035%+0"A8%E$.(%1?E8+&"&85"F^47"D685(0$ YW<
Z$*6%+0"F^47"/8%E$.(%1 YWY
78+E13*%8+ YWP
Table of Contents | xv
4(EQ$+)* IO=
[\(.91$"7:(++$1"[A$+6* IO`
DM'B II>
H+*6(11%+0"6:$"DM'B"'8)31$"&85"@*6$5%*Q II>
78+&%035%+0"DM'B"&85"@*6$5%*Q"C*%+0"F9$+M'D II<
'8+%685%+0"@*6$5%*Q"L%6:"F9$+M'D IIW
78+E13*%8+ IIN
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
jZ:$5$G*".85$"6:(+"8+$"L(!"68")8"%6?k"HGA$" $$+"L85Q%+0"L%6:"@*6$5%*Q"&85"+%+$"!$(5*,
(+)"6:%*".8668" $E8.$*".85$"653$"L%6:"$(E:"5$1$(*$,"$(E:"())$)"&$(635$,"(+)"$(E:
E1$A$5"9$5*8+"L:8"(66(EQ*"("6$1$E8..3+%E(6%8+*"958 1$."L%6:"6:%*"%+E5$)% 1!"&1$\% 1$
6881Q%6?" H" :()" 6:$" &(+6(*6%E" 8998563+%6!" 68" L85Q" (*" 6:$" E8..3+%6!" .(+(0$5" &85" 6:$
@*6$5%*Q"958d$E6"(6"^%0%3."&85"6L8"!$(5*,"L:%E:"0(A$".$"8+$"8&"6:$" $*6"A(+6(0$"98%+6*
&85" *$$%+0" 6:$" *E89$" (+)" %.(0%+(6%8+" 8&" 6:$" L851)L%)$" )$A$189.$+6" $&&856" 93*:%+0
@*6$5%*Q"&85L(5)?"Z:$")$96:"(+)" 5$()6:"8&"@*6$5%*Q"%*"*6(00$5%+0i%+*6(11(6%8+*"L%6:
:3+)5$)*"8&"6:83*(+)*"8&"3*$5*"(5$"+8L"E8..8+91(E$?"H"*$$"@*6$5%*Q".(Q%+0")$$9
%+58()*"%+68"6:$"&%+(+E%(1,".%1%6(5!,":8*9%6(1,"T8563+$">=="$+6$595%*$,"*$5A%E$"958A%)$5,
E(11%+0"E(5),"(+)".8 %1$"$+A%58+.$+6*?"H+"&(E6,"6:$5$"5$(11!"(5$+G6"(+!"(5$(*"6:(6"H"E(+
6:%+Q"8&"L:$5$"@*6$5%*Q"%*+G6"+8L"$+65$+E:$)"(*"6:$")$&(316"E:8%E$"L:$+"6:$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+)"*$6":%."188*$?"H+"d3*6"("&$L
:835*"8&")$A$189.$+6"R85"18+0$5,"8&"E835*$S,"E8.9(+%$*"E(+"E:(+0$"6:$"L(!"6:$!")$1%A$5
958)3E6*"68"E3*68.$5*,"+8+958&%6*"E(+"8A$5:(31":8L"6:$%5"3*$5*"%+6$5(E6"L%6:"6:$"*$5AX
%E$*"6:$!"8&&$5,"(+)"%+)%A%)3(1*"E(+"1$(5+"68" 3%1)"("9$5&$E61!"E3*68.%h$)"E(11X:(+)1%+0
*!*6$."&85"6:$%5".8 %1$"(+)":8.$"9:8+$*?"@*6$5%*Q"*E(1$*"39"(+)")8L+"&58."%+)%A%)3(1
1%+$*"68"A(*6".316%*$5A$5"%+*6(11(6%8+*"(E58**".316%91$"E8+6%+$+6*," 36"6:$"L(!"68"*6(56"%*
xix
68"%+*6(11"6:$"9(EQ(0$,"89$+"39"*8.$"8&"6:$"E8+&%035(6%8+"&%1$*,"(+)"*6(56"188Q%+0"(6
$\(.91$*?
T58."6:$" (*%E" $0%++%+0*"8&"("B4f"6:(6"'(5Q"D9$+E$5"E8)$)"%+">NNN,"6:$"@*6$5%*Q
958d$E6,"L%6:"6:$":$19"8&"6:83*(+)*"8&")$A$189$5*,":(*".8A$)"&58."*%.91!"E8++$E6%+0
9:8+$"E(11*"(+)":(*".(635$)"%+68"("91(6&85."6:(6"E(+":(+)1$"A8%E$,"A%)$8,"(+)"6$\6
(E58**" )8h$+*" 8&" A%563(1" (+)" 9:!*%E(1" %+6$5&(E$" 6!9$*?" Z:$" E5$(6%8+" (+)" 058L6:" 8&
@*6$5%*Q"L$5$"6:$"%+$*E(9( 1$"5$*316*"8&"6:$"E8+A$50$+E$"8&"6:$"&835":85*$.$+"8&"6:$
95895%$6(5!" :(5)L(5$" (98E(1!9*$V" 89$+" *835E$" )$A$189.$+6" %)$(*," 6:$" H+6$5+$6,
'885$G*"#(L,"(+)"6:$"913..$6%+0"E8*6*"8&"6$1$E8..3+%E(6%8+*?"[A$+":(5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"("+8A%E$
E(+"3+)$5*6(+)" (*%E"E8+E$96*?"Z:$+"%6"E8+6%+3$*"68"*3EE$$)"(*"6:$"+8A%E$" $E8.$*"(
958"(+)"*6(56*"6(99%+0"6:$"j86:$5"L(!*"68")8"%6k"L%6:".85$"*89:%*6%E(6$)"%.91$.$+6(X
6%8+*,"3*%+0"@JH"L%6:"-(A(,"B$51,"85"B!6:8+"R85"8+$"8&"6:$"86:$5")8h$+"85"*8"*399856$)
1(+03(0$*S,"85"$A$+"L5%6%+0":$5"8L+"E3*68."(99*"6:(6"L85Q"(*"E8.9%1$X6%.$"896%8+*
%+"@*6$5%*Q?"436"6:$"&%5*6"*6$9"&85"(+!8+$,"+8".(66$5"L:(6":%*"85":$5"*Q%11"1$A$1,"%*"68"188Q
(6"$\(.91$*"8&" (*%E"(99*"86:$5*":(A$"L5%66$+?"#$%&,"-%.,"(+)"23**$11":(A$"+86"8+1!"936
680$6:$5"("&(+6(*6%E"E8.9$+)%3."8&"@*6$5%*Q".$6:8)*," 36"6:$!":(A$"(1*8"958A%)$)"(+
$\E$11$+6"1%*6"8&"$\(.91$*"6:(6"L%11"1$6"6:$"+8A%E$"85"$\9$56"e3%EQ1!"1$(5+"+$L"6$E:+%e3$*
(+)"j.85$"6:(+"8+$"L(!"68")8"%6?k
@*6$5%*Q">?>"%*"&(+6(*6%E(11!"98L$5&31"(+)"E(+"*81A$"+$(51!"(+!"A8%E$"958 1$."!83".%0:6
:(A$?" T85" 6:8*$" 8&" !83" 3%1)%+0" 6:$" .8*6" E8.91$\" %+*6(11(6%8+*," 6:$5$" %*" $A$+" .85$
%+6$5$*6%+0"L85QiL:%E:"L%11" $"5$(1%h$)"e3%6$"*88+i%+")$A$189.$+6?"Z:$"E355$+61!X
%+X)$A$189.$+6"@*6$5%*Q"D7T"RDE(1( 1$"78..3+%E(6%8+*"T5(.$L85QS"%*" $%+0" 3%16"(*
(+"()d3+E6"89$+"*835E$"958d$E6"68"(118L"@*6$5%*Q">?>"*!*6$.*"68"*E(1$"%+"$A$+".85$
98L$5&31"L(!*i*6(!"63+$),"85" $66$5"!$6,"0$6"%+A81A$)"L%6:"6:$"958d$E6"(*"(")$A$189$5?
xx | Foreword
H&"!83G5$"(+"$\9$5%$+E$)"@*6$5%*Q")$A$189$5"85"%+6$05(685,"HG."*35$"6:%*" 88Q"L%11":(A$
("&$L"jK$!,"6:(6G*"("+$(6"L(!"68")8"%6pk".8.$+6*"&85"!83,"L:%E:"%*"8+$"8&"6:$"d8!*"8&
@*6$5%*Q?"H&"6:%*"%*"!835"&%5*6"958d$E6"L%6:"@*6$5%*Q,"HG)"1%Q$"68"L$1E8.$"!83"68"6:$":30$
E8..3+%6!"8&"3*$5*"(+)")$A$189$5*")$)%E(6$)"68".(Q%+0"@*6$5%*Q" $66$5?"Z:%*" 88Q"L%11
6(Q$"!83"&58."("A(03$"%)$("8&")8%+0"*8.$6:%+0"L%6:"E8.936$5*"(+)"A8%E$"E8..3+%X
E(6%8+" 68" 6:$" 98%+6" L:$5$" !83G5$" ( 1$" 68" *63+" $A$5!8+$" !83" Q+8L" L%6:" !835" 9:8+$
*!*6$.G*"*89:%*6%E(6$)"65%EQ*?
g83G5$"$+E835(0$)"68"9(56%E%9(6$"%+"6:$"8+1%+$".(%1%+0"1%*6*,"H27"E:(6588.*,"(+)"!$(51!
@*65%78+"E8+&$5$+E$"6:(6"958A%)$"39X68X6:$X*$E8+)"+$L*"(+)")%*E3**%8+"*35583+)%+0
6:$" 958d$E6?" _%6:836" !835" %+6$5$*6," %+936," (+)" E8)$," @*6$5%*Q" L831)+G6" $\%*6?" F9$+
*835E$"958d$E6*"(5$":3+05!"&85"+$L"%)$(*"(+)"$\E$11$+6"E8+65% 36%8+*V"H"$+E835(0$"!83
68" $"("9(56%E%9(+6"%+"6:$"@*6$5%*Q"E8..3+%6!,"(+)"H"188Q"&85L(5)"68"*$$%+0"!835"e3$*X
6%8+*"(+)"$\(.91$*"%+"6:$"+$\6"$)%6%8+"8&"6:%*" 88Q?
i-8:+"Z8))
Foreword | xxi
Preface
Z:%*"%*"(" 88Q"&85"(+!8+$"L:8"3*$*"@*6$5%*Q?
@*6$5%*Q"%*"(+"89$+"*835E$,"E8+A$50$)"6$1$9:8+!"91(6&85.,"L:%E:"%*")$*%0+$)"95%.(5%1!
68"53+"8+"#%+3\?"@*6$5%*Q"E8. %+$*".85$"6:(+">=="!$(5*"8&"6$1$9:8+!"Q+8L1$)0$"%+68
(" 58 3*6" *3%6$" 8&" 6%0:61!" %+6$05(6$)" 6$1$E8..3+%E(6%8+*" (991%E(6%8+*?" Z:$" 98L$5" 8&
@*6$5%*Q"1%$*"%+"%6*"E3*68.%h( 1$"+(635$,"E8.91$.$+6$)" !"3+.(6E:$)"*6(+)(5)*"E8.X
91%(+E$?"M8"86:$5"B4f"E(+" $")$918!$)"%+"*8".(+!"E5$(6%A$"L(!*?
@991%E(6%8+*"*3E:"(*"A8%E$.(%1,":8*6$)"E8+&$5$+E%+0,"E(11"e3$3%+0"(+)"(0$+6*,".3*%E
8+":81),"(+)"E(11"9(5Q%+0"(5$"(11"*6(+)(5)"&$(635$*" 3%16"5%0:6"%+68"6:$"*8&6L(5$?"'85$X
8A$5,"@*6$5%*Q"E(+"%+6$05(6$"L%6:"86:$5" 3*%+$**"6$E:+8180%$*"%+"L(!*"6:(6"E18*$),"958X
95%$6(5!"B4f*"E(+"*E(5E$1!")5$(."8&?
@*6$5%*Q"E(+"(99$(5"e3%6$")(3+6%+0"(+)"E8.91$\"68"("+$L"3*$5,"L:%E:"%*"L:!")8E3X
.$+6(6%8+"%*"*8"%.9856(+6"68"%6*"058L6:?"^8E3.$+6(6%8+"18L$5*"6:$" (55%$5"68"$+65!"(+)
:$19*"9$891$"E8+6$.91(6$"6:$"98**% %1%6%$*?
B58)3E$)" L%6:" 6:$" 0$+$583*" *399856" 8&" FG2$%11!" '$)%(," 5(!2+,(/#" 7 26 82*,0,!,92
:;,<2" %*" 6:$" 6:%5)" $)%6%8+" 8&" L:(6" L(*" &85.$51!" E(11$)" 5(!2+,(/#6 7 26 =;!;+26 .*
7212" .0&?"_$")$E%)$)"68"E:(+0$"6:$"+(.$" $E(3*$"@*6$5%*Q":(*" $$+"*8"L%1)1!"*3EX
E$**&31"6:(6"%6"%*"+8"18+0$5"(+"39X(+)XE8.%+0"6$E:+8180!?"@*6$5%*Q":(*"(55%A$)?
Z:%*" 88Q"L(*"L5%66$+"&85,"(+)" !,".$. $5*"8&"6:$"@*6$5%*Q"E8..3+%6!?
Audience
Z:%*" 88Q"%*"%+6$+)$)"68" $"0$+61$"68L(5)"6:8*$"+$L"68"@*6$5%*Q," 36"L$"(**3.$"6:(6
!83G5$"&(.%1%(5"L%6:" (*%E"#%+3\"().%+%*65(6%8+,"+$6L85Q%+0,"(+)"86:$5"HZ")%*E%91%+$*?
H&" +86," L$" $+E835(0$" !83" 68" $\9185$" 6:$" A(*6" (+)" L8+)$5&31" 1% 5(5!" 8&" 88Q*" 6:(6
FG2$%11!"93 1%*:$*"8+"6:$*$"*3 d$E6*?"_$"(1*8"(**3.$"!83G5$"&(%51!"+$L"68"6$1$E8..3X
+%E(6%8+*"R 86:"65()%6%8+(1"*L%6E:$)"6$1$9:8+!"(+)"6:$"+$L"L851)"8&"/8%E$"8A$5"HBS?
K8L$A$5,"6:%*" 88Q"L%11"(1*8" $"3*$&31"&85"6:$".85$"$\9$5%$+E$)"@*6$5%*Q"().%+%*65(685?
_$"835*$1A$*"3*$"6:$" 88Q"(*"("5$&$5$+E$"&85"&$(635$*"6:(6"L$":(A$+G6"3*$)"&85"("L:%1$?
xxiii
Organization
Z:$" 88Q"%*"850(+%h$)"%+68"6:$*$"E:(96$5*V
? )"!2+6@A6567212" .0&6B29.1;!,.0
Z:%*"%*"L:$5$"L$"E:89"39"6:$"Q%+)1%+0"(+)"1%0:6"6:$"&%5$?"_$1E8.$"68"@*6$5%*Qp
? )"!2+6CA65(!2+,(/65+3 ,!23!;+2
^%*E3**$*"6:$"&%1$"*653E635$"8&"(+"@*6$5%*Q"*!*6$.?
? )"!2+6DA6E0(!)11,0F65(!2+,(/
78A$5*"8 6(%+%+0,"E8.9%1%+0,"(+)"%+*6(11%+0"@*6$5%*Q?
? )"!2+6GA6E0,!,)16?.0*,F;+)!,.067)(/(
^$*E5% $*" *8.$" %+%6%(1" E8+&%035(6%8+" 6(*Q*" &85" !835" +$L" @*6$5%*Q" *!*6$.?" Z:%*
E:(96$5" 08$*" 8A$5" *8.$" 8&" 6:$" E8+&%035(6%8+" &%1$*" 5$e3%5$)" &85" (11" @*6$5%*Q
%+*6(11(6%8+*?
? )"!2+6HA6I(2+6829,326?.0*,F;+)!,.0
B58A%)$*"03%)(+E$"8+"E8+&%035%+0"@*6$5%*Q"68"(118L")$A%E$*"*3E:"(*"6$1$9:8+$*"68
E8++$E6"(+)".(Q$"E(11*?
? )"!2+6JA68,)1"1)06K)(,3(
H+658)3E$*"6:$":$(56"8&"@*6$5%*Q,"6:$")%(191(+?
? )"!2+6LA6M;!(,<26?.0023!,9,!&
^%*E3**$*":8L"68"E8+&%035$"@*6$5%*Q"68"E8++$E6"68"86:$5"*!*6$.*,"*3E:"(*"86:$5
@*6$5%*Q"*$5A$5*,"H+6$5+$6"6$1$9:8+!"*$5A%E$"958A%)$5*,"85"6:$"91(%+"81)"6$1$9:8+$
+$6L85Q?
? )"!2+6NA6O.,32%),1
78A$5*"6:$"3*(0$"8&"8+$"8&"6:$".8*6"98931(5"(991%E(6%8+*"%+E13)$)"L%6:"@*6$5%*Q,
6:$"A8%E$.(%1"*!*6$.?
? )"!2+6PA6E0!2+0)!,.0)1,Q)!,.0
T8E3*$*"8+"%**3$*"6:(6"(+"@*6$5%*Q"().%+%*65(685"*:831)" $"(L(5$"8&"L:$+")$918!X
%+0"("*!*6$."836*%)$"8&"M856:"@.$5%E(?
? )"!2+6@RA6822"2+6,0!.6! 268,)1"1)0
J8$*"8A$5"*8.$".85$"()A(+E$)")%(191(+"E8+E$96*?
? )"!2+6@@A6S)+/,0F6)0<6S)F,0F
^$*E5% $*"6:$"3*(0$"8&"6L8"98931(5"6$1$9:8+!"&$(635$*"%+E13)$)"L%6:"@*6$5%*Q,"E(11
9(5Q%+0"(+)"9(0%+0?
? )"!2+6@CA6E0!2+02!6?)116B.;!,0F
78A$5*"6$E:+%e3$*"&85"5836%+0"E(11*" $6L$$+")%&&$5$+6"().%+%*65(6%A$")8.(%+*"8+
6:$"H+6$5+$6?
? )"!2+6@DA65;!.%)!,36?)1168,(!+,-;!,.06T5?8U6V;2;2(
^%*E3**$*":8L"68" 3%1)"E(11"e3$3$*"%+"@*6$5%*Q?
xxiv | Preface
? )"!2+6@GA6829,326W!)!2(
H+658)3E$*" 6:$" E8+E$96" 8&" )$A%E$" *6(6$*" (+)" :8L" 6:$!" E(+" $" 3*$)" (*" 95$*$+E$
%+)%E(685*?
? )"!2+6@HA67 265;!.%)!2<65!!20<)0!
78A$5*":8L"68" 3%1)"(".$+3%+0"*!*6$."3*%+0"6:$"@*6$5%*Q")%(191(+?
? )"!2+6@JA6B21)!,.0)168)!)-)(26E0!2F+)!,.0
^%*E3**$*"A(5%83*"L(!*"6:(6"@*6$5%*Q"E(+" $"%+6$05(6$)"L%6:"(")(6( (*$?
? )"!2+6@LA6E0!2+)3!,926O.,326B2(".0(2
J8$*"8A$5":8L"@*6$5%*Q"E(+" $"3*$)"68" 3%1)"(991%E(6%8+*"6:(6"(E6"8+"%+936"958A%)$)
!"("E(11$5?
? )"!2+6@NA6X>!2+0)16W2+9,32(
B58A%)$*"%+*653E6%8+*"8+":8L"68"E8++$E6"68"$\6$5+(1"*$5A%E$*"%+E13)%+0"#^@B,"E(1X
$+)(5*,"H'@B"&85"A8%E$.(%1,"f'BB,"DQ!9$,"(+)"6$\6X68X*9$$E:?
? )"!2+6@PA6=)>
^%*E3**$*"6:$"A(5%83*"896%8+*"&85"%+6$05(6%+0"*$+)%+0"(+)"5$E$%A%+0"&(\$*"L%6:"(+
@*6$5%*Q"*!*6$.?
? )"!2+6CRA65(!2+,(/6Y)0)F2+6E0!2+*)326T5YEU
H+658)3E$*"("+$6L85Q"@BH"&85".8+%685%+0"(+)"E8+65811%+0"(+"@*6$5%*Q"*!*6$.?
? )"!2+6C@A65(!2+,(/6:)!2Z)&6E0!2+*)326T5:EU
H+658)3E$*"6:$"@*6$5%*Q"@BH"6:(6"(118L*"E(11"E8+6581"68" $"%.91$.$+6$)"%+"(+!"958X
05(..%+0"1(+03(0$?
? )"!2+6CCA6?1;(!2+,0F
^%*E3**$*"("+3. $5"8&"(9958(E:$*"&85"E13*6$5%+0".316%91$"@*6$5%*Q"*$5A$5*"680$6:$5
8+E$"6:$")$.(+)*"8&"(")$918!.$+6"$\E$$)"6:$"E(9( %1%6%$*"8&"("*%+01$"*$5A$5?
? )"!2+6CDA68,(!+,-;!2<6I0,92+()16[;%-2+68,(3.92+&6T8I[8,U
78A$5*"("9$$5X68X9$$5"95868E81"+(6%A$"68"@*6$5%*Q"6:(6"E(+" $"3*$)"&85"E(11"5836%+0?
? )"!2+6CGA6W&(!2%6Y.0,!.+,0F6)0<6\.FF,0F
H+658)3E$*"*8.$"8&"6:$"%+6$5&(E$*"(A(%1( 1$"&85"1800%+0"(+)".8+%685%+0"(+"@*6$5%*Q
*!*6$.?
? )"!2+6CHA6]2-6E0!2+*)32(
@"*35A$!"8&"*8.$"8&"6:$"L$ "%+6$5&(E$*"6:(6"E8.91$.$+6"(+"@*6$5%*Q"%+*6(11(6%8+?
? )"!2+6CJA6W23;+,!&
^%*E3**$*" *8.$" E8..8+" *$E35%6!" %**3$*" 6:(6" @*6$5%*Q" ().%+%*65(685*" *:831)" $
(L(5$"8&?
? )"!2+6CLA65(!2+,(/#656=;!;+26*.+67212" .0&
H+"E8+E13*%8+,"L$")%*E3**"*8.$"8&"6:$"6:%+0*"L$"$\9$E6"68"*$$"&58."89$+"*835E$
6$1$9:8+!"%+"6:$"+$(5"&3635$?
5""20<,>65A6I0<2+(!)0<,0F67212" .0&
[\9185$*"6:$"6$E:+8180%$*"%+"3*$"%+"65()%6%8+(1"6$1$E8."+$6L85Q*?"Z:%*"3*$)"68" $
("E:(96$5"%+"81)"A$5*%8+*"8&"6:%*" 88Q?"@16:830:"+86")%5$E61!"5$1$A(+6"68"@*6$5%*Q
Preface | xxv
L$"&$16"6:(6"%6".%0:6"*6%11" $"3*$&31"68"*8.$"5$()$5*,"*8"L$GA$"1$&6"%6"%+"6:$" 88Q"(*
(+"(99$+)%\?
5""20<,>6KA6S+.!.3.1(6*.+6O.ES
^$1A$*"%+68"(11"6:$"9(56%E31(5%6%$*"8&"/8%E$"8A$5"HB?"Z:%*"L(*"(1*8"("E:(96$5"%+"81)
A$5*%8+*"8&"6:%*" 88Q?
5""20<,>6?A6S+2")+,0F6)6W&(!2%6*.+65(!2+,(/
78+6(%+*"%+&85.(6%8+"!83"*:831)" $"(L(5$"8&"(+)"6(Q$"%+68"E8+*%)$5(6%8+"L:$+
91(++%+0"(+"@*6$5%*Q")$918!.$+6?
Software
Z:%*" 88Q"%*"&8E3*$)"8+")8E3.$+6%+0"@*6$5%*Q"A$5*%8+">?Wq":8L$A$5,".(+!"8&"6:$"E8+X
A$+6%8+*"(+)".3E:"8&"6:$"%+&85.(6%8+"%+"6:%*" 88Q"%*"A$5*%8+X(0+8*6%E?"#%+3\"%*"6:$
89$5(6%+0"*!*6$."L$":(A$"53+"(+)"6$*6$)"@*6$5%*Q"8+,"(+)"L$":(A$")8E3.$+6$)"%+*6(1X
1(6%8+"%+*653E6%8+*"&85" 86:"7$+6FD"R2$)"K(6"[+6$595%*$"#%+3\r (*$)S"(+)"C 3+63
R^$ %(+X (*$)S"L:$5$"6:$!")%&&$5"&58."$(E:"86:$5?
Z:%*"%E8+"*%0+%&%$*"("6%9,"*300$*6%8+,"85"0$+$5(1"+86$?
xxvi | Preface
Z:%*"%E8+"%+)%E(6$*"("L(5+%+0"85"E(36%8+?
How to Contact Us
B1$(*$"())5$**"E8..$+6*"(+)"e3$*6%8+*"E8+E$5+%+0"6:%*" 88Q"68"6:$"93 1%*:$5V
FG2$%11!"'$)%(,"H+E?
>==I"J5(A$+*6$%+"K%0:L(!"M856:
D$ (*68981,"7@"NIOP<
RW==S"NNWXNNYW"R%+"6:$"C+%6$)"D6(6$*"85"7(+()(S
RP=PS"W<NX=I>I"R%+6$5+(6%8+(1"85"18E(1S
RP=PS"W<NX=>=O"R&(\S
Preface | xxvii
_$":(A$"("L$ "9(0$"&85"6:%*" 88Q,"L:$5$"L$"1%*6"$55(6(,"$\(.91$*,"(+)"(+!"())%6%8+(1
%+&85.(6%8+?"g83"E(+"(EE$**"6:%*"9(0$"(6V
!!"#$$.+2,11&'3.%$3)!)1.F$PLNRHPJH@LDGC
Z8"E8..$+6"85"(*Q"6$E:+%E(1"e3$*6%8+*"( 836"6:%*" 88Q,"*$+)"$.(%1"68V
-../^;2(!,.0(4.+2,11&'3.%
T85" .85$" %+&85.(6%8+" ( 836" 835" 88Q*," E8+&$5$+E$*," 2$*835E$" 7$+6$5*," (+)" 6:$
FG2$%11!"M$6L85Q,"*$$"835"L$ *%6$"(6V
!!"#$$ZZZ'.+2,11&'3.%
T%+)"3*"8+"T(E$ 88QV" !!"#$$*)32-../'3.%$.+2,11&
T8118L"3*"8+"ZL%66$5V" !!"#$$!Z,!!2+'3.%$.+2,11&%2<,)
_(6E:"3*"8+"g83Z3 $V" !!"#$$ZZZ'&.;!;-2'3.%$.+2,11&%2<,)
Acknowledgments
Z8"^(A%)"^3&&$66,"6:(+Q*"&85"6:$"$\E$11$+6"E:(96$5"8+"%+6$5+(6%8+(1%h(6%8+,"L:%E:"L831)
+86":(A$" $$+"*$5A$)"L$11" !" $%+0"L5%66$+" !"3*"M856:"@.$5%E(+*?
M$\6,"L$"L(+6"68"6:(+Q"835"&(+6(*6%E"$)%685,"'%E:($1"#83Q%)$*,"&85"!835"9(6%$+E$"L%6:
6:%*"6:%5)"$)%6%8+,"L:%E:"688Q"688"18+0"68"0$6"8&&"6:$"0583+),"(+)".(+!"18+0".8+6:*"68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(+)"05839"981%E%$*"&85"@*6$5%*Q"%+*6(11(6%8+?"H+"6:$"9(*6
%6"L(*"E8..8+"68"d3*6"%+*6(11"@*6$5%*Q"L%6:"+..!"9$5.%**%8+*," 36"L$":(A$"$1$E6$)"68
)$*E5% $"(+"%+*6(11(6%8+"958E$**"6:(6"%*".85$"%+"Q$$9%+0"L%6:"#%+3\" $*6"95(E6%E$*,t"(+)
6:$*$"&%+$"0$+6*"E8+65% 36$)"68"835")%*E3**%8+*"8+"6:(6?
]3)8*"68"(11"6:$"&81Q*"L85Q%+0"8+"6:$"T5$$D_HZ7K,"g@Z[,"D[2,"](.(%1%8,"F9$+DHBD,
D[2,"*%9f$E*,"_88.$5(,"(+)"(+!"86:$5"89$+"*835E$"6$1$E8."958d$E6*,"&85"*6%.31(6%+0
+$L"6:830:6*,"(+)"&85"93*:%+0"6:$"$+A$189$?
[A$5!8+$"%+"6:$"@*6$5%*Q"E8..3+%6!"(1*8"+$$)*"68"6:(+Q"-%."^%\8+"&85"E5$(6%+0"6:$
&%5*6"89$+"*835E$"6$1$9:8+!":(5)L(5$"%+6$5&(E$*,"*6(56%+0"6:$"5$A8136%8+,"(+)"0%A%+0":%*
E5$(6%8+*"68"6:$"E8..3+%6!"(6"1(50$?
Preface | xxix
T%+(11!," (+)" .8*6" %.9856(+61!," 6:(+Q*" 08" 68" '(5Q" D9$+E$5," 6:$" 85%0%+(1" (36:85" 8&
@*6$5%*Q"(+)"&83+)$5"8&"^%0%3.,"&85"@*6$5%*Q,"&85"B%)0%+"R !!"#$$ZZZ'",<F,0',%S,"(+)
&85"E8+65% 36%+0":%*"E5$(6%8+*"68"6:$"89$+"*835E$"E8..3+%6!?"@*6$5%*Q"%*"!835"1$0(E!p
Leif Madsen
H6"*856"8&"(.(h$*".$"L:$5$"H"*6(56$)"L%6:"@*6$5%*Q,"(+)"L:$5$"HGA$"08+$"L%6:"@*6$5%*Q?
H+"<==<,"L:%1$"(66$+)%+0"*E:881,"(" 3+E:"8&".!"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*"+86"18*6"8+".$?"@&6$5"("E8391$"8&":835*"8&"188Q%+0"(6"6:$
*8&6L(5$"(+)"0$66%+0"%6"E8.9%1$),"H"*6(56$)"6$11%+0"8+$"8&".!"6$(E:$5*"( 836"6:$"B7H
E(5)*" (+)" :8L" .(! $" L$" E831)" 0$6" *8.$" &85" 6:$" E1(**588." &85" 1( *" (+)" *3E:" R835
E1(**588.":()"Y="E8.936$5*"(6">="6( 1$*"8&"YS?"K$"1%Q$)"6:$"%)$("(+)"*6(56$)"6(1Q%+0"68
6:$"95805(."E885)%+(685,"(+)"L%6:%+"( 836"Y=".%+36$*"(+"85)$5":()" $$+"91(E$)"&85
<=" E(5)*?" B5$66!" (.(h%+0" E8+*%)$5%+0" 6:$!" L$5$" Z^'O==B*" )$EQ$)" 836" L%6:" &835
)(30:6$5"E(5)*,"(+)"6:$!":()"8+1!":$(5)"( 836"6:$."(+":835"95%85"68"6:(6?
Z:$+"6:$"8 *$**%8+" $0(+?"H"*9$+6"$A$5!"$\65(".8.$+6"8&"6:(6"*$.$*6$5"L%6:"("E8391$
8&"E8.936$5*")$)%E(6$)"68"@*6$5%*Q"3*$?"H+"6:8*$"6L8".8+6:*,"H"1$(5+$)"("186?"Z:$+"L$
:()"("E8X89" 5$(Q?"H")%)+G6"&%+)"(+!"L85Q"%..$)%(6$1!,"*8"H".8A$)":8.$"(+)"E8+6%+3$)
L85Q%+0"8+"@*6$5%*Q,"*9$+)%+0"6%.$"8+"H27,"5$()%+0"6:5830:"$\(.91$*"98*6$)" !"-8:+
Z8)),"(+)"d3*6"65!%+0"68"L5(9".!":$()"(583+)":8L"6:$"*8&6L(5$"L85Q$)?"#3EQ%1!"H":()
("186"8&":$19"8+"H27"R&85"6:$*$"L$5$"6:$")(!*"95%85"68"(+!")8E3.$+6(6%8+"8+"@*6$5%*QS,
(+)"H"1$(5+$)"("186".85$")35%+0"6:(6"*$.$*6$5?
D$$%+0"6:(6"6:$"9$891$"L:8"688Q"("05$(6"%+6$5$*6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+" )(6( (*$" %+6$05(6%8+" R6:(+Q*" Z%10:.(+" &85" func_odbcS" (+)" E13*6$5%+0
R6:(+Q*"'(5Q"D9$+E$5"&85"^CM^%S?"H"5$(11!"18A$"@*6$5%*Q,"(+)"(11"6:(6"%6G*"(118L$)".$
68")8?
T%5*6,"6:(+Q*"68".!"9(5$+6*"2%EQ"(+)"7(581,"&85"6:$"3+)$5*6(+)%+0"(+)"*399856"%+"$AX
$5!6:%+0"HGA$")8+$"%+".!"1%&$?"T58."6:$"&%5*6"E8.936$5"6:$!"935E:(*$)"&85"&(5"688".3E:
.8+$!"L:$+"H"L(*"%+"05()$"`"RH"*6(56$)"6(Q%+0"(+"%+6$5$*6"%+"E8.936$5*"%+"05()$"<"3*%+0
("78..8)85$"`O,"(+)"6:$!"086".$"("E8.936$5"(&6$5"("9(5$+6X6$(E:$5"%+6$5A%$L"("&$L
!$(5*"1(6$5S"68"1$66%+0".$"3*$"6:$":8.$"9:8+$"1%+$"&85".!"44D"$+)$(A85*"R(+)"$A$+63(11!
0$66%+0".$".!"8L+"9:8+$"1%+$S,"(+)"$A$5!6:%+0"$1*$"6:$!":(A$"$A$5")8+$"&85".$,"H"E(+
+$A$5"6:(+Q"6:$."$+830:?"H"18A$"!83" 86:".85$"6:(+"!83G11"$A$5"%.(0%+$?
Z:(+Q*"68".!"J5(+).("Z"&85"1$66%+0".$"3*$":$5"<W`")35%+0"6:$"!$(5*"L:$+"H")%)+G6
:(A$"("E8.936$5"(6":8.$,"(+)"&85"6(Q%+0".$"*:899%+0"$A$5!"!$(5"8+".!" %56:)(!"&85
>I"!$(5*?"#8A$"186*p
Z8".!" $(36%&31"L%&$,"^(+%$11$,"&85"*$66%+0"6:$"(1(5."$A$5!".85+%+0" $&85$"*:$"1$&6"&85
L85Q,"1$66%+0".$"*1$$9"6:8*$"$\65(">=".%+36$*" $&85$"*6(56%+0"8+"6:%*" 88Q,"(+)"3+)$5X
*6(+)%+0"L:$+"H":()"68"L85Q"1(6$" $E(3*$"H"L$+6"9(*6".!"N"@?'?"*689XL5%6%+0"6%.$,
6:(+Q"!83"(+)"H"18A$"!83"*8".3E:?
Z:$5$"(5$"*8".(+!"9$891$"L:8":$19".$"(+)"6$(E:".$"+$L"6:%+0*"$A$5!")(!," 36"6:$
.8*6" %+&13$+6%(1" 8+" .!" 1%&$" %+" @*6$5%*Q" (5$" 6:$" &8118L%+0V" '(5Q" D9$+E$5" &85" L5%6%+0
*8&6L(5$"6:(6":(*"0%A$+".$"("&(+6(*6%E"E(5$$5,"-8:+"Z8))"&85":%*"$(51!"$\(.91$*,"45%(+
]?"_$*6"&85":%*"$(51!":$19"(+)"$+6:3*%(*."8+"H27,"D6$A$"D8Q81"(+)"F11$"-8:(+**8+"&85
&1!%+0".$"68".!"&%5*6"@*65%78+"R(+)"*3 *$e3$+6"8+$*pS"(+)"1$66%+0".$" $"9(56"8&"6:$"&%5*6
@*6$5%*Q"65(%+%+0"E1(**$*,"-(5$)"D.%6:"&85":$19%+0"*6(56"6:$")8E3.$+6(6%8+"958d$E6"(+)
)8%+0"(11"6:$"%+&5(*653E635$"6:(6"H"E831)"+$A$5":(A$")8+$,"-%."/(+"'$00$1$+"&85"d8%+%+0
%+"$(51!"8+"6:$"958d$E6"(+)"6$(E:%+0".$"+$L"L(!*"68"188Q"(6"1%&$,"(+)"23**$11"45!(+6"&85
$%+0"(+"(.(h%+0"958d$E6"1$()$5"(+)"$(*!"68"L85Q"L%6:"$A$5!")(!,"(+)"&85"+86":81)%+0
("053)0$"( 836"6:$" 3*:?
Preface | xxxi
@*6$5%*Q":(*"958A$+"6:(6"89$+"*835E$"6$1$E8."%*"("1(*6%+0"%)$(,"(+)"6:$"89$+"*835E$
6$1$E8."1(+)*E(9$"%*"+8L()(!*"E8.91$.$+6$)" !".85$"6:(+"d3*6"@*6$5%*Q?"B58d$E6*"1%Q$
T5$$*L%6E:," *%9f$E*" R&58." D%9T83+)5!S," F9$+D[2U](.(%1%8UF9$+DHBD," (+)" .(+!,
.(+!".85$"R(+)".85$"68"E8.$S":$19"68"583+)"836"6:$"$E8*!*6$.?
H"L(+6"68"6(Q$"6:%*"8998563+%6!"68"6:(+Q".!"A$5!"088)"&5%$+)"#$%&"'()*$+,"L:8":(*
$$+"L%6:".$"6:5830:"(11"6:5$$"$)%6%8+*?"H+"835")(%1!"1%A$*"L$")8+G6"(1L(!*":(A$".(+!
8998563+%6%$*"68"L85Q"L%6:"$(E:"86:$5"R85"$A$+"05( "("9%+6,"6:$*$")(!*pS,"(+)"%6G*"(1L(!*
(")$1%0:6"68"L85Q"L%6:"!83?"H"(1*8"L(+6"68"6:(+Q"23**$11"45!(+6,"L:8"d8%+$)"3*"&85"6:%*
$)%6%8+,"(+)"L:8*$")$)%E(6%8+"68"6:%*"958d$E6"(+)"6:$"@*6$5%*Q"958d$E6"%+"0$+$5(1"%*"(+
%+*9%5(6%8+"68".$?"g83G5$"("2$+(%**(+E$".(+,"23**$11?"Z8"-(5$)"D.%6:,"L:8":$19$)
&83+)"6:$"@*6$5%*Q"^8E3.$+6(6%8+"B58d$E6"(+)"E8(36:85$)"6:$"&%5*6"6L8"$)%6%8+*"L%6:
#$%&"(+)".$"R 36":(*"*%+E$".8A$)"8+"68"6:$"T$)85("958d$E6S,"H"E(+"8+1!"*(!V"@*6$5%*QG*
18**"%*"T$)85(G*"0(%+?
H"L831)"1%Q$"68"6:(+Q".!" 3*%+$**"9(56+$5*"(6"785$"Z$1$E8."H++8A(6%8+*"(+)"%78+X
A$50$)"##7,"L%6:836"L:8."H"E831)"+86")8"(11"6:$"E881"6:%+0*"H"0$6"68")8"%+".!"958&$*X
*%8+(1"E(5$$5?
H"L831)"1%Q$"68"6:(+Q"(11".!"&5%$+)*"%+"6:$"%.958A"E8..3+%6!,"&85":$19%+0".$"68"Q$$9
1(30:%+0"(6"(11"6:$"E:(11$+0$*"6:(6"1%&$"95$*$+6*?
Z:(+Q*"68"(11".!"&(.%1!,"L:8" 5%+0"18A$"%+68".!"1%&$?
T%+(11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6$(.?"H"(."$\65$.$1!"05(6$&31"&85"6:$
8998563+%6!"68"E8+65% 36$"68"*8".(+!"(5$(*"8&"6:$"@*6$5%*Q"958d$E6?"Z:$5$"(5$".(+!
9$891$"6:(6")$*$5A$"6:(+Q*"&85"6:$"*399856"6:$!":(A$"958A%)$)"(18+0"6:$"L(!?
xxxii | Preface
Z8".!"L%&$,"-31%$,"H"E(++86"6:(+Q"!83"$+830:"&85"(11"6:$"18A$"(+)"*399856"!83":(A$
0%A$+".$?"Z:(+Q"!83"&85"Q$$9%+0".!"1%&$" (1(+E$)"(+)":(99!?"g83"(5$"6:$" $*6?"H"18A$
!83p
Z8".!"9(5$+6*,"6:(+Q"!83"&85"0%A%+0".$"*8".(+!"05$(6"8998563+%6%$*"%+".!"1%&$"68"$\9185$
)%&&$5$+6"6:%+0*"(+)"&%+)"L:(6"H"5$(11!"$+d8!?"g83"6(30:6".$"68"L85Q":(5)"(+)"+$A$5
0%A$"39?
Z8"#$%&"(+)"-%.,"6:(+Q"!83"&85"!835"%+A%6(6%8+"68"E8+65% 36$"68"6:%*" 88Q?"H6":(*" $$+
("&3+"958d$E6,"1(50$1!")3$"68"6:$"91$(*35$"8&"L85Q%+0"L%6:"6:$"6L8"8&"!83?"Z:(+Q*"&85
6:$"1(30:*"(+)"&85"!835")$)%E(6%8+"68"6:%*" 88Q"(*"("6$(."$&&856?
H":(A$"1$(5+$)"("186"&58.".(+!"9$891$"(6"^%0%3.?"Z:$5$"(5$"6:5$$"9$891$"L:8"*6(+)"836
6:$".8*6"(*".!".$+685*V"'(5Q"D9$+E$5,"]$A%+"B?"T1$.%+0,"(+)"^(A%)"^$(68+?"Z:(+Q
!83"(11"&85"08%+0"6:$"$\65(".%1$"68"6$(E:".$"(18+0"6:$"L(!?"H"(."$\65$.$1!"05(6$&31?
Z8"6:$"*8&6L(5$")$A$189.$+6"6$(."(6"^%0%3.,"6:(+Q"!83"&85" $%+0"*3E:"(+"(.(h%+0
6$(."68"L85Q"L%6:?"g835")$)%E(6%8+"(+)" 5%11%(+E$"91(!"(":30$"9(56"%+"6:$"*3EE$**"8&
@*6$5%*Q"(+)".(Q$"^%0%3."("05$(6"91(E$"68"L85Q?
Z8"Z5(A%*"@\6$11,"6:(+Q"!83"&85"!835":$19"%+".!"$(51!")(!*"8&"1$(5+%+0"( 836"#%+3\"(+)
&85" $%+0"("088)"&5%$+)?
Z8".!")80*,"7:18$"(+)"4(\6$5,"6:(+Q*"&85"Q$$9%+0".$"E8.9(+!"L:%1$"H"L85Q$)"8+"6:$
88Q"$A$5!".85+%+0?
Z8"(11"8&".!"&5%$+)*"(+)"&(.%1!,"6:(+Q"!83"&85"!835"18A$,"*399856,"(+)"&3+"6%.$*?
Z8"6:$"$+6%5$"@*6$5%*Q"E8..3+%6!,"6:(+Q"!83"&85"3*%+0,"$+d8!%+0,"(+)"E8+65% 36%+0"68
@*6$5%*Q?"_$":89$"!83"$+d8!"6:$" 88Qp
Preface | xxxiii
CHAPTER 1
A Telephony Revolution
1
S" )$A$189" 6:$" 5$e3%5$)" *Q%11*" 6:5830:" %+*653E6%8+," 95(E6%E$," (+)" (" 088)" 88Q" 8+
6:$"*3 d$E6?
s Z:$" 6$5." ^DB" (1*8" .$(+*" )%0%6(1" *%0+(1" 958E$**85," L:%E:" %*" (" )$A%E$" R3*3(11!" (" E:%9S" 6:(6" %*" E(9( 1$" 8&
%+6$595$6%+0"(+)".8)%&!%+0"*%0+(1*"8&"A(5%83*"*856*?"H+"("A8%E$"+$6L85Q,"^DB*"(5$"95%.(5%1!"5$*98+*% 1$"&85
$+E8)%+0,")$E8)%+0,"(+)"65(+*E8)%+0"(3)%8"%+&85.(6%8+?"Z:%*"E(+"5$e3%5$"("186"8&"E8.936(6%8+(1"$&&856?
t -%."^%\8+,"jZ:$"K%*685!"8&"c(9(6("Z$1$9:8+!"(+)"K8L"H6"2$1(6$*"68"6:$"@*6$5%*Q"B4fk"R !!"#$$ZZZ
')(!2+,(/<.3('.+F$%.<;12($!,0&3.0!20!$,0<2>'" "`,<a@RS?
u _$"5$(1%h$"6:(6"6:$"6$E:+8180!"8&"6:$"H+6$5+$6"&85.$)"836"8&"08A$5+.$+6"(+)"(E()$.%E"%+*6%636%8+*," 36"L:(6
L$G5$"6(1Q%+0"( 836":$5$"%*"+86"6:$"6$E:+8180!"8&"6:$"H+6$5+$6"*8".3E:"(*"6:$"E31635(1"9:$+8.$+8+"8&"%6,
L:%E:"$\918)$)"%+"6:$"$(51!"GN=*?
v 4$6L$$+"6:$"5$1$(*$*"8&"@*6$5%*Q">?<"(+)"@*6$5%*Q">?O,"8A$5"O,==="39)(6$*"L$5$".()$"68"6:$"E8)$"%+"6:$"D/M
5$98*%685!?"4$6L$$+"6:$"5$1$(*$*"8&"@*6$5%*Q">?O"(+)">?W,"8A$5">=,==="39)(6$*"L$5$".()$?
H6"*:831)" $"+86$)"6:(6"6:$*$"&81Q*"+$$)"+86"1$(A$")%*(998%+6$)?"D$A$5(1"958d$E6*":(A$"(5%*$+"68"18L$5"6:$
(55%$5*"68"$+65!"&85"@*6$5%*Q?"4!"&(5"6:$".8*6"98931(5"(+)"L$11"Q+8L+"%*"6:$"T5$$B4f"%+6$5&(E$"R(+)"6:$
.316%63)$"8&"958d$E6*" (*$)"8+"%6S?"Z:$*$"%+6$5&(E$*"RE:$EQ"836" !!"#$$ZZZ'9.,"b,0*.'.+F$Z,/,$9,2Z$5(!2+,(/
c:IE"&85"(+"%)$("8&":8L".(+!"6:$5$"(5$S")8"+86".(Q$"%6"$(*%$5"68"1$(5+"@*6$5%*Q," $E(3*$"6:$!"*$9(5(6$"!83
&58."6:$"91(6&85."85")%(191(+"E8+&%035(6%8+," 36".(+!"8&"6:$."L%11")$1%A$5"("L85Q%+0"B4f"68"!83".3E:"&(*6$5
6:(+"6:$".85$":(+)*X8+"(9958(E:"L$"$.918!"%+"6:%*" 88Q?
wZ:$" 6$1$E8." %+)3*65!" :(*" $$+" 95$)%E6%+0" (" 5$A8136%8+" *%+E$" $&85$" 6:$" E5(*:q" 6%.$" L%11" 6$11" :8L" L$11" %6
5$*98+)*"68"6:$"."206(.;+32"5$A8136%8+?
Z:$" @*6$5%*QX^$A" 1%*6" %*" +86" *$E8+)X1$A$1" *399856p" H&" !83" *E5811
6:5830:"6:$".(%1%+0"1%*6"(5E:%A$*,"!83G11"*$$"6:%*"%*"("*65%E6"531$?"Z:$
@*6$5%*QX^$A".(%1%+0"1%*6"%*"( 836")%*E3**%8+"8&"E85$"@*6$5%*Q")$X
A$189.$+6," (+)" e3$*6%8+*" ( 836" %+6$5&(E%+0" !835" $\6$5+(1" 958X
05(.*"A%("@JH"85"@'H"*:831)" $"98*6$)"8+"6:$"5(!2+,(/bI(2+("1%*6?
s '85$"6:(+"Y=y,"(6"1(*6"E83+6?
t Z:$"f)(!2+,(/b<29"E:(++$1"%*"&85"6:$")%*E3**%8+"8&"E:(+0$*"68"6:$"3+)$51!%+0"E8)$" (*$"8&"@*6$5%*Q"(+)"%*"(1*8
+86" *$E8+)X6%$5" *399856?" ^%*E3**%8+*" 5$1(6$)" 68" 95805(..%+0" $\6$5+(1" (991%E(6%8+*" 6:(6" %+6$5&(E$" L%6:
@*6$5%*Q"A%("@JH"85"@'H"(5$".$(+6"68" $"%+"f)(!2+,(/?
u Z8"5$0%*6$5,"53+"$%(F60,3/(2+96 21""L:$+"!83"E8++$E6"68"6:$"*$5A%E$"A%("!835"&(A85%6$"H27"E1%$+6?
Conclusion
D8"L:$5$"68" $0%+l"_$11,"L:$+"%6"E8.$*"68"@*6$5%*Q,"6:$5$"%*"&(5".85$"68"6(1Q"( 836"6:(+
L$"E(+"&%6"%+68"8+$" 88Q?"Z:%*" 88Q"E(+"8+1!"1(!")8L+"6:$" (*%E*," 36"&58."6:%*"&83+X
)(6%8+"!83"L%11" $"( 1$"68"E8.$"68"(+"3+)$5*6(+)%+0"8&"6:$"E8+E$96"8&"@*6$5%*Qi(+)
&58."6:(6,"L:8"Q+8L*"L:(6"!83"L%11" 3%1)l
@*6$5%*Q" %*" A$5!" )%&&$5$+6" &58." 86:$5," .85$" 65()%6%8+(1" B4f*," %+" 6:(6" 6:$" )%(191(+" %+
@*6$5%*Q"65$(6*"(11"%+E8.%+0"E:(++$1*"%+"$**$+6%(11!"6:$"*(.$".(++$5?
H+"("65()%6%8+(1"B4f,"6:$5$"%*"("180%E(1")%&&$5$+E$" $6L$$+"*6(6%8+*"R6$1$9:8+$"*$6*S"(+)
653+Q*"R5$*835E$*"6:(6"E8++$E6"68"6:$"836*%)$"L851)S?"Z:%*".$(+*,"&85"$\(.91$,"6:(6
!83"E(+G6"%+*6(11"(+"$\6$5+(1"0(6$L(!"8+"("*6(6%8+"9856"(+)"5836$"$\6$5+(1"E(11*"68"%6
L%6:836"5$e3%5%+0"!835"3*$5*"68")%(1"6:$"$\6$+*%8+"+3. $5"&%5*6?"@1*8,"6:$"E8+E$96"8&
(+"8&&X*%6$"5$*835E$"R*3E:"(*"("5$E$96%8+")$*QS"%*".3E:".85$")%&&%E316"68"%.91$.$+6"8+
("65()%6%8+(1"B4f," $E(3*$"6:$"*!*6$."L%11"+86"(118L"$\6$5+(1"5$*835E$*"(+!"(EE$**"68
%+6$5+(1"&$(635$*?s
@*6$5%*Q,"8+"6:$"86:$5":(+),")8$*"+86":(A$"(+"%+6$5+(1"E8+E$96"8&"653+Q*"85"*6(6%8+*?"H+
@*6$5%*Q,"$A$5!6:%+0"6:(6"E8.$*"%+68"85"08$*"836"8&"6:$"*!*6$."9(**$*"6:5830:"("E:(++$1"
8&"*8.$"*856?"Z:$5$"(5$".(+!")%&&$5$+6"Q%+)*"8&"E:(++$1*q":8L$A$5,"6:$"@*6$5%*Q")%(191(+"
:(+)1$*"(11"E:(++$1*"%+"("*%.%1(5".(++$5,"L:%E:".$(+*"6:(6,"&85"$\(.91$,"(+"%+6$5+(1
3*$5"E(+"$\%*6"8+"6:$"$+)"8&"(+"$\6$5+(1"653+Q"R$?0?,"("E$11"9:8+$S"(+)" $"65$(6$)" !"6:$
)%(191(+"%+"$\(E61!"6:$"*(.$".(++$5"(*"6:(6"3*$5"L831)" $"%&"*:$"L$5$"8+"(+"%+6$5+(1
$\6$+*%8+?"C+1$**"!83":(A$"L85Q$)"L%6:"("65()%6%8+(1"B4f,"%6".(!"+86" $"%..$)%(6$1!
8 A%83*":8L"98L$5&31"(+)"1% $5(6%+0"6:%*"%*?"T%035$"<X>"%113*65(6$*"6:$")%&&$5$+E$*" $X
6L$$+"6:$"6L8"(5E:%6$E635$*?
s Z8" $"&(%5,".(+!"65()%6%8+(1"B4f*")8"8&&$5"6:%*"*856"8&"&3+E6%8+(1%6!?"K8L$A$5,"%6"%*"0$+$5(11!"Q13)0!,"1%.%6$)
%+"&$(635$*,"(+)"5$e3%5$*"E8.91$\,"95895%$6(5!"*8&6L(5$"68" $"%+*6(11$)"%+"6:$"B4f"R*3E:"(*"A$+)85X*9$E%&%E
95868E81"$\6$+*%8+*S?
9
=,F;+26Cb@'65(!2+,(/69('6SKg6)+3 ,!23!;+2
Modules
@*6$5%*Q"%*" 3%16"8+"%.<;12(?"@".8)31$"%*"("18()( 1$"E8.98+$+6"6:(6"958A%)$*"("*9$E%&%E
&3+E6%8+(1%6!,"*3E:"(*"("E:(++$1")5%A$5"R&85"$\(.91$,"3 )0h(,"'(.S,"85"("5$*835E$"6:(6
(118L*"E8++$E6%8+"68"(+"$\6$5+(1"6$E:+8180!"R*3E:"(*"*;03h.<-3'(.S?"@*6$5%*Q".8)31$*
(5$"18()$)" (*$)"8+"6:$"$2!3$)(!2+,(/$%.<;12('3.0*"&%1$?"_$"L%11")%*E3**"6:$"3*$"8&".(+!
.8)31$*"%+"6:%*" 88Q?"@6"6:%*"98%+6"L$"d3*6"L(+6"68"%+658)3E$"6:$"E8+E$96"8&".8)31$*,
(+)"0%A$"!83"("&$$1"&85"6:$"6!9$*"8&".8)31$*"6:(6"(5$"(A(%1( 1$?
H6"%*"(E63(11!"98**% 1$"68"*6(56"@*6$5%*Q"L%6:836"(+!".8)31$*"(6"(11,"(16:830:"%+"6:%*"*6(6$
%6"L%11"+86" $"E(9( 1$"8&")8%+0"(+!6:%+0?"H6"%*"3*$&31"68"3+)$5*6(+)"6:$".8)31(5"+(635$
8&"@*6$5%*Q"%+"85)$5"68"(995$E%(6$"6:$"(5E:%6$E635$?
g83"E(+"*6(56"@*6$5%*Q"L%6:"+8".8)31$*"18()$)" !")$&(316"(+)"18()"$(E:
)$*%5$)".8)31$".(+3(11!"&58."6:$"E8+*81$," 36"6:%*"%*"+86"*8.$6:%+0
6:(6"!83G)"L(+6"68"936"%+68"958)3E6%8+q"%6"L831)"8+1!" $"3*$&31"%&"!83
L$5$"9$5&85.(+E$X63+%+0"("*!*6$."L:$5$"!83"L(+6$)"68"$1%.%+(6$"$AX
$5!6:%+0"+86"5$e3%5$)" !"!835"*9$E%&%E"(991%E(6%8+"8&"@*6$5%*Q?
Z:$"6!9$*"8&".8)31$*"%+"@*6$5%*Q"%+E13)$"6:$"&8118L%+0V
x @991%E(6%8+*
x 45%)0%+0".8)31$*
x 7(11")$6(%1"5$E85)%+0"R7^2S".8)31$*
x 7:(++$1"$A$+6"1800%+0"R7[#S".8)31$*
Modules | 11
@+)"+8L,"L%6:836"&356:$5"()8,"1$6G*"6(Q$"("188Q"(6"6:$".8)31$*,"05839$)" !".8)31$
6!9$?
Applications
^%(191(+"(991%E(6%8+*"(5$"3*$)"%+"2>!20(,.0('3.0*"68")$&%+$"6:$"A(5%83*"(E6%8+*"6:(6"E(+
$"(991%$)"68"("E(11?"Z:$" Dial()"(991%E(6%8+,"&85"$\(.91$,"%*"5$*98+*% 1$"&85".(Q%+0
83608%+0"E8++$E6%8+*"68"$\6$5+(1"5$*835E$*"(+)"%*"(503( 1!"6:$".8*6"%.9856(+6")%(191(+
(991%E(6%8+?"Z:$"(A(%1( 1$"(991%E(6%8+*"(5$"1%*6$)"%+"Z( 1$"<X>?
7)-126Cb@'68,)1"1)06)""1,3)!,.0(
Name Purpose Popularity/Status
app_adsiprog Loads Analog Display Services Interface (ADSI) scripts into Insignificant
compatible analog phones
app_alarmreceiver Supports receipt of reports from alarm equipment Insignificant
app_amd Detects answering machines Unreliable
app_authenticate Compares dual-tone multi-frequency (DTMF) input against Useful
a provided string (password)
app_cdr Writes ad hoc record to CDR Useful
app_celgenuserevent Generates user-defined events for CEL New
app_chanisavail Checks the status of a channel Unreliable
app_channelredirect Forces another channel into a different part of the Useful
dialplan
app_chanspy Allows a channel to listen to audio on another channel Useful
app_confbridge Provides conferencing (new version) New—not fully featured yet
app_controlplayback Plays back a prompt and offers fast forward and rewind Useful
functions
app_dahdibarge Allows barging in on a DAHDI channel Deprecated—see
app_chanspy
app_dahdiras Creates a RAS server over a DAHDI channel (no modem em- Insignificant
ulation)
app_db Used to add/change/delete records in Asterisk’s built-in Deprecated—see func_db
Berkeley database
app_dial Used to connect channels together (i.e., make phone calls) Essential
app_dictate Plays back a recording and offers start/stop functions Useful
app_directed_pickup Answers a call for another extension Useful
app_directory Presents the list of names from voicemail.conf Useful
app_disa Provides dialtone and accepts DTMF input Usefula
app_dumpchan Dumps channel variables to Asterisk command-line Useful
interface (CLI)
Modules | 13
Name Purpose Popularity/Status
app_read Requests input of digits from callers and assigns input to a Useful
variable
app_readexten Requests input of digits from callers and passes call to a Usable
designated extension and context
app_readfile Loads contents of a text file into a channel variable Deprecated—see the FILE()
function in func_env
app_record Records received audio to a file Useful
app_rpt Provides a method to interface with an audio board for the Limited
app_rpt project
app_sayunixtime Plays back time in specified format Useful
app_senddtmf Transmits DTMF to calling party Useful
app_sendtext Sends a text string to compatible channels Insignificant
app_setcallerid Sets CallerID on a channel Deprecated—see func_call
erid
app_skel Sample application for developers Usefulc
app_sms Sends SMS message in compatible countries Limited
app_softhangup Requests hangup of channel Useful
app_speech_utils Provides utilities relating to speech recognition Usefuld
app_stack Provides Gosub(), GoSubIf(), Return(), Stack Essential
Pop(), LOCAL(), and LOCAL_PEEK()
app_system Executes commands in a Linux shell Useful
app_talkdetect Similar to app_background, but allows for any received Useful
audio to interrupt playback
app_test Client/server testing application Usable
app_transfer Performs a transfer on the current channel Useful
app_url Passes a URI to the called channel Limited
app_userevent Generates a custom event in the Asterisk Manager Useful
Interface (AMI)
app_verbose Generates a custom event in the Asterisk CLI Useful
app_voicemail Provides voicemail Essential
app_waitforring Waits for a RING signaling event (not to be confused with Insignificant
RINGING); most likely unnecessary, as only chan_dahdi
with analog channels where ringing is received (such as an
FXO port) generates the RING signaling event
app_waitforsilence Includes WaitForSilence() and WaitForNoise(); Useful
listens to the incoming channel for a specified number of
milliseconds of noise/silence
app_waituntil Waits until current Linux epoch matches specified epoch Useful
Bridging Modules
45%)0%+0".8)31$*"(5$"+$L"%+"@*6$5%*Q">?WV"6:$!"9$5&85."6:$"(E63(1" 5%)0%+0"8&"E:(++$1*
%+"6:$"+$L" 5%)0%+0"@BH?"[(E:"958A%)$*")%&&$5$+6"&$(635$*,"L:%E:"0$6"3*$)"%+")%&&$5$+6
*%63(6%8+*")$9$+)%+0"8+"L:(6"(" 5%)0$"+$$)*?"Z:$*$".8)31$*,"1%*6$)"%+"Z( 1$"<X<,"(5$
E355$+61!"8+1!"3*$)"&85"R(+)"(5$"$**$+6%(1"68S"app_confbridge?
7)-126CbC'6K+,<F,0F6%.<;12(
Name Purpose Popularity/Status
bridge_builtin_features Performs bridging when utilizing built-in user features (such as New
those found in features.conf).
bridge_multiplexed Performs complex multiplexing, as would be required in a large New
conference room (multiple participants). Currently only used by
app_confbridge.
bridge_simple Performs simple channel-to-channel bridging. New
bridge_softmix Performs simple multiplexing, as would be required in a large New
conference room (multiple participants). Currently only used by
app_confbridge.
Modules | 15
7)-126CbD'6?)116<2!),16+23.+<,0F6%.<;12(
Name Purpose Popularity/Status
cdr_adaptive_odbc Allows writing of CDRs through ODBC frame- Useful
work with ability to add custom fields
cdr_csv Writes CDRs to disk as a comma-separated Usable
values file
cdr_custom As above, but allows for the addition of custom Useful
fields
cdr_manager Outputs CDRs to Asterisk Manager Interface Useful
(AMI)
cdr_odbc Writes CDRs through ODBC framework Usable
cdr_pgsql Writes CDRs to PostgreSQL Useful
cdr_radius Writes CDRs to RADIUS Usable—does not support custom fields
cdr_sqlite Writes CDRs to SQLite2 database Deprecated—use sqlite3_custom
cdr_sqlite3_custom Writes CDRs to SQLite3 with custom fields Useful
cdr_syslog Writes CDRs to syslog Useful
cdr_tds Writes CDRs to Microsoft SQL or Sybase Usable—requires an old version of libtds
_$" L%11" )%*E3**" *8.$" 5$9856%+0" 9(EQ(0$*" 6:(6" !83" .(!" L%*:" 68" 3*$" L%6:" 7^2" %+
7:(96$5"<I?
Modules | 17
Codec Translators
Z:$"E8)$E"65(+*1(685*"RZ( 1$"<X`S"(118L"@*6$5%*Q"68"E8+A$56"(3)%8"*65$(."&85.(6*" $X
6L$$+"E(11*?"D8"%&"("E(11"E8.$*"%+"8+"("B2H"E%5E3%6"R3*%+0"J?P>>S"(+)"+$$)*"68" $"9(**$)
836" (" E8.95$**$)" DHB" E:(++$1" R$?0?," 3*%+0" J?P<N," 8+$" 8&" .(+!" E8)$E*" 6:(6" DHB" E(+
:(+)1$S,"6:$"5$1$A(+6"E8)$E"65(+*1(685"L831)"9$5&85."6:$"E8+A$5*%8+?t
H&"("E8)$E"R*3E:"(*"J?P<NS"3*$*"("E8.91$\"$+E8)%+0"(1085%6:.,":$(A!
3*$"8&"65(+*E8)%+0"E(+"91(E$"(".(**%A$" 35)$+"8+"6:$"7BC?"D9$E%(1%h$)
:(5)L(5$"&85"6:$")$E8)%+0U$+E8)%+0"8&"J?P<N"%*"(A(%1( 1$"&58.":(5)X
L(5$".(+3&(E635$5*"*3E:"(*"D(+08.("(+)"^%0%3."R(+)"1%Q$1!"86:$5*S?
7)-126CbJ'6?.<236!+)0(1)!.+(
Name Purpose Popularity/Status
codec_adpcm Adaptive Differential Pulse Coded Modulation codec Insignificant
codec_alaw A-law PCM codec used all over the world (except Canada/USA) on the PSTN Essential
codec_a_mu A-law to mu-law direct converter Useful
codec_dahdi Utilizes proprietary Digium hardware transcoding card Essentiala
codec_g722 Wideband audio codec Useful
codec_g726 Flavor of ADPCM Insignificant
codec_gsm Global System for Mobile Communications (GSM) codec Useful
codec_ilbc Internet Low Bitrate Codec Insignificant
codec_lpc10 Linear Predictive Coding vocoder (extremely low bandwidth) Insignificant
codec_resample Resamples between 8-bit and 16-bit signed linear Usable
codec_speex Speex codec Usable
codec_ulaw Mu-law PCM codec used in Canada/USA on PSTN Essential
a If you are using a Digium codec transcoder card.
Format Interpreters
T85.(6"%+6$595$6$5*"RZ( 1$"<XPS"9$5&85."6:$"&3+E6%8+"8&"E8)$E"65(+*1(685*," 36"6:$!")8
6:$%5"L85Q"8+"&%1$*"5(6:$5"6:(+"E:(++$1*?"H&"!83":(A$"("5$E85)%+0"8+"(".$+3"6:(6":(*
$$+"*685$)"(*"JD',"("&85.(6"%+6$595$6$5"L831)"+$$)"68" $"3*$)"68"91(!"6:(6"5$E85)%+0
68"(+!"E:(++$1*"+86"3*%+0"6:$"JD'"E8)$E?u
Dialplan Functions
^%(191(+" &3+E6%8+*," 1%*6$)" %+" Z( 1$" <XW," E8.91$.$+6" 6:$" )%(191(+" (991%E(6%8+*" R*$$
j@991%E(6%8+*k"8+"9(0$"><S?"Z:$!"958A%)$".(+!"3*$&31"$+:(+E$.$+6*"68"6:%+0*"1%Q$
*65%+0":(+)1%+0,"6%.$"(+)")(6$"L5(+01%+0,"(+)"F^47"E8++$E6%A%6!?
7)-126CbN'68,)1"1)06*;03!,.0(
Name Purpose Popularity/Status
func_aes Encrypts/decrypts an AES string Useful
func_audiohookinherit Allows calls to be recorded after transfer Useful
func_base64 Encodes/decodes a base-64 string Usable
func_blacklist Writes/reads blacklist in astdb Useful
v D8.$"E8)$E*"E(+"%.98*$"("*%0+%&%E(+6"18()"8+"6:$"7BC,"*3E:"6:(6"("*!*6$."6:(6"E831)"*399856"*$A$5(1":3+)5$)
E:(++$1*"L%6:836"65(+*E8)%+0".%0:6"8+1!" $"( 1$"68":(+)1$"("&$L")8h$+"L:$+"65(+*E8)%+0"%*"%+"3*$?
Modules | 19
Name Purpose Popularity/Status
func_callcompletion Gets/sets call completion configuration parameters for the channel New
func_callerid Gets/sets CallerID Useful
func_cdr Gets/sets CDR variable Useful
func_channel Gets/sets channel information Useful
func_config Includes AST_CONFIG(); reads variables from config file Usable
func_connectedline Changes connected line information on supported handsets New
func_curl Uses cURL to obtain data from a URI Useful
func_cut Slices and dices strings Useful
func_db Provides astdb functions Useful
func_devstate Gets state of device Useful
func_dialgroup Creates a group for simultaneous dialing Useful
func_dialplan Validates that designated target exists in dialplan Useful
func_enum Performs ENUM lookup Useful
func_env Includes FILE(), STAT(), and ENV(); performs operating system Useful
actions
func_extstate Returns status of a hinted extension Useful
func_global Gets/sets global variables Useful
func_groupcount Gets/sets channel count for members of a group Useful
func_iconv Converts between character sets Usable
func_lock Includes LOCK(), UNLOCK(), and TRYLOCK(); sets a lock that can Useful
be used to avoid race conditions in the dialplan
func_logic Includes ISNULL(), SET(), EXISTS(), IF(), IFTIME(), and Useful
IMPORT(); performs various logical functions
func_math Includes MATH(), INC(), and DEC(); performs mathematical Useful
functions
func_md5 Converts supplied string to an MD5 hash Useful
func_module Checks to see if supplied module is loaded into memory Usable
func_odbc Allows dialplan integration with ODBC resources Useful
func_pitchshift Shifts the pitch of an audio stream Useful
func_rand Returns a random number within a given range Useful
func_realtime Performs lookups within the Asterisk Realtime Architecture (ARA) Useful
func_redirecting Provides access to information about where this call was redirected Useful
from
func_sha1 Converts supplied string to an SHA1 hash Useful
func_shell Performs Linux shell operations and returns results Useful
func_speex Reduces noise and performs dB gain/loss on an audio stream Useful
PBX Modules
Z:$"B4f".8)31$*"(5$"9$5%9:$5(1".8)31$*"6:(6"958A%)$"$+:(+E$)"E8+6581"(+)"E8+&%03X
5(6%8+".$E:(+%*.*?"T85"$\(.91$," pbx_config"%*"6:$".8)31$"6:(6"18()*"6:$"65()%6%8+(1
@*6$5%*Q")%(191(+?"Z:$"E355$+61!"(A(%1( 1$"B4f".8)31$*"(5$"1%*6$)"%+"Z( 1$"<XN?
7)-126CbP'6SKg6%.<;12(
Name Purpose Popularity/Status
pbx_ael Asterisk Extension Logic (AEL) offers a dialplan scripting language that looks like a Usablea
modern programming language.
pbx_config This is the traditional, and most popular, dialplan language for Asterisk. Without Useful
this module, Asterisk cannot read extensions.conf.
pbx_dundi Performs data lookups on remote Asterisk systems. Useful
pbx_loopback Performs something similar to a dialplan include, but in a deprecated manner. Insignificantb
pbx_lua Allows creation of a dialplan using the Lua scripting language. Useful
pbx_realtime Provides functionality related to the Asterisk Realtime Architecture. Useful
pbx_spool Provides outgoing spool support relating to Asterisk call files. Useful
a We have not found too many people using AEL. We suspect this is because most developers will tend to use AGI/AMI if they do not want
to use traditional dialplans.
b We’ve never heard of this being used in production.
Resource Modules
2$*835E$".8)31$*"%+6$05(6$"@*6$5%*Q"L%6:"$\6$5+(1"5$*835E$*?"T85"$\(.91$," res_odbc
(118L*"@*6$5%*Q"68"%+6$589$5(6$"L%6:"F^47")(6( (*$"E8++$E6%8+*?"Z:$"E355$+61!"(A(%1X
( 1$"5$*835E$".8)31$*"(5$"1%*6$)"%+"Z( 1$"<X>=?
Modules | 21
7)-126Cb@R'6B2(.;+326%.<;12(
Name Purpose Popularity/Status
res_adsi Provides ADSI Essentiala
res_ael_share Provides shared routines for use with pbx_ael Essential if you’re using AEL
res_agi Provides Asterisk Gateway Interface Useful
res_ais Provides distributed message waiting indication (MWI) and Useful
device state notifications via an implementation of the AIS
standard, such as OpenAIS
res_calendar Enables base integration to calendaring systems Useful
res_calendar_caldav Provides CalDAV-specific capabilities Useful
res_calendar_exchange Provides MS Exchange capabilities Useful
res_calendar_icalendar Provides Apple/Google iCalendar capabilities Useful
res_clialiases Creates CLI aliases Useful
res_clioriginate Originates a call from the CLI Usable
res_config_curl Pulls configuration information using cURL Useful
res_config_ldap Pulls configuration information using LDAP Usable
res_config_odbc Pulls configuration information using ODBC Useful
res_config_pgsql Pulls configuration information using PostgreSQL Usable
res_config_sqlite Pulls configuration information using SQLite Usable
res_convert Uses the CLI to perform file conversions Usable
res_crypto Provides cryptographic capabilities Useful
res_curl Provides common subroutines for other cURL modules Useful
res_fax Provides common subroutines for other fax modules Useful
res_fax_spandsp Plug-in for fax using the spandsp package Useful
res_http_post Provides POST upload support for the Asterisk HTTP server Usable
res_jabber Provides Jabber/XMPP resources Useful
res_limit Enables adjusting of system limits on the Asterisk process Usable
res_monitor Provides call recording resources Useful
res_musiconhold Provides music on hold (MOH) resources Essential
res_mutestream Allows muting/unmuting of audio streams New
res_odbc Provides common subroutines for other ODBC modules Useful
res_phoneprov Provisions phones from Asterisk HTTP server New
res_pktccops Provides PacketCable COPS resources New
res_realtime Provides CLI commands for the Asterisk Realtime Useful
Architecture (ARA)
res_rtp_asterisk Provides RTP Essential
res_rtp_multicast Provides multicast-RTP New
Addon Modules
@))8+".8)31$*"(5$"E8..3+%6!X)$A$189$)".8)31$*"L%6:")%&&$5$+6"3*(0$"85")%*65% 36%8+
5%0:6*"&58."6:8*$"8&"6:$".(%+"E8)$?"Z:$!"(5$"Q$96"%+"("*$9(5(6$")%5$E685!"(+)"(5$"+86
E8.9%1$)"(+)"%+*6(11$)" !")$&(316?"Z8"$+( 1$"6:$*$".8)31$*,"3*$"6:$"%20;(2123!" 3%1)
E8+&%035(6%8+"36%1%6!?"7355$+61!"(A(%1( 1$"())8+".8)31$*"(5$"1%*6$)"%+"Z( 1$"<X>>?
7)-126Cb@@'65<<.06%.<;12(
Name Purpose Popularity/Status
app_mysql Executes MySQL queries with a Deprecated—see func_odbc
dialplan application
app_saycountpl Says Polish counting words Deprecated—now integrated in say.conf
cdr_mysql Logs call detail records to a MySQL Usable—we recommend cdr_adaptive_odbc instead
database
chan_mobile Enables making and receiving Limiteda
phone calls using cell phones over
Bluetooth
chan_ooh323 Enables making and receiving VoIP Usable
calls using the H.323 protocol
format_mp3 Allows Asterisk to play MP3 files Usable
res_config_mysql Uses a MySQL database as a real- Useful
time configuration backend
a While chan_mobile works great with many phones, problems have been reported with some models. When a problem does occur, it
is very difficult for developers to solve unless they have a phone of the same model to test with.
Modules | 23
Test Modules
Z$*6".8)31$*"(5$"3*$)" !"6:$"@*6$5%*Q")$A$189.$+6"6$(."68"A(1%)(6$"+$L"E8)$?"Z:$!
(5$"E8+*6(+61!"E:(+0%+0"(+)" $%+0"())$)"68,"(+)"(5$"+86"3*$&31"3+1$**"!83"(5$")$A$1X
89%+0"@*6$5%*Q"*8&6L(5$?
H&"!83"(5$"(+"@*6$5%*Q")$A$189$5,":8L$A$5,"6:$"@*6$5%*Q"Z$*6"D3%6$".(!" $"8&"%+6$5$*6"68
!83"(*"!83"E(+" 3%1)"(368.(6$)"6$*6*"&85"@*6$5%*Q"(+)"*3 .%6"6:8*$" (EQ"68"6:$"958d$E6,
L:%E:"53+*"8+"*$A$5(1")%&&$5$+6"89$5(6%+0"*!*6$.*"(+)"6!9$*"8&".(E:%+$*?"4!"$\9(+)%+0
6:$"+3. $5"8&"6$*6*"E8+*6(+61!,"6:$"@*6$5%*Q"958d$E6"(A8%)*"6:$"E5$(6%8+"8&"5$05$**%8+*
%+"E8)$?"4!"*3 .%66%+0"!835"8L+"6$*6*"68"6:$"958d$E6,"!83"E(+"&$$1".85$"E8+&%)$+6"%+
&3635$"3905()$*?
'85$"%+&85.(6%8+"( 836"%+*6(11%+0"6:$"@*6$5%*Q"Z$*6"D3%6$"%*"(A(%1( 1$"%+"6:%*" 180"98*6V
!!"#$$-1.F(')(!2+,(/'.+F$CR@R$RG$CP$,0(!)11,0Fb! 2b)(!2+,(/b!2(!b(;,!2$?" '85$" %+&85.(X
6%8+"( 836" 3%1)%+0"6$*6*"%*"(A(%1( 1$"%+"6:%*")8E3.$+6V" !!"#$$(90')(!2+,(/'.+F$(90$!2(!
(;,!2$)(!2+,(/$!+;0/$BX58YX'!>!"85"!83"E(+"d8%+"6:$"f)(!2+,(/b!2(!,0F"E:(++$1"8+"6:$
T5$$+8)$"H27"+$6L85Q?
File Structure
@*6$5%*Q"%*"("E8.91$\"*!*6$.,"E8.98*$)"8&".(+!"5$*835E$*?"Z:$*$"5$*835E$*".(Q$"3*$
8&"6:$"&%1$*!*6$."%+"*$A$5(1"L(!*?"D%+E$"#%+3\"%*"*8"&1$\% 1$"%+"6:%*"5$0(5),"%6"%*":$19&31"68
3+)$5*6(+)"L:(6")(6("%*" $%+0"*685$),"*8"6:(6"!83"E(+"3+)$5*6(+)"L:$5$"!83"(5$"1%Q$1!
68"&%+)"("9(56%E31(5" %6"8&"*685$)")(6("R*3E:"(*"A8%E$.(%1".$**(0$*"85"180"&%1$*S?
Configuration Files
Z:$" @*6$5%*Q" E8+&%035(6%8+" &%1$*" %+E13)$" 2>!20(,.0('3.0*," (,"'3.0*," %.<;12('3.0*," (+)
)8h$+*"8&"86:$5"&%1$*"6:(6")$&%+$"9(5(.$6$5*"&85"6:$"A(5%83*"E:(++$1*,"5$*835E$*,".8)X
31$*,"(+)"&3+E6%8+*"6:(6".(!" $"%+"3*$?
Z:$*$"&%1$*"L%11" $"&83+)"%+"$2!3$)(!2+,(/?"g83"L%11" $"L85Q%+0"%+"6:%*"&81)$5"("186"(*"!83
E8+&%035$"(+)"().%+%*6$5"!835"@*6$5%*Q"*!*6$.?
Modules
@*6$5%*Q".8)31$*"(5$"3*3(11!"%+*6(11$)"68"6:$"$;(+$1,-$)(!2+,(/$%.<;12("&81)$5?"g83"L%11
+86"+85.(11!":(A$"68"%+6$5(E6"L%6:"6:%*"&81)$5q":8L$A$5,"%6"L%11" $"8EE(*%8+(11!"3*$&31
68"Q+8L"L:$5$"6:$".8)31$*"(5$"18E(6$)?"T85"$\(.91$,"%&"!83"3905()$"@*6$5%*Q"(+)"*$1$E6
)%&&$5$+6".8)31$*")35%+0"6:$"%20;(2123!"9:(*$"8&"6:$"%+*6(11,"6:$"81)"R%+E8.9(6% 1$S
.8)31$*" &58." 6:$" 95$A%83*" @*6$5%*Q" A$5*%8+" L%11" +86" $" )$1$6$)," (+)" !83" L%11" 0$6" (
L(5+%+0"&58."6:$"%+*6(11"*E5%96?"Z:8*$"81)"&%1$*"L%11"+$$)"68" $")$1$6$)"&58."6:$"%.<;12(
&81)$5?"Z:%*"E(+" $")8+$"$%6:$5".(+3(11!"85"L%6:"6:$"j3+%+*6(11k".(Q$"R%)/26;0,0b
(!)11S"6(50$6?
The Spool
Z:$"("..1"%*"L:$5$"#%+3\"*685$*"&%1$*"6:(6"(5$"08%+0"68"E:(+0$"&5$e3$+61!,"85"L%11" $
958E$**$)" !"86:$5"958E$**$*"(6"("1(6$5"6%.$?"T85"$\(.91$,"3+)$5"#%+3\"95%+6"d8 *"(+)
9$+)%+0"$.(%1*"(5$"+85.(11!"L5%66$+"68"6:$"*9881"3+6%1"6:$!"(5$"958E$**$)?
T85" @*6$5%*Q," 6:$" *9881" %*" 3*$)" 68" *685$" 65(+*%$+6" %6$.*" *3E:" (*" A8%E$" .$**(0$*," E(11
5$E85)%+0*,"E(11"&%1$*,"(+)"*8"&856:?
Z:$"@*6$5%*Q"*9881"L%11" $"&83+)"3+)$5"6:$"$9)+$("..1$)(!2+,(/")%5$E685!?
Logging
@*6$5%*Q"%*"E(9( 1$"8&"0$+$5(6%+0"*$A$5(1")%&&$5$+6"Q%+)*"8&"180"&%1$*?"Z:$"$9)+$1.F$)(!2+b
,(/"&81)$5"%*"L:$5$"6:%+0*"*3E:"(*"E(11")$6(%1"5$E85)*"R7^2*S,"E:(++$1"$A$+6*"&58."7[#,
)$ 30"180*,"e3$3$"180*,".$**(0$*,"$5585*,"(+)"86:$5"836936"(5$"L5%66$+?
Z:%*"&81)$5"L%11" $"$\65$.$1!"%.9856(+6"&85"(+!"6583 1$*:886%+0"$&&856*"!83"3+)$56(Q$?
_$"L%11"6(1Q".85$"( 836":8L"68".(Q$"3*$"8&"@*6$5%*Q"180*"%+"7:(96$5"<O?
The Dialplan
Z:$")%(191(+"%*"6:$":$(56"8&"@*6$5%*Q?"@11"E:(++$1*"6:(6"(55%A$"%+"6:$"*!*6$."L%11" $"9(**$)
6:5830:"6:$")%(191(+,"L:%E:"E8+6(%+*"6:$"E(11X&18L"*E5%96"6:(6")$6$5.%+$*":8L"6:$"%+X
E8.%+0"E(11*"(5$":(+)1$)?
@")%(191(+"E(+" $"L5%66$+"%+"8+$"8&"6:5$$"L(!*V
x C*%+0"65()%6%8+(1"@*6$5%*Q")%(191(+"*!+6(\"%+"$2!3$)(!2+,(/$2>!20(,.0('3.0*
x C*%+0"(*6$5%*Q"[\6$+*%8+"#80%E"R@[#S"%+"$2!3$)(!2+,(/$2>!20(,.0(')21
x C*%+0"#C@"%+"$2!3$)(!2+,(/$2>!20(,.0('1;)
#(6$5"%+"6:%*" 88Q,"L$G11":(A$")$A86$)"*$A$5(1"E:(96$5*"68"6:$"*3 d$E6"8&":8L"68"L5%6$"(
)%(191(+"3*%+0"65()%6%8+(1")%(191(+"*!+6(\"R !"&(5"6:$".8*6"98931(5"E:8%E$S?"F+E$"!83
1$(5+"6:%*"1(+03(0$,"%6"*:831)" $"&(%51!"$(*!"68"65(+*%6%8+"68"@[#"85"#C@,"*:831)"!83
)$*%5$?
The Dialplan | 25
Hardware
@*6$5%*Q"%*"E(9( 1$"8&"E8..3+%E(6%+0"L%6:"("A(*6"+3. $5"8&")%&&$5$+6"6$E:+8180%$*?"H+
0$+$5(1,"6:$*$"E8++$E6%8+*"(5$".()$"(E58**"("+$6L85Q"E8++$E6%8+q":8L$A$5,"E8++$EX
6%8+*" 68" .85$" 65()%6%8+(1" 6$1$E8." 6$E:+8180%$*," *3E:" (*" 6:$" BDZM," 5$e3%5$" *9$E%&%E
:(5)L(5$?
'(+!"E8.9(+%$*"958)3E$"6:%*":(5)L(5$,"*3E:"(*"^%0%3."R6:$"*98+*85,"8L+$5,"(+)
95%.(5!" )$A$189$5" 8&" @*6$5%*QS," D(+08.(," 2:%+8," F9$+/8\," B%Q(," /8%E$658+%\,
-3+0:(++*,"^%(180%E,"f85E8.," $58M$6,"(+)".(+!"86:$5*?"Z:$"(36:85*"95$&$5"E(5)*
&58."^%0%3."(+)"D(+08.(q":8L$A$5,"6:$"958)3E6*"8&&$5$)" !"86:$5"@*6$5%*Q":(5)L(5$
.(+3&(E635$5*".(!" $".85$"*3%6( 1$"68"!835"5$e3%5$.$+6*?
Z:$" .8*6" 98931(5" :(5)L(5$" &85" @*6$5%*Q" %*" 0$+$5(11!" )$*%0+$)" 68" L85Q" 6:5830:" 6:$
^%0%3."@*6$5%*Q"K(5)L(5$"^$A%E$"H+6$5&(E$"RQ+8L+"(*"^@K^HS?"Z:$*$"E(5)*"L%11"(11
:(A$")%&&$5$+6"%+*6(11(6%8+"5$e3%5$.$+6*"(+)")%&&$5$+6"&%1$"18E(6%8+*?
H+"7:(96$5"P,"L$"L%11")%*E3**"^@K^H"%+".85$")$6(%1q":8L$A$5,"L$"L%11"1%.%6"835")%*X
E3**%8+"68"^@K^H"8+1!?"g83"L%11"+$$)"68"5$&$5"68"6:$"*9$E%&%E")8E3.$+6(6%8+"958A%)$)
!"6:$".(+3&(E635$5*"8&"(+!"E(5)*"!83"%+*6(11"&85")$6(%1*"8+"6:8*$"E(5)*?
Asterisk Versioning
Z:$"@*6$5%*Q"5$1$(*$".$6:8)8180!":(*"08+$"6:5830:"("E8391$"8&"%6$5(6%8+*"8A$5"6:$"1(*6
&$L"!$(5*,"(+)"6:%*"*$E6%8+"%*")$*%0+$)"68":$19"!83"3+)$5*6(+)"L:(6"6:$"A$5*%8+"+3. $5*
.$(+?" F&" 9(56%E31(5" 5$1$A(+E$" %*" 6:$" E:(+0$" %+" A$5*%8+%+0" 6:(6" :(99$+$)" L%6:" 6:$
>?`?>" *$5%$*" 8&" 5$1$(*$*," L:%E:" &8118L$)" (" )%&&$5$+6" +3. $5%+0" 180%E" 6:(+" (11" 86:$5
@*6$5%*Q"5$1$(*$*"R>?="68">?W"(+)"8+L(5)"&85"6:$"&85$*$$( 1$"&3635$S?
=,F;+26CbC'67 265(!2+,(/6@'J'>6+212)(26"+.32((
D8,"*8"&(5"L$":(A$" 5(+E:$*,"L:%E:"(5$">?<,">?O,">?`?=,">?`?>,"(+)">?`?<"R6:$5$"%*"+8">?`
5(+E:S?" _%6:%+" $(E:" 8&" 6:8*$" 5(+E:$*," L$" E5$(6$" !)F(" R5$1$(*$*S," L:%E:" 188Q" 1%Q$
>?<?>O,">?O?Y=,">?`?=?><,">?`?>?><,"(+)">?`?<?>I?
C+&8563+(6$1!,"%6"$+)$)"39"+86"L85Q%+0"836"6:(6">?`?>" 5(+E:$*"L$5$"E5$(6$)"&58."653+Q
$A$5!"YrO".8+6:*V"6:$")$A$189.$+6"958E$**":(*"1$)"68"(".%+%.3."5$1$(*$"6%.$"8&"`rW
.8+6:*?"M86"8+1!"6:(6," 36"6:$">?`?>"+3. $5%+0".$6:8)8180!"())*"958 1$.*"8&"%6*
8L+?"B$891$"086"E8+&3*$)"(*"68"L:(6"A$5*%8+"68"53+,"(+)"6:(6"6:$">?`?=,">?`?>,"(+)">?`?<
5(+E:$*"L$5$"(11"*$9(5(6$".(d85"A$5*%8+"3905()$*?"_:$+"!83"%+E5$(*$"6:$"+3. $5
&58.">?<"68">?O,"(+)"6:$+"68">?W,"%6"%*"8 A%83*"6:(6"6:8*$"(5$")%*6%+E6" 5(+E:$*"(+)".(d85
A$5*%8+"E:(+0$*?"_%6:">?`?=,">?`?>,"(+)">?`?<,"%6"%*"1$**"8 A%83*?
Asterisk Versioning | 27
_:%1$"6:$")$A$189.$+6"6$(."*6%11"L(+6*"68"958A%)$"(EE$**"68"+$L"&$(635$*"(+)"E85$
E:(+0$*"8+"(".85$"5$031(5" (*%*"R$A$5!"><".8+6:*" $%+0"6:$"08(1S,"6:$5$"%*"5$E80+%6%8+
6:(6"%6"%*"(1*8"088)"68"958A%)$"18+0X6$5."*399856"68"("*6( 1$,"98931(5"A$5*%8+"8&"@*6$5%*Q?
g83"E(+"6:%+Q"8&"6:$"@*6$5%*Q">?O" 5(+E:"(*" $%+0"("18+0X6$5."*399856"R#ZDS"A$5*%8+?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,".8*6"8&"L:%E:"(5$"E8.91%E(6$)
%+"6:$%5"8L+"5%0:6?"@*"*3E:,"6:$"3+)$5*6(+)%+0"8&"@*6$5%*Q"(5E:%6$E635$"E(+" $"8A$5X
L:$1.%+0?"D6%11,"6:$"5$(1%6!"%*"6:(6"@*6$5%*Q"%*"L$11X)$*%0+$)"&85"L:(6"%6")8$*"(+),"%+"835
89%+%8+,":(*"(E:%$A$)"5$.(5Q( 1$" (1(+E$" $6L$$+"&1$\% %1%6!"(+)"E8.91$\%6!?
E61.0F6!.6)33.%"1,( 6F+2)!6)0<60.-126!)(/(A6-;!6,!6,(6%&
3 ,2*6<;!&6!.6)33.%"1,( 6 ;%-126!)(/(6)(6! .;F 6! 2&
Z2+26F+2)!6)0<60.-12'67 26Z.+1<6,(6%.92<6)1.0FA60.!
.01&6-&6! 26%,F !&6( .92(6.*6,!(6 2+.2(A6-;!6)1(.6-&6! 2
)FF+2F)!26.*6! 26!,0&6";( 2(6.*62)3 6 .02(!6Z.+/2+'
iK$1$+"]$11$5
H+"6:%*"E:(96$5"L$G5$"08%+0"68"L(1Q"6:5830:"6:$"%+*6(11(6%8+"8&"@*6$5%*Q"&58."6:$"*835E$
E8)$?"'(+!"9$891$"*:!"(L(!"&58."6:%*".$6:8),"E1(%.%+0"6:(6"%6"%*"688")%&&%E316"(+)"6%.$X
E8+*3.%+0?"F35"08(1":$5$"%*"68")$.8+*65(6$"6:(6"%+*6(11%+0"@*6$5%*Q"&58."*835E$"%*"+86
(E63(11!"6:(6")%&&%E316"68")8?"'85$"%.9856(+61!,"L$"L(+6"68"958A%)$"!83"L%6:"6:$" $*6
@*6$5%*Q"91(6&85."8+"L:%E:"68"1$(5+?
H+"6:%*" 88Q"L$"L%11" $":$19%+0"!83" 3%1)"("&3+E6%8+%+0"@*6$5%*Q"*!*6$."&58."*E5(6E:?
H+"6:%*"E:(96$5"!83"L%11" 3%1)"(" (*$"91(6&85."&85"!835"@*6$5%*Q"*!*6$.?"J%A$+"6:(6"L$
(5$"%+*6(11%+0"&58."*835E$,"6:$5$"%*"986$+6%(11!"("186"8&"A(5%(6%8+"%+":8L"!83"E(+")8"6:%*?
Z:$"958E$**"L$")%*E3**":$5$"%*"8+$"6:(6"L$GA$"3*$)"&85".(+!"!$(5*,"(+)"&8118L%+0"%6"L%11
958A%)$"!83"L%6:"("*3%6( 1$"&83+)(6%8+"&85"@*6$5%*Q?
@*"9(56"8&"6:%*"958E$**"L$"L%11"(1*8"$\91(%+"%+*6(11(6%8+"8&"*8.$"8&"6:$"*8&6L(5$")$X
9$+)$+E%$*"8+"6:$"#%+3\"91(6&85."6:(6"L%11" $"+$$)$)"&85"689%E*"E8A$5$)"1(6$5"%+"6:%*
88Q"R*3E:"(*")(6( (*$"%+6$05(6%8+S?"_$"L%11"*:8L"%+*653E6%8+*"&85"%+*6(11%+0"@*6$5%*Q
8+" 86:"7$+6FD"R("2$)"K(6r (*$)")%*65% 36%8+S"(+)"C 3+63"R("^$ %(+X (*$)")%*65%X
36%8+S,"L:%E:"L$" $1%$A$"E8A$5*"6:$"A(*6".(d85%6!"8&"#%+3\")%*65% 36%8+*" $%+0"%+*6(11$)
68)(!?"_$G11"65!"68"Q$$9"6:$"%+*653E6%8+*"0$+$5(1"$+830:"6:(6"6:$!"*:831)" $"3*$&31"8+
(+!")%*65% 36%8+"8&"!835"E:8%E$?s
29
_$":(A$"E:8*$+"68"%+*6(11"8+"7$+6FD"(+)"C 3+63" $E(3*$"6:$!"(5$"6:$".8*6"98931(5
896%8+*," 36" @*6$5%*Q" %*" 0$+$5(11!" )%*65% 36%8+X(0+8*6%E?" @*6$5%*Q" L%11" $A$+" %+*6(11" 8+
D81(5%*,"4D^,"85"FD"ft"%&"!83"1%Q$?"_$"L8+G6" $"E8A$5%+0"6:$."%+"6:%*" 88Q,"6:830:,"(*
@*6$5%*Q"%*".8*6":$(A%1!")$A$189$)"8+"6:$"#%+3\"91(6&85.?
Asterisk Packages
Z:$5$" (5$" (1*8" 9(EQ(0$*" 6:(6" $\%*6" &85" @*6$5%*Q" 6:(6" E(+" $" %+*6(11$)" 3*%+0" 98931(5
9(EQ(0$X.(+(0$.$+6"95805(.*"*3E:"(*"&;%"85")"!bF2!?"g83"(5$"L$1E8.$"68"$\9$5%.$+6
L%6:"6:$.?"B5$ 3%16"9(EQ(0$*".(!"+86"(1L(!*" $"Q$96"39X68X)(6$,"6:830:,"*8"&85"6:$
1(6$*6"A$5*%8+"L$"(1L(!*"5$E8..$+)"%+*6(11%+0"&58."*835E$?
g83"E(+"&%+)"9(EQ(0$"%+*653E6%8+*"(6" !!"#$$ZZZ')(!2+,(/'.+F$<.Z01.)<($&;%?
Asterisk-Based Projects
'(+!"958d$E6*":(A$" $$+"E5$(6$)"6:(6"3*$"@*6$5%*Q"(*"6:$%5"3+)$51!%+0"91(6&85.?"D8.$
8&"6:$*$,"*3E:"(*"Z5%\ 8\,":(A$" $E8.$"*8"98931(5"6:(6".(+!"9$891$".%*6(Q$"6:$."&85
6:$"@*6$5%*Q"958)3E6"%6*$1&?"Z:$*$"958d$E6*"0$+$5(11!"L%11"6(Q$"6:$" (*$"@*6$5%*Q"958)3E6
(+)"())"("L$ X (*$)"().%+%*65(6%8+"%+6$5&(E$,"("E8.91$\")(6( (*$,"(+)"("5%0%)"*$6"8&
E8+*65(%+6*"8+":8L"E:(+0$*"E(+" $".()$"68"6:$"E8+&%035(6%8+?
_$":(A$"E:8*$+"+86"68"E8A$5"6:$*$"958d$E6*"%+"6:%*" 88Q,"&85"*$A$5(1"5$(*8+*V
>? Z:%*" 88Q"65%$*,"(*".3E:"(*"98**% 1$,"68"&8E3*"8+"@*6$5%*Q"(+)"8+1!"@*6$5%*Q?
<? 488Q*":(A$"(15$()!" $$+"L5%66$+"( 836"*8.$"8&"6:$*$"@*6$5%*QX (*$)"958d$E6*?
Y? _$" $1%$A$"6:(6"%&"!83"1$(5+"@*6$5%*Q"%+"6:$"L(!"6:(6"L$"L%11"6$(E:"!83,"6:$"Q+8L1X
$)0$"L%11"*$5A$"!83"L$11,"5$0(5)1$**"8&"L:$6:$5"!83"$A$+63(11!"E:88*$"68"3*$"8+$
8&"6:$*$"95$9(EQ(0$)"A$5*%8+*"8&"@*6$5%*Q?
O? T85"3*,"6:$"98L$5"8&"@*6$5%*Q"%*"6:(6"%6")8$*"+86"(66$.96"68"*81A$"!835"958 1$.*"&85
!83?"Z:$*$"958d$E6*"(5$"(+"$\E$11$+6"$\(.91$"8&"L:(6"E(+" $" 3%16"L%6:"@*6$5%*Q?
Z:$!"(5$"6531!"(.(h%+0?"K8L$A$5,"%&"!83"(5$"188Q%+0"68" 3%1)"!835"8L+"@*6$5%*Q
(991%E(6%8+"RL:%E:"%*"5$(11!"L:(6"@*6$5%*Q"%*"(11"( 836S,"6:$*$"958d$E6*"L%11"%.98*$
1%.%6(6%8+*"8+"!83," $E(3*$"6:$!"(5$"&8E3*$)"8+"*%.91%&!%+0"6:$"958E$**"8&" 3%1)%+0
(" 3*%+$**"B4f,"+86"8+".(Q%+0"%6"$(*%$5"68"(EE$**"6:$"&311"986$+6%(1"8&"6:$"@*6$5%*Q
91(6&85.?
AsteriskNOW http://www.asterisk.org/asterisknow
Trixbox http://www.trixbox.org
Elastix http://www.elastix.org
PBX in a Flash http://www.pbxinaflash.net
_$"5$E8..$+)"6:(6"!83"E:$EQ"6:$."836?u
CentOS yum install -y ntp && ntpdate pool.ntp.org && chkconfig ntpd \
on && service ntpd start
CentOS 64-bit yum install -y ntp && ntpdate pool.ntp.org && chkconfig ntpd \
on && service ntpd start
Ubuntu sudo apt-get install ntp
u @&6$5"!83"5$()"835" 88Q,"8&"E835*$?
v F+E$"!83":(A$"$\9$5%$+E$"L%6:"*$A$5(1"@*6$5%*Q"%+*6(11(6%8+*,"!83G11"(05$$"6:(6"%6G*"("e3%EQ"(+)"9(%+1$**"958E$**?
M$A$56:$1$**,"6:%*"E:(96$5".(!".(Q$"6:$"958E$**"188Q"E8.91$\?"Z:%*"%*"*%.91!" $E(3*$"L$":(A$"(+"8 1%0(6%8+
68"$+*35$"!83"(5$"958A%)$)"L%6:"(11"6:$"%+&85.(6%8+"!83"+$$)"68"(EE8.91%*:"("*3EE$**&31"%+*6(11?
Y? F+"7$+6FD,"())"("+$L"*!*6$."3*$5V
CentOS (32 and 64 bit) adduser asteriskpbx && passwd asteriskpbx && yum install \
sudo && visudo
D$$"j@))%+0"("*!*6$."3*$5k"8+"9(0$"YN"&85"*9$E%&%E"%+&85.(6%8+?
T85"(+"C 3+63"%+*6(11,"L$"(5$"(**3.%+0"6:(6"6:$"3*$5"E5$(6$)")35%+0
6:$"%+*6(11(6%8+"958E$**"%*")(!2+,(/"->?
O? H+*6(11"*8&6L(5$")$9$+)$+E%$*V
F5"(16$5+(6%A$1!,"!83"E831)"E:$EQ"836"("*9$E%&%E"6(0V
$ svn co http://svn.asterisk.org/svn/asterisk/tags/1.8.1
P? 43%1)"(+)"%+*6(11"6:$"*8&6L(5$V
$ cd ~/src/asterisk-complete/asterisk/1.8/
$ ./configure
7:(+0$"6:$"A(13$"8&"SELINUX"&58."enforcing"68"disabled,"6:$+"+2-..!?
>>? 75$(6$"6:$"$2!3$)(!2+,(/$")%5$E685!"(+)"E89!"6:$",0<,3)!,.0('3.0*"*(.91$"&%1$"%+68"%6V
$ sudo mkdir -p /etc/asterisk
$ sudo chown asteriskpbx:asteriskpbx /etc/asterisk
$ cd /etc/asterisk/
$ cp ~/src/asterisk-complete/asterisk/1.8/configs/indications.conf.sample \
./indications.conf
><? 789!"6:$"*(.91$")(!2+,(/'3.0*"&%1$"%+68"$2!3$)(!2+,(/"(+)"E:(+0$" runuser"(+)" run
group"68":(A$"A(13$*"8&"asteriskpbxV
$ cp ~/src/asterisk-complete/asterisk/1.8/configs/asterisk.conf.sample \
/etc/asterisk/asterisk.conf
$ vim /etc/asterisk/asterisk.conf
D$$"j%+)%E(6%8+*?E8+&"(+)"(*6$5%*Q?E8+&k"8+"9(0$"IY"&85".85$"%+&85.(6%8+?
>Y? 75$(6$"6:$"%.<;12('3.0*"&%1$?"[+( 1$"18()%+0"8&".8)31$*"(368.(6%E(11!,"(+)")%*( 1$
$\65(".8)31$*V
$ cat >> /etc/asterisk/modules.conf
; The modules.conf file, used to define which modules Asterisk should load (or
; not load).
;
[modules]
autoload=yes
Ctrl + D
>O? 78+&%035$"%;(,3.0 .1<'3.0*V
$ cat >> musiconhold.conf
; musiconhold.conf
[default]
mode=files
directory=moh
Ctrl + D
Distribution Installation
4$E(3*$"@*6$5%*Q"5$1%$*"*8":$(A%1!"8+":(A%+0"95%85%6!"(EE$**"68"6:$"7BC,"%6"%*"$**$+6%(1
6:(6"!83"%+*6(11"@*6$5%*Q"8+68"("*$5A$5"L%6:836"(+!"05(9:%E(1"%+6$5&(E$,"*3E:"(*"6:$"f
_%+)8L%+0"*!*6$."RJ+8.$,"]^[,"$6E?S?"486:"7$+6FD"(+)"C 3+63"*:%9"("JCHX&5$$
)%*65% 36%8+")$*%0+$)"&85"*$5A$5"3*(0$?"_$"L%11"E8A$5"%+*653E6%8+*"&85" 86:")%*65% 36%8+*?
CentOS Server
7$+6FD".$(+*"j78..3+%6!"[+6$595%*$"F9$5(6%+0"D!*6$.,k"(+)"%6"%*" (*$)"8+"2$)"K(6
[+6$595%*$"#%+3\"R2K[#S?"T85".85$"%+&85.(6%8+"( 836"L:(6"7$+6FD"%*"(+)"%6*":%*685!,
*$$" !!"#$$ZZZ'320!.('.+F?
g83"L%11"+$$)"68")8L+18()"(+"HDF"&58."6:$"7$+6FD"L$ *%6$,"18E(6$)"(6" !!"#$$%,++.+
'320!.('.+F$320!.($H$,(.($?"D$1$E6"$%6:$5"6:$",DNJ"85">NJhJG")%5$E685!"&85"Y<X %6"85"`OX %6
:(5)L(5$,"5$*9$E6%A$1!?"g83"L%11"6:$+" $"95$*$+6$)"L%6:"("1%*6"8&".%5585*"6:(6"(99$(5"68
$"E18*$"68"!83"9:!*%E(11!?"7:88*$"8+$"8&"6:$".%5585*,"(+)"!83"L%11" $"95$*$+6$)"L%6:
("1%*6"8&"&%1$*"68")8L+18()?"#%Q$1!"!83"L%11"L(+6"6:$"&%5*6"(A(%1( 1$"*$1$E6%8+,"L:%E:"%*"6:$
&%5*6"HDF"&%1$"8&"("*$6?"g83"L%11"8+1!"+$$)"6:$"&%5*6"HDF"&%1$"8&"6:$"*$6"(*"L$G11" $"%+*6(11%+0
())%6%8+(1"*8&6L(5$"L%6:"&;%?
F+E$"!83GA$")8L+18()$)"6:$"HDF"&%1$," 35+"%6"68"("7^"85"^/^"(+)"*6(56"6:$"%+*6(11(6%8+
958E$**?"H&"!83G5$"%+*6(11%+0"%+68"("A%563(1".(E:%+$"RL:%E:"L$")8+G6"5$E8..$+)"&85
958)3E6%8+"3*$," 36"E(+" $"("05$(6"L(!"68"6$*6"836"@*6$5%*QS,"!83"*:831)" $"( 1$"68
.83+6"6:$"HDF"&%1$")%5$E61!"(+)"%+*6(11"&58."6:$5$?
@E63(11!,"*8.$"9$891$":(A$"05$(6"*3EE$**"53++%+0"@*6$5%*Q"%+*%)$"A%563(1".(E:%+$*?"H6")8$*")$9$+)"L:(6"!83G5$
91(++%+0"8+"3*%+0"%6"&85"6:830:,"(*"!83G11":(A$"1%.%6$)"(EE$**"68":(5)L(5$,"&85"$\(.91$?
wg83"*:831)"6$*6"6:$".$)%("6:$"&%5*6"6%.$"!83"(5$"3*%+0"6:(6"9(56%E31(5"7^U^/^?
Distribution Installation | 35
7:88*$"!835"1(+03(0$"(+)".(Q$"("Q$! 8(5)"*$1$E6%8+?s"H&"!83G5$"%+"M856:"@.$5%E(,"!83
L%11"958 ( 1!"d3*6"*$1$E6"6:$")$&(316*?
H&"!83GA$"95$A%83*1!"&85.(66$)"!835":(5)")5%A$,"!83"L%11" $"(*Q$)"68"%+%6%(1%h$"6:$")5%A$,
L:%E:"L%11"$5(*$"(11")(6(?"D$1$E6" g$* ?
Z:$"%+*6(11$5"L%11"(*Q"%&"!83"L(+6"68"5$.8A$"6:$"$\%*6%+0"9(56%6%8+%+0"*E:$.$"(+)"E5$(6$
("+$L"8+$?"D$1$E6"B2%.926)116")+!,!,.0(6.06(2123!2<6<+,92(6)0<63+2)!26<2*);1!61)&.;!?"H&"(
.85$"(995895%(6$"896%8+"$\%*6*,"*$1$E6"6:(6"%+*6$()?"H+"6:$")5%A$"L%+)8L,"A$5%&!"6:(6"6:$
E855$E6")%*Q")5%A$"%*"*$1$E6$)?"RB5$**%+0" Z( "L%11"E!E1$"6:5830:"6:$"*$1$E6%8+*"8+"6:$
*E5$$+?S"F+E$"6:$")5%A$"L%+)8L"%*"*$1$E6$),"!83"E(+"*E5811"39"(+)")8L+"R95$*3.%+0
!83":(A$".316%91$")5%A$*S"(+)"*$1$E6"L:%E:":(5)")5%A$"!83"L%*:"68"%+*6(11"68?"Z8001$"6:$
*$1$E6%8+*" !"95$**%+0" *9(E$" (5 ?"/$5%&!"6:(6"6:$"E855$E6")5%A$"%*"*$1$E6$),"95$**" Z(
3+6%1"6:$" F] " 3668+"%*":%0:1%0:6$),"(+)"95$**" [+6$5 ?
@".$**(0$"E8+&%5.%+0"6:(6"!83"L(+6"68"5$.8A$"(11"#%+3\"9(56%6%8+*"(+)"E5$(6$"6:$"+$L
9(56%6%8+"*E:$.$"L%11" $"95$*$+6$)?"D$1$E6" g$* ?
g83"L%11" $"(*Q$)"68"5$A%$L"6:$"9(56%6%8+%+0"1(!836?"T$$1"&5$$"68".8)%&!"6:$"9(56%6%8+
*E:$.$"%&"!83"95$&$5"*8.$6:%+0")%&&$5$+6"R*$$"6:$"&8118L%+0"*%)$ (5"&85"*8.$"()A%E$"8+
6:%*Sq":8L$A$5,"6:$")$&(316"(+*L$5" M8 "%*"&%+$"&85"1%0:6"958)3E6%8+"3*$"L:$5$"*685(0$
5$e3%5$.$+6*"L%11" $"18L?t
K(A%+0"("&311"A813.$"%*"*6%11"(".(d85"958 1$.q":8L$A$5,"!83"L%11"(6
1$(*6" $"( 1$"68"180"%+68"6:$"*!*6$."68"5$E6%&!"6:$"*%63(6%8+?
s 4$(5"%+".%+)"6:(6"@*6$5%*Q"%*")$A$189$)"3*%+0"6:$"CD"Q$! 8(5)"(+)"1(+03(0$,"(+)"L$G5$"+86"(L(5$"8&"(+!
6$*6%+0":(A%+0" $$+")8+$"8+"(+!6:%+0"86:$5"6:(+"CD"[+01%*:?
t ^3$" 68" 6:$" $A$5X%+E5$(*%+0" *%h$" 8&" :(5)" )5%A$*," E(9(E%6!" %*" $E8.%+0" 1$**" 8&" (" 958 1$.?" @" *!*6$." L%6:" (
>"6$5( !6$")5%A$"E(+"*685$"*8.$L:$5$"%+"6:$"5(+0$"8&"<".%11%8+".%+36$*"8&"6$1$9:8+!Xe3(1%6!"5$E85)%+0*?
@".$**(0$"L%11"(99$(5"(*Q%+0"%&"!83G)"1%Q$"68"E8+&%035$"6:$"2! R"+$6L85Q"%+6$5&(E$"8+
!835"*!*6$.?"D$1$E6"g$* ?"4$"*35$"6:$"53!,9)!26.06-..!"(+)"X0)-126ES9G6(;"".+!"896%8+*
(5$"$+( 1$),"6:$+"*$1$E6" F] ?
H&" !835" +$6L85Q" 958A%)$*" (368.(6%E" HB" 958A%*%8+%+0" A%(" ^K7B," !83" E(+" d3*6" *$1$E6
F] ?"F6:$5L%*$,"*$1$E6"Y)0;)16)<<+2((63.0*,F;+)!,.0,"$+6$5"6:$"(995895%(6$"%+&85.(X
6%8+,"(+)"6:$+"*$1$E6" F] ?
M$\6,"!83G11" $"(*Q$)"68"958A%)$"(":8*6+(.$?"g83"E(+"$%6:$5"(118L"6:$"^K7B"*$5A$5"68
958A%)$"8+$"&85"!83"R%&"!835"+$6L85Q"(**%0+*":8*6+(.$*"(368.(6%E(11!S"85"$+6$5"8+$
.(+3(11!,"6:$+"*$1$E6" F] ?
g83"L%11" $"95$*$+6$)"L%6:"("1%*6"8&"6%.$"h8+$*?"K%0:1%0:6"!835"18E(1"6%.$"h8+$"(+)"*$1$E6
F] ?
@6"6:%*"98%+6,"!83"L%11" $"(*Q$)"&85"("5886"9(**L85)?"[+6$5"("*$E35$"9(**L85)"(+)"6!9$
%6"(0(%+"68"E8+&%5.?"@&6$5"$+6$5%+0"!835"*$E35$"9(**L85),"*$1$E6" F] ?
M$\6"39"L%11" $"6:$"9(EQ(0$"*$1$E6%8+?"D$A$5(1"9(EQ(0$*"6:(6"!83")8+G6"+$$)"68"%+*6(11
R(+)"6:(6"5$e3%5$"())%6%8+(1"HDF"&%1$*"!83"958 ( 1!":(A$+G6")8L+18()$)S"(5$"*$1$E6$)
!")$&(316?"^$*$1$E6"(11"896%8+*"%+"6:$"1%*6"3*%+0"6:$" *9(E$" (5,"6:$+"*$1$E6"6:$"?;(!.%,Q2
(.*!Z)+26(2123!,.0"896%8+?"F+E$"!83GA$")8+$"6:(6,"*$1$E6" F] ?
g83"L%11"6:$+" $"95$*$+6$)"L%6:"6:$"S)3/)F26:+.;"6W2123!,.0"*E5$$+?"DE5811"6:5830:"6:$
L:81$"1%*6,")$*$1$E6%+0"$(E:"%6$.?"H&"(+!"9(EQ(0$*"(5$"*$1$E6$),"!83G11" $"958.96$)"&85
())%6%8+(1"7^*"6:(6"!83":(A$"+86")8L+18()$)?"_$G11" $"%+*6(11%+0"())%6%8+(1"9(EQ(0$*
L%6:"6:$"&;%"(991%E(6%8+"(&6$5"6:$"89$5(6%+0"*!*6$."%*"%+*6(11$)?"F+E$"!83GA$")$*$1$E6$)
(11"9(EQ(0$*,"*$1$E6" F] ?
@" )$9$+)$+E!" E:$EQ" L%11" 6:$+" $" 9$5&85.$)" (+)" (" E8+&%5.(6%8+" 6:(6" %+*6(11(6%8+" %*
5$()!"68" $0%+"L%11" $"95$*$+6$)?"D$1$E6"F] "68"*6(56"6:$"%+*6(11(6%8+?"Z:$"&%1$*!*6$."L%11
6:$+" $"&85.(66$),"6:$"%+*6(11(6%8+"%.(0$"65(+*&$55$)"68"6:$":(5)")5%A$,"(+)"%+*6(11(6%8+
8&" 6:$" *!*6$." 9(EQ(0$*" 9$5&85.$)?" C98+" %+*6(11(6%8+," !83" L%11" $" (*Q$)" 68" 5$ 886?
2$.8A$"(+!".$)%("%+"6:$")5%A$*"(+)"*$1$E6"6:$" 2$ 886 " 3668+?
Distribution Installation | 37
Base system update
F+E$"!83GA$"5$ 886$)"!835"*!*6$.,"!83"+$$)"68"53+"6:$"&;%6;"<)!2"E8..(+)"68".(Q$
*35$"!83":(A$"6:$"1(6$*6" (*$"9(EQ(0$*?"Z8")8"6:%*,"180"%+"3*%+0"6:$"3*$5+(.$"+..!"(+)
6:$"9(**L85)"!83"E5$(6$)")35%+0"%+*6(11(6%8+?"F+E$"1800$)"%+,"53+"6:$"&8118L%+0V
# yum update
Is this ok [y/N]: y
_:$+"958.96$)"68"%+*6(11"6:$"1(6$*6"9(EQ(0$*,"95$**" ! "(+)"L(%6"&85"6:$"9(EQ(0$*"68
39)(6$?"H&"!83G5$"(*Q$)"68"(EE$96"("JBJ"Q$!,"95$**"! ?"_:$+"E8.91$6$,"5$ 886"6:$"*!*6$.
(*"%6"%*"1%Q$1!"6:$"Q$5+$1"L%11":(A$" $$+"39)(6$)uV
# reboot
H&"!83G5$"53++%+0"7$+6FD"D$5A$5"`OX %6,"!83G11"+$$)"68"5$.8A$"(11"6:$
Y<X %6"1% 5(5%$*".(+3(11!?"F+E$"!83GA$"5$ 886$),"85"d3*6"95%85"68"5$ 886,
53+"6:$"&8118L%+0"E8..(+)V
# yum remove *.i386 -y
78+05(631(6%8+*p"g83GA$"*3EE$**&311!"%+*6(11$)"(+)"39)(6$)"6:$" (*$"7$+6FD"*!*6$.?
Z:$")$&(316*"*:%99$)"L%6:"7$+6FD"(5$"*3&&%E%$+6"68"*!+E:58+%h$"6:$"6%.$"(+)"Q$$9"6:$
.(E:%+$G*"6%.$"%+"*!+E"L%6:"6:$"5$*6"8&"6:$"L851)?
u Z:%*"5$ 886"*6$9"%*"$**$+6%(1"95%85"68"%+*6(11%+0"@*6$5%*Q?
M8L"L$"+$$)"68"958A%)$"6:$")(!2+,(/"->"3*$5"(;<."(EE$**?"_$")8"6:%*" !".8)%&!%+0"6:$
(;<.2+("&%1$"L%6:"6:$"9,(;<."E8..(+)?"g83G11"+$$)"68"%+*6(11"9,(;<."6:$"&%5*6"6%.$"!83
3*$"%6V
# yum install sudo
_%6:"6:$"(;<.X5$1(6$)"(991%E(6%8+*"(+)"&%1$"%+*6(11$),"L$"E(+".8)%&!"6:$"(;<.2+("&%1$?
[\$E36$"6:$"9,(;<."E8..(+)"(+)"188Q"&85"6:$"1%+$*"*:8L+" $18LV
# visudo
_%6:"6:$"%wheel"1%+$"3+E8..$+6$)"(*"*:8L+"%+"835"$\(.91$,"*(A$"6:$"&%1$" !"95$**%+0
[*E ,"6:$+"6!9%+0":wq"(+)"95$**%+0" [+6$5 ?"M8L"89$+"6:$"$2!3$F+.;""&%1$"%+"!835"&(A85%6$
$)%685"R0)0."%*"$(*!"68"3*$S"(+)"&%+)"6:$"1%+$"6:(6"*6(56*"L%6:"6:$"L85)"wheel?"'8)%&!"%6
1%Q$"*8V
wheel:x:10:root,asteriskpbx
@&6$5"6!9%+0"!835"9(**L85),"!83"*:831)"0$6"6:$"836936"8&"6:$"$+..!$")%5$E685!?"H&"!83
)8+G6,"08" (EQ"(+)"A$5%&!"6:$"*6$9*"68".(Q$"*35$"!83")%)+G6"*Q%9"85".%*6!9$"(+!6:%+0?
Z:$"5$*6"8&"6:$"%+*653E6%8+*"%+"6:%*"E:(96$5"L%11"(**3.$"6:(6"!83G5$"6:$")(!2+,(/"->"3*$5
(+)"6:(6"!83":(A$"(;<."(EE$**?
F+$"1(*6"6:%+0"+$$)*"68")8+$,"L:%E:"L%11"(118L"!83"68"$+6$5"E8..(+)*"L%6:836":(A%+0
68"$+6$5"6:$"&311"9(6:?"4!")$&(316"8+1!"+..!":(*"$(-,0$"(+)"$;(+$(-,0$"%+"6:$")$&(316"*!*6$.
PATH," 36"L$G11"())"%6"68"835")(!2+,(/"->"3*$5"(*"L$11"*%+E$"L$G11" $"53++%+0".(+!"(9X
91%E(6%8+*"18E(6$)"%+"6:8*$")%5$E685%$*?
v (;<."%*"(+"(991%E(6%8+"6:(6"(118L*"("3*$5"68"$\$E36$"E8..(+)*"(*"(+86:$5"3*$5,"*3E:"(*"5886,"85"6:$"*39$53*$5?
Distribution Installation | 39
D6(56" !"89$+%+0"6:$":%))$+"&%1$"'-)( h"+.*,12"18E(6$)"L%6:%+"6:$")(!2+,(/"->":8.$")%X
5$E685!"L%6:"(+"$)%685?"_$G5$"6:$+"08%+0"68"(99$+)":/usr/sbin:/sbin"68"6:$"$+)"8&"6:$
1%+$"*6(56%+0"L%6:"PATHV
$ vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/sbin:/sbin
Ubuntu Server
C 3+63"D$5A$5"%*"("98931(5"#%+3\")%*65% 36%8+"188*$1!" (*$)"8+"^$ %(+?"Z:$5$"%*"(1*8
("98931(5")$*Q689"A$5*%8+"8&"6:$"*8&6L(5$?"Z:$"C 3+63"D$5A$5"9(EQ(0$"E8+6(%+*"+8"JCH
(+)"%*"%)$(1"&85"@*6$5%*Q"%+*6(11(6%8+*?
Z8"0$6"6:$"1(6$*6"A$5*%8+"8&"C 3+63"D$5A$5,"A%*%6" !!"#$$ZZZ';-;0!;'3.%"(+)"*$1$E6"6:$
W2+92+"6( "(6"6:$"689"8&"6:$"9(0$?"g83"L%11" $"958A%)$)"L%6:"("9(0$"6:(6"E8+6(%+*"%+&85X
.(6%8+" ( 836" C 3+63" D$5A$5" [)%6%8+?" 71%EQ%+0" 6:$" 85(+0$" 8.Z01.)<" 3668+" %+" 6:$
399$5X5%0:6"E85+$5"L%11"6(Q$"!83"68"("9(0$"L:$5$"!83"E(+"*$1$E6"$%6:$5"6:$"Y<X %6"85"`OX
%6"A$5*%8+"8&"C 3+63"D$5A$5?"@&6$5"*$1$E6%+0"8+$"8&"6:$"896%8+*,"!83"E(+"95$**"6:$"W!)+!
<.Z01.)<" 3668+?
F+E$"!83GA$")8L+18()$)"6:$"HDF"&%1$," 35+"%6"68"("7^"(+)"*6(56"6:$"%+*6(11(6%8+"958E$**?
H&"!83G5$"%+*6(11%+0"%+68"("A%563(1".(E:%+$"RL:%E:"L$")8+G6"5$E8..$+)"&85"958)3E6%8+
3*$," 36"E(+" $"("05$(6"L(!"68"6$*6"836"@*6$5%*QS,"!83"*:831)" $"( 1$"68".83+6"6:$"HDF
&%1$")%5$E61!"(+)"%+*6(11"&58."6:$5$?
F&"E835*$,"958d$E6*"E(+"E:(+0$"6:$%5"L$ *%6$*"L:$+$A$5"6:$!"L(+6?"K89$&311!"6:$"%+*653E6%8+*"L$GA$"958A%)$)
:$5$"(5$"(EE35(6$"$+830:"68":$19"03%)$"!83"6:5830:"6:$"*%6$"$A$+"%+"6:$"$A$+6"8&"E:(+0$*?
Distribution Installation | 41
@&6$5"$+6$5%+0"!835"3*$5+(.$,"!83G11" $"(*Q$)"68"*3991!"("9(**L85),"(+)"6:$+"(*Q$)"68
E8+&%5."6:$"9(**L85)"!83GA$"$+6$5$)?"C 3+63")8$*"("088)"d8 "8&"958A%)%+0"("*$E35$
*!*6$." !"+86"958A%)%+0")%5$E6"(EE$**"68"5886," 36"5(6:$5"3*%+0"6:$"(;<."(991%E(6%8+,
L:%E:"(118L*"!83"68"53+"E8..(+)*"(*"5886"L%6:836" $%+0"6:$"5886"3*$5?"[+6$5"("3*$5X
+(.$,w"*3E:"(*")(!2+,(/"->,"(+)"("*$E35$"9(**L85)"68"E8+6%+3$?"g83G11"3*$"6:$*$"68"180
%+68"6:$"*!*6$."8+E$"6:$"%+*6(11$5"$+)*?"Z:$"%+*6(11$5"L%11"6:$+"(*Q"!83"%&"!83"L(+6"68
$+E5!96"!835":8.$")%5$E685!?"Z:%*"%*"+86"+$E$**(5!"(+)"L%11"())"7BC"8A$5:$()?
Z:$"5$*6"8&"6:$"%+*6(11(6%8+"%+*653E6%8+*"L%11"(**3.$"6:(6")(!2+,(/"->"L(*
E:8*$+"(*"6:$"3*$5+(.$?
@&6$5"!83GA$"*$1$E6$)"F9$+DDK"*$5A$5,"95$**" [+6$5 ?
H&"6:%*"%*"6:$"8+1!"89$5(6%+0"*!*6$."8+"6:$".(E:%+$"RL:%E:"%6"1%Q$1!"%*S,"C 3+63"L%11"0%A$
!83"6:$"896%8+"68"%+*6(11"6:$"J2C4" 88618()$5"8+"!835"*!*6$.?"H6"958A%)$*"6:%*"958.96
%+"85)$5"68"0%A$"!83"6:$"896%8+"8&"*Q%99%+0"6:$"J2C4"%+*6(11(6%8+,"(*"%6"L%11".8)%&!"6:$
.(*6$5" 886"5$E85)"R'42S"8+"!835"*!*6$.?"H&"6:$5$"%*"(+86:$5"89$5(6%+0"*!*6$."%6":(*
wC 3+63":(*"5$*$5A$)"6:$"3*$5+(.$")(!2+,(/"%+6$5+(11!?
s _:%1$"L$"*(!"@*6$5%*Q":$5$,"*9$E%&%E(11!"%6"%*"^@K^H"6:(6"%*"6:$"958 1$.?"^@K^H"%*"("*$6"8&"#%+3\"Q$5+$1
.8)31$*"3*$)"L%6:"@*6$5%*Q?
Z:$"9(**L85)"6:(6"(;<."L(+6*"%*"6:$"9(**L85)"!83"d3*6"1800$)"%+"L%6:?
B5$**"[+6$5 "L:$+"958.96$)"68"E8+6%+3$,"(6"L:%E:"98%+6"6:$"1(6$*6"9(EQ(0$"39)(6$*"L%11
$"%+*6(11$)?"_:$+"E8.91$6$,"5$ 886"6:$"*!*6$."&85"6:$"E:(+0$*"68"6(Q$"$&&$E6"(*"6:$
Q$5+$1":(*"958 ( 1!" $$+"39)(6$)?
$ sudo reboot
78+05(631(6%8+*p" g83GA$" *3EE$**&311!" %+*6(11$)" (+)" 39)(6$)" 6:$" (*$" C 3+63" D$5A$5
*!*6$.?
Distribution Installation | 43
Z:$")$&(316"8+"C 3+63"%*"68"53+"("6%.$"*!+E"*$5A$5"L%6:836"$A$5"E:(+0%+0"6:$"6%.$"8+
!835" 8L+" .(E:%+$?" Z:%*" L8+G6" L85Q" &85" 835" +$$)*," *8" L$G11" +$$)" 68" E:(+0$" 6:$
E8+&%035(6%8+"&%1$"*1%0:61!?"4$E(3*$"8&"6:%*,"L$"+$$)"68"03%)$"!83"6:5830:"3*%+0"("E8.X
.(+)"1%+$"$)%685?"Z:$"0)0."$)%685"%*"(15$()!"%+*6(11$)"8+"!835"C 3+63".(E:%+$"(+)"%*
5$.(5Q( 1!"$(*!"68"3*$tV
$ sudo nano /etc/ntp.conf
g835"6$5.%+(1"L%11"*L%6E:"68"&311X*E5$$+"836936?
C*$"!835"(558L"Q$!*"68".8A$")8L+"68"6:$"*$E6%8+"6:(6"188Q*"1%Q$
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
@))"6L8"+$L"1%+$*"(&6$5"6:%*"*$E6%8+,"68"(118L"0!"<"68"*!+E:58+%h$"!835"6%.$"L%6:"6:$
836*%)$"L851),"*3E:"6:(6"6:$"( 8A$"*$E6%8+"+8L"188Q*"1%Q$
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict -4 127.0.0.1
restrict -6 ::1
"0*#!*#$!(&$'.*0%@!-7-*$)!0%-*.66$+3!7(9A'$!'$.+7!*(!0%-*.66!*#$!+$&$%+$%20$-!'$B90'$+
1('!C-*$'0-8 !=#$!%$D*!-$2*0(%!&'(/0+$-!.%!0%E+$&*#!'$/0$,!(1!*#$!0%-*.66.*0(%!&'(2$--
F1!7(9A/$!.6'$.+7!'$/0$,$+!*#$!0%1(').*0(%!0%!GH(1*,.'$!I$&$%+$%20$-J!(%!&.@$!KK3
7(9!).7!,.%*!*(!'$1$'!L.28!*(!GF%-*.66.*0(%!M#$.*!H#$$*J!(%!&.@$!NO!1('!.!#0@#E6$/$6
'$/0$,!(1!#(,!*(!0%-*.66!C-*$'0-8
Software Dependencies
=#$!10'-*!*#0%@!7(9!%$$+!*(!+(!(%2$!7(9A/$!2()&6$*$+!*#$!0%-*.66.*0(%!(1!7(9'!(&$'.*0%@
-7-*$)!0-!*(!0%-*.66!*#$!-(1*,.'$!+$&$%+$%20$-!'$B90'$+!L7!C-*$'0-8 !=#$!2()).%+-
60-*$+!0%!=.L6$!NEO!#./$!L$$%!-&60*!0%*(!*,(!2(69)%-3!1('!PL9%*9!H$'/$'!.%+!M$%*QH
H$'/$' ! =#$-$! &.28.@$-! ,066! .66(,! 7(9! *(! L906+! .! L.-02! C-*$'0-8! -7-*$)3! .6(%@! ,0*#
ICRIF!.%+!S0L>TF !<(*!$/$'7!)(+96$!,066!L$!./.06.L6$!.*!2()&06$!*0)$!,0*#!*#$-$
>6$.-$!L$!.,.'$!*#.*!*#$!+$&$%+$%27!0%1(').*0(%!(%!M$%*QH!VKEL0*!+($-
%(*!*.8$!0%*(!.22(9%*!*#.*!NWEL0*!60L'.'0$-!-#(96+!%(*!L$!0%-*.66$+ !F1!-92#
60L'.'0$-!.'$!0%-*.66$+3!7(9!,066!$%+!9&!,0*#!.++0*0(%.6!&.28.@$-!*#.*!9-$
+0-8! -&.2$! .%+! 2.%! 2.9-$! 2(%1602*-! 01! *#$! -7-*$)! .**$)&*-! *(! 2()&06$
[email protected]%-*!.!NWEL0*!60L'.'7!0%-*$.+!(1!0*-!VKEL0*!2(9%*$'&.'* !F%!('+$'!*(!'$E
-(6/$!*#0-!&'(L6$)3!.++!(./0102!*(!*#$!$%+!(1!$.2#!&.28.@$!%.)$!,#$%
0%-*.660%@!0* !H(3!1('!$D.)&6$3!0%-*$.+!(1!$D$29*0%@!34*5- +%!665 &47+$+8
9$,$63! 7(9! ,066! $D$29*$! 34*5 - +%!665 &47+$+89$,$6(./0102 ! =#0-! 0-! %(*
%$2$--.'7!(%!.!NWEL0*!&6.*1(')
=#$-$! &.28.@$-! ,066! @$*! 7(9! )(-*! (1! ,#.*! 7(9A66! %$$+! *(! @$*! -*.'*$+! ,0*#! 0%-*.660%@
C-*$'0-83!ICRIF3!.%+!S0L>TF !<(*$!*#.*!7(9!,066!.6-(!'$B90'$!*#$!-(1*,.'$!+$&$%+$%E
20$-! 1('! $.2#! &.28.@$! *#.*! ,$! 0%+02.*$! %$$+-! *(! L$! 0%-*.66$+ ! =#$-$! ,066! L$! '$-(6/$+
.9*().*02.667!1('!7(9!,#$%!7(9!9-$!$0*#$'!34*!('!!'%8E$%
"$!#./$!.6-(!0%269+$+!*#$!Q&$%HHS!+$/$6(&)$%*!60L'.'0$-3!,#02#!.'$!%(*!-*'02*67!%$2E
$--.'7!*(!2()&06$!C-*$'0-83!L9*!.'$!@((+!*(!#./$?!*#$7!$%.L6$!8$7!-9&&('*!.%+!(*#$'
$%2'7&*0(%!19%2*0(%.60*7
"$!#./$!0%-*.66$+!,-*!.-!(9'!$+0*('3!L9*!7(9!2.%!2#((-$!.%7*#0%@!7(9!,.%*3!-92#!.-
! "3!F"$3!('!$*!&+
C-*$'0-8!2(%*.0%-!.!-2'0&*!*#.*!,066!0%-*.66!*#$!+$&$%+$%20$-!1('!.66!1$.*9'$-!0%!C-*$'0-8
C*!*#0-!*0)$!0*!0-!2()&6$*$!1('!PL9%*9!L9*!+($-!%(*!60-*!.66!'$B90'$+!&.28.@$-!1('!M$%*QH
Q%2$!7(9!#./$!+(,%6(.+$+!C-*$'0-8!9-0%@!*#$!0%-*'92*0(%-!0%!GI(,%6(.+0%@!"#.*
4(9!<$$+J!(%!&.@$!KV3!9-$!*#$!1(66(,0%@!2()).%+-!01!7(9!,(96+!608$!*(!'9%!0*?
$ cd ~/src/asterisk-complete/asterisk/1.8
$ sudo ./contrib/scripts/install_prereq install
$ sudo ./contrib/scripts/install_prereq install-unpackaged
Software Dependencies | 45
Third-Party Repositories
X('! 2$'*.0%! -(1*,.'$! +$&$%+$%20$-3! .! *#0'+E&.'*7! '$&(-0*('7! ).7! L$! %$2$--.'7 ! =#0-
.&&$.'-!*(!L$!)(-*!(1*$%!*#$!2.-$!,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$!-(9'2$
2(+$ !M#((-$!(%$!(1!*#$!1(66(,0%@!*,(!)$*#(+-!*(!@$*!7(9'!106$-?
O H9L/$'-0(%
W ?E$%
4(9!2.%!%(,!-80&!+0'$2*67!*(!GR(,!*(!F%-*.66!F*J!(%!&.@$!K`
=#$!&'$2$+0%@!2()).%+-!,066!'$*'0$/$!*#$!6.*$-*!2#.%@$-!*(!*#$!-(9'2$
0%!*#.*!&.'*0296.'!L'.%2#3!,#02#!.'$!2#.%@$-!*#.*!#./$!L$$%!).+$!.1*$'
*#$!6.*$-*!'$6$.-$ !F1!7(9!,(96+!&'$1$'!*(!9-$!.!'$6$.-$+!/$'-0(%3!&6$.-$
'$1$'!*(!*#$!%$D*!-$2*0(%
=#$!%$D*!-*$&!0-!*(!2()&06$!.%+!0%-*.66!*#$!-(1*,.'$3!-(!(%,.'+!*(!*#$!%$D*!-$2*0(%
LibPRI
S0L>TF!0-!.!60L'.'7!*#.*!.++-!-9&&('*!1('!FHI<!Z>TF!.%+!]TF[ !=#$!9-$!(1!S0L>TF!0-
(&*0(%.63!L9*!-0%2$!0*!*.8$-!/$'7!60**6$!*0)$!*(!0%-*.663!+($-%A*!0%*$'1$'$!,0*#!.%7*#0%@3
.%+!,066!2()$!0%!#.%+7!01!7(9!$/$'!,.%*!*(!.++!2.'+-!*(!.!-7-*$)!.*!.!6.*$'!&(0%*3!,$
'$2())$%+!*#.*!7(9!0%-*.66!0*!%(,
M#$28!(9*!*#$!6.*$-*!/$'-0(%!(1!S0L>TF!.%+!2()&06$!0*!608$!-(?
$ cd ~/src/asterisk-complete/
$ mkdir libpri
$ cd libpri/
$ svn co http://svn.asterisk.org/svn/libpri/tags/1.4.<your version number>
$ cd 1.4.<your version number>
$ make
$ sudo make install
4(9!2.%!.6-(!+(,%6(.+!*#$!-(9'2$!/0.!?E$%!1'()!G%%'H##9"? 6"!9+(!+%$7
-+A("7E#'4;#%$6$'G" 3#6-;'7-#
"0*#!S0L>TF!0%-*.66$+3!,$!2.%!%(,!0%-*.66!ICRIF
a H*'02*67!-&$.80%@3!01!7(9!.'$!%(*!@(0%@!*(!L$!9-0%@!.%7!FHI<!2(%%$2*0(%-!Z]TF!.%+!>TF[3!7(9!2.%!0%-*.66!C-*$'0-8
,0*#(9*!S0L>TF !R(,$/$'3!,$!.'$!@(0%@!*(!0%-*.66!0*!1('!*#$!-.8$!(1!2()&6$*$%$--
b =#0-!&.28.@$!2(%*.0%-!*#$!8$'%$6!+'0/$'-!*(!.66(,!C-*$'0-8!*(!2(%%$2*!*(!*'.+0*0(%.6!>H=<!20'290*- !F*!0-!.6-(
'$B90'$+!1('!*#$!MeetMe()!2(%1$'$%20%@!.&&602.*0(% [email protected]%3!,$!,066!0%-*.66!*#0-!1('!2()&6$*$%$--
F1!7(9!+(%A*!0%-*.66!*#0-3!%(%$!(1!*#$!$D.)&6$-!0%!*#0-!L((8!,066!,('83!L9*!0*!2(96+!-*066!).8$!.!@'$.*!L.*#'(()
'$.+$' !:9-*!-.70%A
C%(*#$'!+$&$%+$%27!0-!'$B90'$+!1('!0%-*.660%@!ICRIF3!.%+!*#.*!0-!*#$!8$'%$6!-(9'2$ !F*
0-!0)&('*.%*!*#.*!*#$!8$'%$6!/$'-0(%!L$0%@!9-$+!).*2#!$D.2*67!*#.*!(1!*#$!8$'%$6!-(9'2$
L$0%@!0%-*.66$+ !4(9!2.%!9-$!4 !*$58!!*(!/$'017!*#$!29''$%*67!'9%%0%@!8$'%$6!/$'-0(%?
d M$%*QH?!sudo yum install kernel-devel-`uname -r`
d PL9%*9?!sudo apt-get install linux-headers-`uname -r`
=#$!9-$!(1!4 !*$587!-9''(9%+$+!L7!L.28*028-!Z`[!0-!1('!10660%@!0%!*#$!29''$%*67!'9%%0%@
8$'%$6!/$'-0(%!-(!*#$!.&&'(&'0.*$!&.28.@$!0-!0%-*.66$+
=#$! 1(66(,0%@! 2()).%+-! -#(,! #(,! *(! 0%-*.66! L@MLN86- 4.8&"*'6$%$5 O(2(PQO(2(P
=#$'$! ).7! L$! .! %$,$'! /$'-0(%! ./.06.L6$! L7! *#$! *0)$! 7(9! .'$! '$.+0%@! *#0-3! -(! 2#$28
9"? 6"!9+(!+%$7-+A("7E!10'-* !F1!*#$'$!0-!.!%$,$'!/$'-0(%!./.06.L6$3!^9-*!'$&6.2$!*#$!/$'-0(%
%9)L$'!0%!*#$!2()).%+-?
$ cd ~/src/asterisk-complete/
$ mkdir dahdi
$ cd dahdi/
$ svn co http://svn.asterisk.org/svn/dahdi/linux-complete/tags/2.4.0+2.4.0
$ cd 2.4.0+2.4.0
$ make
$ sudo make install
$ sudo make config
How to Install It | 49
4(9!,066!%$$+!*(!#./$!F%*$'%$*!.22$--!,#$%!'9%%0%@!*#$!*!A$5!66!2()E
).%+3!.-!0*!,066!.**$)&*!*(!+(,%6(.+!*#$!6.*$-*!#.'+,.'$!10'),.'$!1'()
*#$!I0@09)!-$'/$'-
C1*$'!0%-*.660%@!ICRIF3!,$!2.%!)(/$!(%!*(!0%-*.660%@!C-*$'0-8
4(9!2.%!.6-(!+(,%6(.+!*#$!-(9'2$!/0.!?E$%!1'()!G%%'H##9"? 6"!9+(!+%$7
-+A("7E#'4;#%$6$'G" 3#9!G9-86- 4.8&"*'6$%$#
Asterisk
"0*#!L(*#!ICRIF!.%+!S0L>TF!0%-*.66$+3!,$!2.%!%(,!0%-*.66!C-*$'0-8?
$ cd ~/src/asterisk-complete/asterisk/1.8
$ ./configure
$ make
$ sudo make install
$ sudo make config
"0*#!*#$!106$-!%(,!0%-*.66$+!0%!*#$0'!+$1.96*!6(2.*0(%-3!,$!%$$+!*(!)(+017!*#$!&$')0-E
-0(%-!(1!*#$!+0'$2*('0$-!.%+!*#$0'!2(%*$%*-
=#$'$!0-!.%!.++0*0(%.6!-*$&!*#.*!0-!%(*!-*'02*67!'$B90'$+3!L9*!0-!B90*$!2()E
)(%!Z.%+!.'@9.L67!0)&('*.%*[?!*#$!*!A$5*$ 4+$6$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%*673!)(+017!*#$!#$%&#+$6- 4.#&" )-E!106$?
$ cd /etc/selinux/
$ sudo vim config
M#.%@$!*#$!SELINUX!(&*0(%!1'()!enforcing!*(!disabled
C6*$'%.*0/$673! 7(9! 2.%! 2#.%@$! *#$! /.69$! (1! enforcing! *(! permissive3
,#02#!-0)&67!6(@-!*#$!$''('-!0%-*$.+!(1!$%1('20%@!*#$!&(6027
"#$%!7(9A'$!+(%$!)(+0170%@!*#$!2(%10@9'.*0(%!106$3!7(9A66!#./$!*#$!1(66(,0%@?
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
H0%2$!7(9!2.%A*!+0-.L6$!H;S0%9D!,0*#(9*!'$L((*0%@3!7(9A66!%$$+!*(!+(!*#.*!%(,?
$ sudo reboot
Initial Configuration
F%!('+$'!*(!@$*!C-*$'0-8!9&!.%+!'9%%0%@!26$.%673!,$!%$$+!*(!2'$.*$!-()$!2(%10@9'.*0(%
106$- !"$!2(96+!&(*$%*0.667!0%-*.66!*#$!-.)&6$!106$-!*#.*!2()$!,0*#!C-*$'0-8!ZL7!$D$29*0%@
*#$!*!A$5+!*'6$+!2()).%+!0%!(9'!C-*$'0-8!-(9'2$[!.%+!*#$%!)(+017!*#(-$!106$-!*(!-90*
(9'!%$$+-3!L9*!*#$!*!A$5+!*'6$+!2()).%+!0%-*.66-!).%7!-.)&6$!106$-3!)(-*!(1!*#$)
1('!)(+96$-!*#.*!7(9!,066!%$/$'!9-$ !"$!,.%*!*(!60)0*!,#02#!)(+96$-!,$!.'$!6(.+0%@3
.%+!,$!.6-(!L$60$/$!*#.*!0*A-!$.-0$'!*(!9%+$'-*.%+!C-*$'0-8!2(%10@9'.*0(%!01!7(9!L906+
7(9'!2(%10@!106$-!1'()!-2'.*2#3!-(!,$A'$!@(0%@!*(!2'$.*$!(9'!(,%!)0%0).6!-$*!(1!2(%10@E
9'.*0(%!106$- g
=#$!10'-*!*#0%@!,$!%$$+!*(!+(!Z.--9)0%@!0*!+($-!%(*!.6'$.+7!$D0-*[!0-!2'$.*$!*#$! #$%&#
!+%$7-+A#!+0'$2*('7!,#$'$!(9'!2(%10@9'.*0(%!106$-!,066!60/$?
$ sudo mkdir /etc/asterisk/
$ sudo chown asteriskpbx:asteriskpbx /etc/asterisk/
gF1!7(9'!#$%&#!+%$7-+A#!1(6+$'!#.-!106$-!0%!0*!.6'$.+73!)(/$!*#(-$!106$-!*(!.%(*#$'!+0'$2*('73!('!+$6$*$!*#$)!01!7(9
.'$!-9'$!7(9!+(%A*!%$$+!,#.*!0-!*#$'$
"$A'$!%(,!@(0%@!*(!-*$&!*#'(9@#!.66!*#$!106$-!*#.*!.'$!'$B90'$+!*(!@$*!.!-0)&6$!C-*$'0-8
-7-*$)!9&!.%+!'9%%0%@
]$2.9-$!,$A'$!'9%%0%@!C-*$'0-8!.-!%(%E'((*3!,$!%$$+!*(!*$66!C-*$'0-8!,#02#!9-$'!*(!'9%
.- !=#0-!0-!+(%$!,0*#!*#$!!+%$7-+A(&" )!106$ !"$!2.%!2(&7!.!-.)&6$!/$'-0(%!(1!0*!1'()!*#$
C-*$'0-8!-(9'2$!*(!#$%&#!+%$7-+A?
$ cp ~/src/asterisk-complete/asterisk/1.8/configs/asterisk.conf.sample \
/etc/asterisk/asterisk.conf
=#$!!+%$7-+A(&" )!106$!2(%*.0%-!).%7!(&*0(%-!*#.*!,$!,(%A*!@(!(/$'!#$'$!Z*#$7!.'$!2(/E
$'$+!0%!G.-*$'0-8 2(%1J!(%!&.@$!iO[3!L9*!,$!+(!%$$+!*(!).8$!.%!.+^9-*)$%* !<$.'!*#$
$%+!(1!*#$! [options]!-$2*0(%3!*#$'$!.'$!*,(!(&*0(%-!,$!%$$+!*(!$%.L6$?! runuser!.%+
rungroup
h #4+7#+7&#!+%$7-+A8&"*'6$%$#!+%$7-+A#!+%$7-+A8=(/(R3"475,$7+-" S#
Base Configuration | 53
Q&$%!*#$!!+%$7-+A(&" )!106$!,0*#!.%!$+0*('!-92#!.-! ! "!('!,-*?!P%2())$%*!*#$! run
user!.%+!rungroup!60%$-3!.%+!)(+017!*#$)!-(!*#.*!*#$7!$.2#!2(%*.0%!asteriskpbx!.-!*#$
.--0@%$+!/.69$ !Q&$%!*#$!#$%&#!+%$7-+A#!+%$7-+A(&" )!106$!,0*#!/0)?
$ vim /etc/asterisk/asterisk.conf
"$! %(,! #./$! .66! *#$! 2(%10@9'.*0(%! 106$-! '$B90'$+! *(! -*.'*! .! /$'7! )0%0).6! /$'-0(%! (1
C-*$'0-8 U!j0/$!0*!.!-#(*!L7!-*.'*0%@!C-*$'0-8!9&!0%!*#$!1('$@'(9%+?
$ /usr/sbin/asterisk -cvvv
"$!.'$!-&$20170%@!*#$!1966!&.*#!*(!*#$!!+%$7-+A!L0%.'73!L9*!01!7(9!)(+017
7(9'! PATH!-7-*$)!/.'0.L6$!*(!0%269+$!*#$!#4+7#+;- #!+0'$2*('7!7(9!+(%A*
%$$+!*(!-&$2017!*#$!1966!&.*# !H$$!GC++0%@!.!-7-*$)!9-$'J!(%!&.@$!Nf!1('
0%1(').*0(%!.L(9*!)(+0170%@!*#$!$PATH!$%/0'(%)$%*!/.'0.L6$
C-*$'0-8!,066!-*.'*!-922$--19667!,0*#(9*!.%7!$''('-!('!,.'%0%@-!Z.6*#(9@#!0*!+($-!,.'%
7(9!*#.*!-()$!106$-!.'$!)0--0%@[3!.%+!&'$-$%*!*(!7(9!*#$!C-*$'0-8!2()).%+E60%$!0%*$'1.2$
ZMSF[ !C*!*#0-!&(0%*!*#$'$!.'$!%(!)(+96$-3!)0%0).6!2('$!19%2*0(%.60*73!.%+!%(!2#.%%$6
)(+96$-!,0*#!,#02#!*(!2())9%02.*$3!L9*!C-*$'0-8!0-!9&!.%+!'9%%0%@
;D$29*0%@!*#$!*"946$5+G"?!2()).%+!.*!*#$!C-*$'0-8!MSF!-#(,-!*#.*!*#$'$!.'$!%(!$DE
*$'%.6!)(+96$-!6(.+$+?
*CLI> module show
Module Description Use Count
0 modules loaded
"$A/$!+(%$!*#0-!-0)&67!*(!+$)(%-*'.*$!*#.*!C-*$'0-8!2.%!L$!'9%!0%!.!/$'7!)0%0).6!-*.*$3
.%+!+($-%A*!'$B90'$!*#$!+(k$%-!(1!)(+96$-!*#.*!.!+$1.96*!0%-*.66!,066!$%.L6$ !S$*A-!-*(&
C-*$'0-8!,0*#!*#$!&"7$5+%"'5 "?!MSF!2()).%+?
*CLI> core stop now
U H(!)0%0).63!0%!1.2*3!*#.*!0*A-!2()&6$*$67!9-$6$--!.*!*#0-!&(0%* !]9*!,$!+0@'$--
Base Configuration | 55
-T
=#0-!(&*0(%!,066!.++!.!*0)$-*.)&!*(!MSF!(9*&9*
-x
=#0-!2()).%+!.66(,-!7(9!*(!&.--!.!-*'0%@!*(!C-*$'0-8!*#.*!,066!L$!$D$29*$+!.-!01!0*
#.+!L$$%!*7&$+!.*!*#$!MSF !C-!.%!$D.)&6$3!*(!@$*!.!B9028!60-*0%@!(1!.66!*#$!2#.%%$6-
0%!9-$!,0*#(9*!#./0%@!*(!-*.'*!*#$!C-*$'0-8!2(%-(6$3!-0)&67!*7&$!!+%$7-+A587.5U&"7$
+G"?5&G! $6+U!1'()!*#$!-#$663!.%+!7(9A66!@$*!*#$!(9*&9*!7(9!.'$!6((80%@!1('
-g
=#0-!(&*0(%!0%-*'92*-!C-*$'0-8!*(!+9)&!.!2('$!106$!01!0*!2'.-#$-
"$!'$2())$%+!7(9!*'7!(9*!.!1$,!2()L0%.*0(%-!(1!*#$-$!2()).%+-!*(!-$$!,#.*!*#$7!+(
safe_asterisk
"#$%!7(9!0%-*.66!C-*$'0-8!9-0%@!*#$!*!A$5&" )-E!+0'$2*0/$!0*!,066!2'$.*$!.!-2'0&*!2.66$+
+!)$1!+%$7-+A3!,#02#!0-!'9%!+9'0%@!*#$!- -%!&'(2$--!(1!S0%9D!$.2#!*0)$!7(9!L((*
=#$!+!)$1!+%$7-+A!-2'0&*!&'(/0+$-!*#$!1(66(,0%@!L$%$10*-?
d T$-*.'*-!C-*$'0-8!.9*().*02.667!.1*$'!.!2'.-#
d M.%!L$!2(%10@9'$+!*(!$).06!*#$!.+)0%0-*'.*('!01!.!2'.-#!#.-!(229''$+
d I$10%$-!,#$'$!2'.-#!106$-!.'$!-*('$+!Z#%*'!L7!+$1.96*[
d ;D$29*$-!.!-2'0&*!01!.!2'.-#!#.-!(229''$+
4(9!+(%A*!%$$+!*(!8%(,!*((!)92#!.L(9*!*#0-!-2'0&*3!(*#$'!*#.%!*(!9%+$'-*.%+!*#.*!0*
-#(96+!%(').667!L$!'9%%0%@ !F%!)(-*!$%/0'(%)$%*-!*#0-!-2'0&*!,('8-!10%$!0%!0*-!+$1.96*
1(').*
modules.conf
H(3!,$A/$!).%.@$+!*(!@$*!C-*$'0-8!'9%%0%@3!L9*!0*A-!%(*!.L6$!*(!+(!.%7*#0%@!9-$196!1('
9-!7$* !=(!*$66!C-*$'0-8!,#.*!)(+96$-!,$!$D&$2*!0*!*(!6(.+3!,$A66!%$$+!.!*"946$+(&" )!106$
M'$.*$!*#$!106$!*"946$+(&" )!0%!7(9'!#$%&#!+%$7-+A#!+0'$2*('7!,0*#!*#$!1(66(,0%@!2()).%+
Z'$&6.2$!*#$!mm!,0*#!m!01!7(9!0%-*$.+!,.%*!*(!(/$','0*$!.%!$D0-*0%@!106$[?
$ cat >> /etc/asterisk/modules.conf
=7&$! Z('! &.-*$[! *#$! 1(66(,0%@! 60%$-3! .%+! &'$--! M*'6 n I ! (%! .! %$,! 60%$! ,#$%! 7(9A'$
10%0-#$+?
; The modules.conf file, used to define which modules Asterisk should load (or
; not load).
;
[modules]
autoload=yes
=#$! autoload=yes!60%$!,066!*$66!C-*$'0-8!*(!.9*().*02.667!6(.+!.66!)(+96$-!6(2.*$+!0%
*#$!#4+7#6-;#!+%$7-+A#*"946$+#!+0'$2*('7 !F1!7(9!,.%*$+!*(3!7(9!2(96+!6$./$!*#$!106$!608$
*#0-3!.%+!C-*$'0-8!,(96+!-0)&67!6(.+!.%7!)(+96$-!0*!1(9%+!0%!*#$!*"946$+!1(6+$'
"0*#!7(9'!%$,!*"946$+(&" )!106$!0%!&6.2$3!-*.'*0%@!C-*$'0-8!,066!2.9-$!.!,#(6$!-6$,!(1
)(+96$-!*(!L$!6(.+$+ !4(9!2.%!/$'017!*#0-!L7!-*.'*0%@!C-*$'0-8!.%+!'9%%0%@!*#$!*"946$
+G"?!2()).%+?
$ asterisk -c
*CLI> module show
Module Description Use Count
res_speech.so Generic Speech Recognition API 0
res_monitor.so Call Monitoring Resource 0
...
func_math.so Mathematical dialplan function 0
171 modules loaded
"$!%(,!#./$!).%7!)(+96$-!6(.+$+3!.%+!).%7!.++0*0(%.6!+0.6&6.%!.&&602.*0(%-!.%+
19%2*0(%-!.*!(9'!+0-&(-.6 !"$!+(%A*!%$$+!.66!*#$-$!'$-(9'2$-!6(.+$+3!*#(9@#3!-(!6$*A-
106*$'!(9*!-()$!(1!*#$!)('$!(L-29'$!)(+96$-!*#.*!,$!+(%A*!%$$+!.*!*#$!)()$%* !Y(+017
7(9'!*"946$+(&" )!106$!*(!2(%*.0%!*#$!1(66(,0%@!noload!60%$-3!,#02#!,066!*$66!C-*$'0-8!*(
-80&!6(.+0%@!*#$!0+$%*010$+!)(+96$-?
; Resource modules
noload => res_speech.so
noload => res_phoneprov.so
noload => res_ael_share.so
noload => res_clialiases.so
noload => res_adsi.so
; PBX modules
noload => pbx_ael.so
noload => pbx_dundi.so
Base Configuration | 57
; Channel modules
noload => chan_oss.so
noload => chan_mgcp.so
noload => chan_skinny.so
noload => chan_phone.so
noload => chan_agent.so
noload => chan_unistim.so
noload => chan_alsa.so
; Application modules
noload => app_nbscat.so
noload => app_amd.so
noload => app_minivm.so
noload => app_zapateller.so
noload => app_ices.so
noload => app_sendtext.so
noload => app_speech_utils.so
noload => app_mp3.so
noload => app_flash.so
noload => app_getcpeid.so
noload => app_setcallerid.so
noload => app_adsiprog.so
noload => app_forkcdr.so
noload => app_sms.so
noload => app_morsecode.so
noload => app_followme.so
noload => app_url.so
noload => app_alarmreceiver.so
noload => app_disa.so
noload => app_dahdiras.so
noload => app_senddtmf.so
noload => app_sayunixtime.so
noload => app_test.so
noload => app_externalivr.so
noload => app_image.so
noload => app_dictate.so
noload => app_festival.so
=#$'$!.'$3!(1!2(9'-$3!(*#$'!)(+96$-!*#.*!7(9!2(96+!'$)(/$3!.%+!(*#$'-!*#.*!7(9!).7
10%+!$D*'$)$67!9-$1963!-(!1$$6!1'$$!*(!*,$.8!*#0-!106$!.-!7(9!,0-# !F+$.6673!7(9!-#(96+!L$
6(.+0%@!(%67!*#$!)(+96$-!*#.*!7(9!%$$+!1('!*#$!-7-*$)!7(9!.'$!'9%%0%@ !=#$!$D.)&6$-
0%!*#0-!L((8!.--9)$!*#.*!7(9'!*"946$+(&" )!106$!6((8-!608$!(9'!$D.)&6$!#$'$
C++0*0(%.6!0%1(').*0(%!.L(9*!*#$!*"946$+(&" )!106$!2.%!L$!1(9%+!0%!*#$!-$2*0(%!G)(+E
96$- 2(%1J!(%!&.@$!ie
musiconhold.conf
=#$!*4+-&" G"69(&" )!106$!+$10%$-!*#$!26.--$-!1('!)9-02!(%!#(6+!0%!7(9'!C-*$'0-8!-7-*$)
]7!+$10%0%@!+011$'$%*!26.--$-3!7(9!2.%!-&$2017!+011$'$%*!#(6+!)9-02!*(!L$!9-$+!0%!/.'0(9-
-0*9.*0(%-3!-92#!.-!+011$'$%*!.%%(9%2$)$%*-!*(!L$!&6.7$+!,#06$!#(6+0%@!0%!.!B9$9$3!('
+011$'$%*!#(6+!)9-02!01!7(9!#./$!)96*0&6$!>]p-!#(-*$+!(%!*#$!-.)$!-7-*$) !X('!%(,3
Ctrl + D
"$A/$! 2'$.*$+! .!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*(!&9*!*#$!10%.6!*(92#$-!(%!7(9'!%$,!-7-*$)!0-!*(!0%-*.66!-()$!.&&'(&'0.*$!-(9%+!106$-!*(!L$!9-$+
.-!)9-02!(%!#(6+ !=#$'$!.'$!(%67!*#'$$!-(%@-!0%-*.66$+!L7!+$1.96*3!.%+!2.66$'-!,066!B902867!*0'$!(1!60-*$%0%@!*(
*#$!-.)$!*#'$$!-(%@-!(/$'!.%+!(/$'[email protected]% !"$A66!+0-29--!*#0-!)('$!0%!G)9-02(%#(6+ 2(%1J!(%!&.@$!if
Base Configuration | 59
"$A'$!@(0%@!*(!,.%*!$D*'.!-(9%+!&'()&*-!0%-*.66$+!0%-*$.+!(1!^9-*!*#$!+$1.96*!2('$!-(9%+
&'()&*-3!.%+!0%!.!L$**$'E-(9%+0%@!1(').*!*#.%!jHY !"$!2.%!+(!*#0-!,0*#!*#$!*$ 48
+$6$&%!-7-*$)!L7!'9%%0%@!*!A$5*$ 4+$6$&%!0%!*#$!C-*$'0-8!-(9'2$!+0'$2*('7 !]$1('$!$DE
&6('0%@!*#.*3!*#(9@#3!6$*A-!*.68!.L(9*!*#$!+011$'$%*!*$ 4+$6$&%!0%*$'1.2$-
menuselect interfaces
=#$'$!.'$!*,(!0%*$'1.2$-!./.06.L6$!1('!*$ 4+$6$&%?!29'-$-!.%+!%$,* !F1!*#$!libnewt!60L'.E
'0$-!.'$!0%-*.66$+3!7(9!,066!@$*!*#$!L69$!.%+!'$+!0%*$'1.2$!-#(,%!0%!X0@9'$!NEO !Q*#$',0-$3
L7!+$1.96*!*$ 4+$6$&%!,066!9-$!*#$!29'-$-!ZL6.28!.%+!,#0*$[!0%*$'1.2$!-#(,%!0%!X0@9'$!NEW
=#$!)0%0)9)!-2'$$%!-0k$!1('!*#$!29'-$-!0%*$'1.2$!0-!`lDWi3!,#02#!)$.%-
0*! ).7! %(*! 6(.+! 01! 7(9A'$! 9-0%@! *#$! +$1.96*! *$')0%.6! -0k$! 1('! .! -0)&6$
+0-*'0L9*0(%!0%-*.66.*0(% !=#0-!0-!%(*!.!&'(L6$)!,#$%!7(9A'$!9-0%@!HHR
*(!'$.2#!*#$!-$'/$'!'$)(*$673!.-!*7&02.667!7(9'!*$')0%.6!2.%!L$!'$-0k$+3
L9*! 01! 7(9A'$! ,('80%@! .*! *#$! *$')0%.6! +0'$2*67! 7(9! ).7! %$$+! *(! #./$
-2'$$%!L911$'-!0%-*.66$+!*(!$%.L6$!.!#0@#$'!'$-(69*0(%3!,#02#!0-!%(*!'$2E
())$%+$+! 1('! .! -7-*$)! '9%%0%@! C-*$'0-8 ! =#$! -(69*0(%! 0-! *(! 9-$! *#$
%$,*EL.-$+!*$ 4+$6$&%!-7-*$)
C1*$'!*#.*!7(9!-#(96+!#./$!*#$!%$,*EL.-$+!0%*$'1.2$!./.06.L6$!*(!7(9
Using menuselect
T9%!*#$!1(66(,0%@!2()).%+-!*(!-*.'*!*$ 4+$6$&%?
$ cd ~/src/asterisk-complete/asterisk/1.8.<your version>/
$ make menuselect
Base Configuration | 61
4(9!,066!L$!&'$-$%*$+!,0*#!.!-2'$$%!-92#!.-!*#.*!0%!X0@9'$!NEO!('!X0@9'$!NEW !4(9!2.%
9-$!*#$!.''(,!8$7-!(%!7(9'!8$7L(.'+!*(!)(/$!9&!.%+!+(,% !=#$! '0@#*!.''(, !8$7!,066
*.8$!7(9!0%*(!.!-9L)$%93!.%+!*#$! 6$1*!.''(, !8$7!,066!*.8$!7(9!L.28 !4(9!2.%!9-$!*#$
-&.2$!L.' !('! ;%*$' !8$7!*(!-$6$2*!.%+!+$-$6$2*!)(+96$- !>'$--0%@!*#$! B !8$7!,066!B90*
,0*#(9*!-./0%@3!,#06$!*#$! D !8$7!,066!-./$!7(9'!-$6$2*0(%-!.%+!*#$%!B90*
Module Dependencies
Y(+96$-!*#.*!#./$!XXX!0%!1'(%*!(1!*#$)!.'$!)(+96$-!*#.*!2.%%(*!L$!2()&06$+!L$2.9-$
*#$!&" )-E47$!-2'0&*!,.-!%(*!.L6$!*(!10%+!*#$!+$&$%+$%20$-!'$B90'$+!Z1('!$D.)&6$3!01!7(9
+(%A*!#./$!*#$!4 -.DLWC!+$/$6(&)$%*!&.28.@$!0%-*.66$+3!7(9!,066!%(*!L$!.L6$!*(!2()E
&06$! func_odbcb[ !"#$%$/$'!7(9!0%-*.66!.!+$&$%+$%273!7(9!,066!.6,.7-!%$$+!*(!'$'9%
&" )-E47$!L$1('$!7(9!'9%!*$ 4+$6$&%3!-(!*#.*!*#$!%$,!+$&$%+$%27!,066!L$!&'(&$'67!6(E
2.*$+ !=#$!+$&$%+.%*!)(+96$!,066!.*!*#.*!&(0%*!L$!./.06.L6$!0%!*$ 4+$6$&% !F1!*#$!)(+96$
-$6$2*0(%!-*066!2(%*.0%-!XXX3!$0*#$'!*#$!&" )-E47$!-2'0&*!0-!-*066!9%.L6$!*(!10%+!*#$!+$&$%+E
$%27!('!%(*!.66!+$&$%+$%20$-!#./$!L$$%!-.*0-10$+
Q%2$! 7(9A/$! -*.'*$+! *$ 4+$6$&%3! -2'(66! +(,%! *(! Core Sound Packages! .%+! &'$--! *#$
'0@#*! .''(, ! 8$7! Z('! ;%*$' [! *(! (&$%! *#$! )$%9 ! 4(9! ,066! L$! &'$-$%*$+! ,0*#! .! 60-*! (1
./.06.L6$!(&*0(%- !=#$-$!(&*0(%-!'$&'$-$%*!*#$!2('$!-(9%+!106$-!0%!/.'0(9-!6.%@9.@$-!.%+
1(').*- !]7!+$1.96*3!*#$!(%67!-$*!(1!106$-!-$6$2*$+!0-! CORE-SOUNDS-EN-GSM3!,#02#!0-!*#$
;%@60-#E6.%@9.@$!M('$!H(9%+-!&.28.@$!0%!jHY!1(').*
H$6$2*!CORE-SOUNDS-EN-WAV!.%+!CORE-SOUNDS-EN-ULAW!Z('!ALAW!01!7(9A'$!(9*-0+$!(1!<('*#
C)$'02.!('!:.&.%[3!.%+!.%7!(*#$'!-(9%+!106$-!*#.*!).7!L$!.&&602.L6$!0%!7(9'!%$*,('8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*#.*
.'$!L906*!.%+!0%-*.66$+!L7!C-*$'0-8
F1!7(9!.'$!-*.'*0%@!,0*#!.!1'$-#!2#$28(9*!(1!C-*$'0-83!7(9!)9-*!10'-*!$D$29*$!*#$!&" )-E8
47$!-2'0&*!0%!('+$'!*(!+$*$')0%$!,#.*!+$&$%+$%20$-!.'$!0%-*.66$+!(%!*#$!-7-*$) !=#$%
7(9!%$$+!*(!L906+!*#$!*$ 4+$6$&%!.&&602.*0(%!.%+!'9%!*#$!*!A$5*$ 4+$6$&%8%7$$!2()E
).%+!*(!L906+!*#$!0%0*0.6!*'$$!-*'92*9'$?
$ cd ~/src/asterisk-complete/asterisk/1.8.<your version>/
$ ./configure
$ cd menuselect
$ make menuselect
$ cd ..
$ make menuselect-tree
Generating input for menuselect ...
=#$!(&*0(%-!+0-&6.7$+!2.%!*#$%!L$!9-$+!*(!2(%*'(6!,#02#!)(+96$-!.'$!0%-*.66$+!/0.!*#$
*$ 4+$6$&%!.&&602.*0(% !X('!$D.)&6$3!01!7(9!,.%*$+!*(!+0-.L6$!.66!)(+96$-!.%+!0%-*.66
.!L.-$!-7-*$)!Z,#02#!,(96+%A*!L$!(1!)92#!9-$[!7(9!2(96+!9-$!*#$!2()).%+?
$ menuselect/menuselect --disable-all menuselect.makeopts
F1!7(9!*#$%!6((8!.*!*#$!*$ 4+$6$&%(*!A$"'%+!106$3!7(9!,066!-$$!.!6.'@$!.)(9%*!(1!*$D*!*#.*
+0-&6.7-!.66!*#$!)(+96$-!.%+!2.*$@('0$-!*#.*!#./$!L$$%!+0-.L6$+ !S$*A-!-.7!7(9!%(,!,.%*
*(!$%.L6$!*#$!HF>!2#.%%$6!.%+!*#$!Dial()!.&&602.*0(% !;%.L60%@!*#(-$!)(+96$-!2.%!L$
Base Configuration | 63
+(%$!,0*#!*#$!1(66(,0%@!2()).%+3!L9*!L$1('$!+(0%@!*#.*!6((8!.*!*#$!29''$%*!*$ 4+$8
6$&%(*!A$"'%+! Z.1*$'! +0-.L60%@! .66! *#$! )(+96$-[! .%+! 6(2.*$! app_dial! 0%! *#$! MENUSE
LECT_APPS!2.*$@('7!.%+!chan_sip!0%!*#$!MENUSELECT_CHANNELS!2.*$@('7 !C1*$'!$D$29*0%@
*#$!1(66(,0%@!2()).%+3!6((8!.*!*#$!*$ 4+$6$&%(*!A$"'%[email protected]%3!.%+!7(9!,066!-$$
*#.*!*#(-$!)(+96$-!.'$!%(!6(%@$'!60-*$+?
$ menuselect/menuselect --disable-all --enable chan_sip \
--enable app_dial menuselect.makeopts
=#$!)(+96$-!60-*$+!0%!*#$!*$ 4+$6$&%(*!A$"'%+!106$!.'$!*#(-$!*#.*!,066
%(*!L$!L906*q)(+96$-!*#.*!.'$!%(*!60-*$+!,066!L$!L906*!,#$%!*#$!*!A$
.&&602.*0(%!0-!$D$29*$+
4(9!2.%!*#$%!L906+!*#$!*$ 4+$6$&%(*!A$"'%+!106$!0%!.%7!,.7!7(9!,.%*!L7!9*060k0%@!*#$
(*#$'!2()).%+-3!,#02#!,066!.66(,!7(9!*(!L906+!29-*()!0%-*.66.*0(%!-2'0&*-!1('!7(9'
-7-*$)!9-0%@!.%7!-2'0&*0%@!6.%@9.@$!7(9!&'$1$'
Updating Asterisk
F1! *#0-! 0-! 7(9'! 10'-*! 0%-*.66.*0(%3! 7(9! 2.%! -80&! .#$.+! *(! *#$! -$2*0(%! G].-$! M(%10@9'.E
*0(%J!(%!&.@$!eO !F1!7(9A'$!0%!*#$!&'(2$--!(1!9&+.*0%@!7(9'!-7-*$)3!#(,$/$'3!*#$'$!.'$
.!2(9&6$!(1!*#0%@-!7(9!-#(96+!L$!.,.'$!(1
"#$%!,$!-.7!4'9!%- E!7(9'!-7-*$)3!*#.*!0-!B90*$!+011$'$%*!1'()!4'E7!98
- E!7(9'!-7-*$) !P&+.*0%@!7(9'!-7-*$)!0-!*#$!&'(2$--!(1!0%-*.660%@!%$,
)0%('!/$'-0(%-!(1!*#$!-.)$!L'.%2# !X('!$D.)&6$3!01!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-*.66
%$,!106$-!+0'$2*67!0%*(!*#$!.&&'(&'0.*$!+0'$2*('0$-
P&(%!0%-*.66.*0(%3!#(,$/$'3!7(9!).7!@$*!.!)$--.@$!608$!*#$!1(66(,0%@?
WARNING WARNING WARNING
chan_mgcp.so
chan_oss.so
chan_phone.so
chan_skinny.so
chan_skype.so
codec_g729a.so
res_skypeforasterisk.so
=#0-!,.'%0%@!)$--.@$!0-!0%+02.*0%@!*#.*!)(+96$-!0%-*.66$+!0%!*#$!#4+7#6-;#!+%$7-+A#*"98
46$+#!+0'$2*('7!.'$!%(*!2()&.*0L6$!,0*#!*#$!/$'-0(%!7(9A/$!^9-*!0%-*.66$+ !=#0-!)(-*!(1*$%
(229'-!,#$%!7(9!#./$!0%-*.66$+!)(+96$-!0%!(%$!/$'-0(%!(1!C-*$'0-83!.%+!*#$%!0%-*.66$+
.!%$,!/$'-0(%!(1!C-*$'0-8!,0*#(9*!2()&060%@!*#(-$!)(+96$-!Z.-!*#$!0%-*.66.*0(%!&'(2$--
,066!(/$','0*$!.%7!)(+96$-!*#.*!$D0-*$+!&'$/0(9-673!'$&6.20%@!*#$)!,0*#!*#$0'!9&@'.+$+
/$'-0(%-[
=(!@$*!.'(9%+!*#$!,.'%0%@!)$--.@$3!7(9!2.%!26$.'!(9*!*#$!#4+7#6-;#!+%$7-+A#*"946$+#
+0'$2*('7!&'0('!*(!'9%%0%@!*!A$5- +%!66 !=#$'$!0-!.!2./$.*!#$'$3!*#(9@#?!01!7(9A/$!0%-*.66$+
*#0'+E&.'*7!)(+96$-3!-92#!.-!2())$'20.6!)(+96$-!1'()!I0@09)!Z0%269+0%@!chan_skype3
codec_g729a3!$*2 [3!7(9!,066!%$$+!*(!'$0%-*.66!*#(-$!01!7(9A/$!26$.'$+!(9*!7(9'!)(+96$-
+0'$2*('7
F*!0-!'$2())$%+$+!*#.*!7(9!8$$&!.!+0'$2*('7!,0*#!7(9'!*#0'+E&.'*7!)(+96$-!0%!0*!*#.*
7(9!2.%!'$0%-*.66!1'()!9&(%!9&+.*$!(1!7(9'!C-*$'0-8!-7-*$) !H(3!1('!$D.)&6$3!7(9!)0@#*
2'$.*$!*#$!#4+7#+7&#!+%$7-+A8&"*'6$%$#%G-79'!7%3#=(/!+0'$2*('7!.-!1(66(,-?
Updating Asterisk | 65
$ cd ~/src/asterisk-complete/
$ mkdir thirdparty/
$ mkdir thirdparty/1.8/
I(,%6(.+0%@!*#0'+E&.'*7!)(+96$-!0%*(!*#0-!+0'$2*('7!.66(,-!7(9!*(!$.-067!'$0%-*.66!*#(-$
)(+96$-!,#$%!7(9!9&@'.+$ !:9-*!1(66(,!*#$!0%-*.66.*0(%!0%-*'92*0(%-!1('!7(9'!)(+96$3
).%7!(1!,#02#!,066!L$!.-!-0)&6$!.-!'$'9%%0%@!*!A$5- +%!66!1'()!*#$!*"946$+!-(9'2$
+0'$2*('7!('!2(&70%@!*#$!&'$2()&06$+!L0%.'7!*(!*#$!#4+7#6-;#!+%$7-+A#*"946$+#!+0'$2*('7
]$!-9'$!*(!2#.%@$!*#$!106$!&$')0--0(%-!*(!).*2#!*#(-$!(1!*#$!9-$'!'9%%0%@
C-*$'0-8o
Common Issues
F%! *#0-! -$2*0(%! ,$A'$! @(0%@! *(! 2(/$'! -()$! 2())(%! 0--9$-! 7(9! ).7! '9%! 0%*(! ,#06$
2()&060%@!C-*$'0-83!ICRIF3!('!S0L>TF !Y(-*!(1!*#$!0--9$-!7(9A66!'9%!0%*(!#./$!*(!+(
,0*#! )0--0%@! +$&$%+$%20$- ! F1! *#.*! 0-! *#$! 2.-$3! &6$.-$! '$/0$,! GH(1*,.'$! I$&$%+$%E
20$-J!(%!&.@$!KK!*(!).8$!-9'$!7(9A/$!0%-*.66$+!$/$'7*#0%@!7(9!%$$+
C%7! *0)$! 7(9! 0%-*.66! .++0*0(%.6! &.28.@$-3! 7(9! ,066! %$$+! *(! '9%
*#$!(#&" )-E47$!-2'0&*!0%!7(9'!C-*$'0-8!-(9'2$!0%!('+$'!1('!*#$!%$,!&.28.@$
*(!L$!+$*$2*$+
Ubuntu CentOS
$ sudo apt-get install wget $ sudo yum -y install wget
Ubuntu CentOS
$ sudo apt-get install gcc $ sudo yum install gcc
Ubuntu CentOS
$ sudo apt-get install gcc $ sudo yum install gcc
Ubuntu CentOS
$ sudo apt-get install g++ $ sudo yum install gcc-c++
configure: error: *** Please install GNU make. It is required to build Asterisk!
=#0-!$''('!0-!$%2(9%*$'$+!,#$%!7(9!#./$!%(*!0%-*.66$+!*#$!*!A$!.&&602.*0(%3!,#02#!0-
'$B90'$+!*(!L906+!C-*$'0-8
Ubuntu CentOS
$ sudo apt-get install make $ sudo yum install make
Ubuntu CentOS
$ sudo apt-get install libxml2-dev $ sudo yum install libxml2-devel
Ubuntu CentOS
$ sudo apt-get install ncurses-dev $ sudo yum install ncurses-devel
Common Issues | 67
You do not appear to have the sources for the 2.6.18-164.6.1.el5 kernel
installed.
4(9!,066!@$*!*#0-!$''('!,#$%!.**$)&*0%@!*(!L906+!ICRIF!,0*#(9*!#./0%@!0%-*.66$+!*#$
S0%9D!#$.+$'-3!,#02#!.'$!'$B90'$+!1('!L906+0%@!S0%9D!+'0/$'-
Ubuntu CentOS
$ sudo apt-get install linux-headers-`uname -r` $ sudo yum install kernel-devel
Upgrading Asterisk
P&@'.+0%@!C-*$'0-8!L$*,$$%!).^('!/$'-0(%-3!-92#!.-!1'()!O W!*(!O K!('!1'()!O V W!*(
O `!0-!.80%!*(!9&@'.+0%@!.%!(&$'.*0%@!-7-*$) !Q%2$!.!&#(%$!-,0*2#!0-!0%!&'(+92*0(%3!0*
0-!*$''0L67!+0-'9&*0/$!1('!*#.*!-7-*$)!*(!L$!9%./.06.L6$!1('!%$.'67!.%7!6$%@*#!(1!*0)$3!.%+
*#$!9&@'.+$!(1!*#.*!&#(%$!-7-*$)!%$$+-!*(!L$!,$66!*#(9@#*E(9*3!&6.%%$+3!.%+!*$-*$+!.-
)92#!.-!&(--0L6$!&'0('!*(!+$&6(7)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7!6(2.*0(%-!.%+!*#$!(&*0(%-!7(9!2.%!9-$!*(!)(+017!*#$)!.'$!60-*$+
0%!=.L6$!KEO !X('!.++0*0(%.6!0%1(').*0(%!.L(9*!*#$!9-.@$!(1!*#$-$!+0'$2*('0$-3!-$$!*#$
X06$!H*'92*9'$!-$2*0(%!(1!M#.&*$'!W
:!;6$528=(5!+%$7-+A(&" )5^9-7$&%"7-$+_5+$&%-"
Option Value/Example Notes
astetcdir /etc/asterisk The location where the Asterisk configuration files are stored.
astmoddir /usr/lib/asterisk/ The location where loadable modules are stored.
modules
astvarlibdir /var/lib/asterisk The base location for variable state information used by various parts of Asterisk.
This includes items that are written out by Asterisk at runtime.
astdbdir /var/lib/asterisk Asterisk will store its internal database in this directory as a file called astdb.
astkeydir /var/lib/asterisk Asterisk will use a subdirectory called keys in this directory as the default location
for loading keys for encryption.
astdatadir /var/lib/asterisk This is the base directory for system-provided data, such as the sound files that
come with Asterisk.
astagidir /var/lib/asterisk/ Asterisk will use a subdirectory called agi-bin in this directory as the default
agi-bin location for loading AGI scripts.
astspooldir /var/spool/asterisk The Asterisk spool directory, where voicemail, call recordings, and the call orig-
ination spool are stored.
astrundir /var/run/asterisk The location where Asterisk will write out its UNIX control socket as well as its
process ID (PID) file.
astlogdir /var/log/asterisk The directory where Asterisk will store its log files.
asterisk.conf | 73
Option Value/Example Notes
minmemfree 1 Sets the minimum number of megabytes of free memory required for Asterisk
to continue accepting calls. If Asterisk detects that there is less free memory
available than this threshold, new calls will not be accepted. This option is not
set by default.
cache_record_files yes When doing recording, stores the file in the record_cache_dir until re-
cording is complete. Once complete, it will be moved into the originally specified
destination. The default for this option is no.
record_cache_dir /tmp Sets the directory to be used when cache_record_files is set to yes. The
default location is a directory called tmp within the astspooldir.
transmit_silence yes Transmits silence to the caller in cases where there is no other audio source.
This includes call recording and the Wait() family of dialplan applications,
among other things. The default for this option is no.c
transcode_via_sln yes When building a codec translation path, forces signed linear to be one of the
steps in the path. The default for this option is yes.
runuser asterisk Sets the system user that the Asterisk application should run as. This option is
not set by default, meaning that the application will continue to run as the user
that executed the application.
rungroup asterisk Sets the system group that the Asterisk application should run as. This option
is not set by default.
lightbackground yes When using colors in the Asterisk console, it will output colors that are com-
patible with a light-colored background. This option is set to no by default, in
which case Asterisk uses colors that look best on a black background.
documenta- en_US The built-in documentation for Asterisk applications, functions, and other things
tion_language is included in an external XML document. This option specifies the preferred
language for documentation. If it is not available, the default of en_US will be
used.
hideconnect yes Setting this option to yes causes Asterisk to not display notifications of remote
console connections and disconnections at the Asterisk CLI. This is useful on
systems where there are scripts that use remote consoles heavily. The default
setting is no.
lockconfdir no When this option is enabled, the Asterisk configuration directory will be pro-
tected with a lock. This helps protect against having more than one application
attempting to write to the same file at the same time. The default value is no.
a If any of the keys require a passphrase, this will block the startup process of Asterisk. An alternative is to run keys init at the Asterisk command
line.
b This is critical for debugging crashes. However, Asterisk must be compiled with the DONT_OPTIMIZE option enabled in menuselect for
the core dump to be useful.
c There is an important caveat to note when this option is enabled. The silence is generated in uncompressed signed linear format, which
means that it will have to be transcoded into the format that the caller’s channel expects. The result may be that transcoding is required
for a call that would not normally require it.
modules.conf
=#0-!106$!0-!%(*!-*'02*67!'$B90'$+!0%!.%!C-*$'0-8!0%-*.66.*0(%5!#(,$/$'3!,0*#(9*!.%7!)(+E
96$-!C-*$'0-8!,(%A*!'$.667!L$!.L6$!*(!+(!.%7*#0%@3!-(!1('!.66!&'.2*02.6!&9'&(-$-3!7(9!%$$+
.!*"946$+(&" )!106$!0%!7(9'!#$%&#!+%$7-+A!1(6+$' !F1!7(9!-0)&67!+$10%$!autoload=yes!0%!7(9'
*"946$+(&" )!106$3!C-*$'0-8!,066!-$.'2#!1('!.66!)(+96$-!0%!*#$!#4+7#6-;#!+%$7-+A#*"946$+
1(6+$'!.%+!6(.+!*#$)!.*!-*.'*9&
modules.conf | 75
C6*#(9@#!)(-*!)(+96$-!+(!%(*!9-$!)92#!0%!*#$!,.7!(1!'$-(9'2$-3!.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.'*-!(1
*#$!,('6+ !I011$'$%*!2(9%*'0$-!('!'$@0(%-!&'$-$%*!+011$'$%*!-(9%+-!1('!$/$%*-!-92#!.-
+0.6*(%$3!L9-7!-0@%.63!'0%@L.283!2(%@$-*0(%3!.%+!-(!1('*#
=#$!- 9-&!%-" +(&" )!106$!+$10%$-!*#$!&.'.)$*$'-!1('!*#$!/.'0(9-!-(9%+-!*#.*!.!*$6$&#(%$
-7-*$)!)0@#*!L$!$D&$2*$+!*(!&'(+92$3!.%+!.66(,-!7(9!*(!29-*()0k$!*#$) !F%!*#$!$.'67
+.7-!(1!C-*$'0-8!*#0-!106$!(%67!2(%*.0%$+!-(9%+-!1('!.!60)0*$+!%9)L$'!(1!2(9%*'0$-3!L9*
0*!0-!%(,!B90*$!2()&'$#$%-0/$
=(!.--0@%!*#$!*(%$-!2())(%!1('!7(9'!'$@0(%!*(!2#.%%$6-3!7(9!2.%!-0)&67!.--0@%!*#$
*(%$k(%$!9-0%@!*#$!CHANNEL()!19%2*0(%3!.%+!*#.*!*(%$k(%$!,066!.&&67!1('!*#$!+9'.*0(%
(1!*#$!2.66!Z9%6$--!2#.%@$+!6.*$'[?
Set(CHANNEL(tonezone)=[yourcountry]) ; i.e., uk, de, etc.
R(,$/$'3!-0%2$!-0@%.60%@!1'()!.!2.66!2(96+!2()$!1'()!/.'0(9-!&6.2$-!Z1'()!*#$!2.''0$'3
1'()! C-*$'0-83! ('! $/$%! 1'()! *#$! -$*! 0*-$61[3! 7(9! -#(96+! %(*$! *#.*! -0)&67! -$**0%@! *#$
*(%$k(%$!0%!7(9'!+0.6&6.%!+($-!%(*!@9.'.%*$$!*#.*!*#(-$!*(%$-!,066!L$!&'$-$%*$+!0%!.66
-0*9.*0(%-
indications.conf | 77
Hacking indications.conf for Fun and Profit
F1!7(9!#./$!*((!)92#!*0)$!(%!7(9'!#.%+-3!7(9!2.%!+(!.66!-('*-!(1!&(0%*6$--!L9*!$%*$'E
*.0%0%@! *#0%@-! ,0*#! 7(9'! 0%+02.*0(%- ! X('! $D.)&6$3! 1.%-! (1! >%!75 \!7+! 2.%! ).8$! *#$
1(66(,0%@!2#.%@$!*(!*#$!$%+!(1!*#$0'!- 9-&!%-" +(&" )!106$-?
[starwars](us)
description = Star Wars Theme Song
ring = 262/400,392/500,0/100,349/400,330/400,294/400,524/400,392/500,0/100,349/400, \
330/400,294/400,524/400,392/500,0/100,349/400,330/400,349/400,294/500,0/2000
F1!7(9!*#$%!9-$!*#$!2(9%*'7!%.)$+!tstarwarst!0%!7(9'!2(%10@9'.*0(%!106$-!('!+0.6&6.%3!.%7
'0%@0%@!7(9!&.--!L.28!,066!-(9%+!B90*$!+011$'$%*!1'()!*#$!-*.%+.'+!'0%@!7(9!.'$!9-$+
*( !='7!*#$!1(66(,0%@!+0.6&6.%!2(+$!*(!*$-*!(9*!7(9'!%$,!'0%@0%@!-(9%+?
exten => 500,1,Answer()
same => n,Set(CHANNEL(tonezone)=starwars)
same => n,Dial(SIP/0000FFFF0002) ; or whatever your channel is named in sip.conf
I$&$%+0%@!(%!*#$!*7&$!(1!+$/02$!9-$+!*(!2.66!0%*(!*#0-!$D.)&6$3!7(9
).7!,(%+$'!01!0*!,066!.2*9.667!,('8 !HF>!&#(%$-3!1('!$D.)&6$3!*7&0E
2.667!@$%$'.*$!*#$0'!(,%!*(%$-!0%-*$.+!(1!#./0%@!C-*$'0-8!@$%$'.*$
*#$) !=#0-!$D.)&6$!,.-!2.'$19667!2'.1*$+!*(!$%-9'$!*#.*!C-*$'0-8!,066
@$%$'.*$!.!'0%@L.28!*(%$!*(!*#$!2.66$' !=#$!8$7!0-!*#$!Answer()!*#.*!0-
$D$29*$+!10'-* !S.*$'3!,#$%!.%!(9*L(9%+!2.66!0-!).+$!*(!.%(*#$'!+$E
/02$3!*#$!(%67!)$*#(+!C-*$'0-8!#.-!./.06.L6$!*(!&.--!L.28!.!'0%@0%@
0%+02.*0(%!*(!*#$!2.66$'!0-!L7!@$%$'.*0%@!0%L.%+!.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protected]!,.7-?!O[!&.7!1('!.!)9-02!(%!#(6+!602$%-$
1'()!*#$!2(&7'0@#*!#(6+$'3!('!W[!10%+!.!-(9'2$!(1!)9-02!*#.*!0-!'$6$.-$+!9%+$'!.!602$%-$
-90*.L6$!1('!C-*$'0-8
"$A'$!%(*!#$'$!*(!@0/$!7([email protected]!.+/02$5!7(9!.'$!'$-&(%-0L6$!1('!9%+$'-*.%+0%@!,#.*!0-
'$B90'$+!(1!7(9!0%!('+$'!*(!9-$!.!&.'*0296.'!&0$2$!(1!)9-02!.-!7(9'!)9-02!(%!#(6+!-(9'2$
"#.*!,$!,066!+(3!#(,$/$'3!0-!-#(,!7(9!#(,!*(!*.8$!*#$!)9-02!7(9!#./$!.%+!).8$!0*
,('8!,0*#!C-*$'0-8
h <(*$!*#.*!S$01!9-$-!*#$!+$1.96*!)9-023!L9*!#0-!$D29-$!0-!*#.*!#$A-!6.k7!.%+!,.%*-!*(!@(!.%+!&6.7!X('k.!(%!#0-
pL(D !=#$!2(LL6$'A-!80+-!#./$!%(!-#($-
musiconhold.conf | 79
CentOS Prerequisite
H0%2$!M$%*QH!+($-!%(*!#./$!Y>N!2.&.L060*7!0%-*.66$+!,0*#!+".3!7(9!,066!#./$!*(!0%-*.66
*'E=O<!L$1('$!7(9!2.%!2(%/$'*!Y>N!106$-!1('!9-$!,0*#!C-*$'0-8
X0'-*!7(9!,066!%$$+!*(!0%-*.66!*#$!7'*)"7E$!'$&(-0*('7 !=(!10%+!(9*!,#02#!/$'-0(%!7(9
%$$+3!(&$%!7(9'!,$L!L'(,-$'!.%+!@(!*(!G%%'H##9!E(?-$$7+(&"*#7'*#V@a('G'bW !H$6$2*
*#$!*$D*!1('!*#$!/$'-0(%\.'2#0*$2*9'$!7(9!,.%*!*(!0%-*.66!.%+!&.-*$!0*!0%*(!7(9'!-#$66?
$ rpm -Uhv http://apt.sw.be/redhat ...
4(9!%$$+!*(!).8$!-9'$!*#0-!%$,!'$&(-0*('7!0-!9-$+!2(''$2*673!-(!'9%!*#$!1(66(,0%@?
$ yum install yum-priorities
ZF1!7(9!,.%*!*(!8%(,!)('$!.L(9*!34*!&'0('0*0$-3!-$$!*#0-!-0*$?!G%%'H##?-A-(&$ %"+("7E#
J!&A!E$c! !E$*$ %#d4*#J7-"7-%-$+ [
Q%2$!*#$!'$&(-0*('7!#.-!L$$%!.++$+3!7(9!2.%!&'(2$$+!*(!@$*!*'E=O<?
$ yum install mpg123
Q%2$! *#.*A-! +(%$3! 7(9'! M$%*QH! -7-*$)! 0-! '$.+7! *(! 2(%/$'*! Y>N! 106$-! 1('! 9-$! ,0*#
C-*$'0-8
F1!7(9!.'$!1.)060.'!,0*#!*#$!106$!1(').*-!.%+!#./$!-()$!$D&$'0$%2$!,('80%@!,0*#!.9+0(
$%@0%$$'0%@!-(1*,.'$!-92#!.-!C9+.20*73!7(9!2.%!2(%/$'*!*#$!106$-!(%!7(9'!>M!.%+!9&6(.+
*#$)!*(!C-*$'0-8 !"$!10%+!0*!0-!-0)&6$'!*(!9&6(.+!*#$!-(9'2$!Y>N!106$-!*(!*#$!C-*$'0-8
-$'/$'!Z-.73!*(!*#$!#%*'!1(6+$'[3!.%+!*#$%!2(%/$'*!*#$)!1'()!*#$!2()).%+!60%$
=(!2(%/$'*!7(9'!Y>N!106$-!*(!.!1(').*!*#.*!C-*$'0-8!9%+$'-*.%+-3!7(9!%$$+!*(!'9%!*#$
2()).%+-!(9*60%$+!#$'$!Z0%!*#0-!$D.)&6$!,$!.'$!9-0%@!.!106$!%.)$+!>-6$ %C-%3(*'<[
CentOS
X0'-*3!2(%/$'*!*#$!Y>N!106$!*(!.!"C_!106$?
$ mpg123 -w SilentCity.wav SilentCity.mp3
=#$%3!+(,%-.)&6$!*#$!'$-96*0%@!"C_!106$!*(!.!-.)&60%@!'.*$!*#.*!C-*$'0-8!9%+$'-*.%+-?
$ sox SilentCity.wav -t raw -r 8000 -s -w -c 1 SilentCity.sln
Ubuntu
F1!7(9!#./$!%(*!+(%$!-(!.6'$.+73!0%-*.66!+".3!.%+!*#$!libsox-fmt-all!&.28.@$?
# sudo apt-get install sox libsox-fmt-all
=#$%3!2(%/$'*!7(9'!Y>N!106$!+0'$2*67!*(!*#$!9%2()&'$--$+!HS<!1(').*?
$ sox SilentCity.mp3 -t raw -r 8000 -s -w -c 1 SilentCity.sln
4(9!%(,!%$$+!*(!'$6(.+!*4+-&" G"69!0%!C-*$'0-8!0%!('+$'!*(!#./$!0*!'$2(@%0k$!7(9'!%$,
106$-?
$ asterisk -rx "module unload res_musiconhold.so"
$ asterisk -rx "module load res_musiconhold.so"
=(!*$-*!*#.*!7(9'!)9-02!0-!,('80%@!2(''$2*673!.++!*#$!1(66(,0%@!*(!*#$![UserServices]
2(%*$D*!0%!7(9'!+0.6&6.%?
exten => 664,1,NoOp()
same => n,Progress()
same => n,MusicOnHold()
I0.60%@!664!1'()!(%$!(1!7(9'!-$*-!-#(96+!&6.7!.!'.%+()!106$!1'()!7(9'!*"G!+0'$2*('7
Conclusion
=#0-!2#.&*$'!#$6&$+!7(9!2()&6$*$!-()$!0%0*0.6!2(%10@9'.*0(%!(1!C-*$'0-8 !X'()!#$'$
7(9!2.%!)(/$!(%!*(!-$**0%@!9&!-()$!&#(%$-!.%+!*.80%@!.+/.%*.@$!(1!*#$!).%7!1$.*9'$-
C-*$'0-8!#.-!*(!(11$'
Conclusion | 81
CHAPTER 5
User Device Configuration
F%! *#0-! 2#.&*$'! ,$A66! +$6/$! 0%*(! *#$! 9-$'! +$/02$-! *#.*! 7(9! )0@#*! ,.%*! *(! 2(%%$2*! *(
C-*$'0-83!*7&02.667!_(F>!*$6$&#(%$-!(1!-()$!-('* !M(%10@9'0%@!.!2#.%%$6!0%!C-*$'0-8!1('
*#$!+$/02$!*(!2(%%$2*!*#'(9@#!0-!'$6.*0/$67!-*'.0@#*1(',.'+3!L9*!7(9!.6-(!%$$+!*(!2(%E
10@9'$!*#$!+$/02$!0*-$61!-(!0*!8%(,-!,#$'$!*(!-$%+!0*-!2.66- h!F%!(*#$'!,('+-3!*#$'$!.'$!*,(
&.'*-! *(! 2(%10@9'0%@! .! +$/02$! (%! C-*$'0-8?! O[! *$660%@! C-*$'0-8! .L(9*! *#$! +$/02$3! .%+
W[!*$660%@!*#$!+$/02$!.L(9*!C-*$'0-8
h =#0-!#.-!%(*#0%@!*(!+(!,0*#!C-*$'0-8!2(%10@9'.*0(%3!.%+!$.2#!#.'+,.'$!).%91.2*9'$'!,066!#./$!0*-!(,%!*((6-
*(!.66(,!7(9!*(!2(%10@9'$!0*-!+$/02$-
83
"#06$!)(-*!+$/02$-!,066!#./$!.!,$LEL.-$+!0%*$'1.2$!1('!+$10%0%@!&.'.)$*$'-3!01!7(9A'$
&9**0%@!)('$!*#.%!(%$!('!*,(!&#(%$-!0%*(!&'(+92*0(%!,$!'$2())$%+!9-0%@!.!-$'/$'E
L.-$+!2(%10@9'.*0(%!&'(2$--3!,#$'$0%!*#$!-$*!0-!(%67!*(6+!*#$!6(2.*0(%!(1!.!106$!-$'/$'
=#$!-$*!,066!0+$%*017!0*-$61!.%+!+(,%6(.+!29-*()0k$+!106$-!*#.*!+$10%$!*#$!'$B90'$+!&.E
'.)$*$'-!1('!*#.*!*$6$&#(%$ !C-!.%!$D.)&6$3!*#$-$!2(96+!L$!pYS!106$-!(%!.%!X=>!-$'/$'
=#$!$D.2*!+(,%6(.+!&'(2$--!.%+!-7%*.D!(1!*#$-$!106$-!,066!+011$'!1'()!).%91.2*9'$'!*(
).%91.2*9'$' !F%!*#0-!2#.&*$'!,$!,066!(%67!*.68!.L(9*!*#$!2(%10@9'.*0(%!(1!-$*-!1'()!*#$
&$'-&$2*0/$!(1!C-*$'0-8
Asterisk Extensions
=#$! 2(%2$&*! (1! .%! $D*$%-0(%! 0%! C-*$'0-8! 0-! 2'920.6 ! F%! )(-*! >]p-3! .%! $D*$%-0(%! 0-! .
%9)L$'!*#.*!7(9!+0.6!*(!2.9-$!.!&#(%$!('!-$'/02$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0*.6!&'(*(2(6!).7!/.'7!Z$ @ 3!&'(&'0$*.'7!C=C-!(%!*'.+0*0(%.6!>]p-[
Configuring Asterisk
F%!*#0-!-$2*0(%!,$A66!2(/$'!#(,!*(!2'$.*$!*#$!+-'(&" )!.%+!-!.(&" )!2(%10@9'.*0(%!106$-!0%
*#$!#$%&#!+%$7-+A#!+0'$2*('73!,#02#!.'$!9-$+!1('!+$10%0%@!*#$!&.'.)$*$'-!L7!,#02#!HF>
.%+!FCpW!+$/02$-!2.%!2())9%02.*$!,0*#!7(9'!-7-*$)
b C%!C=C!0-!%(*!*#$!(%67!,.7!*(!2(%%$2*!.%.6(@!&#(%$- !R.'+,.'$!/$%+('-!-92#!.-!I0@09)!-$66!2.'+-!*#.*!@(
0%!*#$!C-*$'0-8!-$'/$'!.%+!&'(/0+$!.%.6(@!*$6$&#(%7!&('*-
X('!.!'$.667!.,$-()$!2('+6$--!.%.6(@!&#(%$3!7(9!,.%*!*(!2#$28!(9*!*#$!;%j$%09-!I9'.X(%!+$/02$-3!,#02#
.'$!$D&$%-0/$3!L9*!0)&'$--0/$
Configuring Asterisk | 87
C-*$'0-8! .66(,-! +$/02$-! 9-0%@! ).%7! +011$'$%*! &'(*(2(6-! *(! -&$.8! *(! 0*
Z.%+!*#$'$1('$!*(!$.2#!(*#$'[ !R(,$/$'3!*#$!HF>!.%+!FCpW!&'(*(2(6-!.'$
*#$!)(-*!&(&96.'!.%+!).*9'$!_(F>!)(+96$-3!-(!,$!,066!1(29-!(9'!.*E
*$%*0(%!(%!*#$) !X('!7(9'!10'-*!C-*$'0-8!L906+3!7(9!)0@#*!L$!L$-*!(11!%(*
L(*#$'0%@! ,0*#! *#$! (*#$'! &'(*(2(6-! Z-92#! .-! H80%%7\HMM>3! P%0-*0)3
R NWN3! .%+! YjM>[3! .%+! @$**0%@! 2()1('*.L6$! ,('80%@! ,0*#! HF>! .%+
FCpW!10'-* !=#$!2(%10@9'.*0(%!1('!*#$!(*#$'!&'(*(2(6-!0-!-0)06.'3!.%+!*#$
-.)&6$!2(%10@9'.*0(%!106$-!.'$!1966!(1!0%1(').*0(%!.%+!$D.)&6$-3!-(!(%2$
7(9! #./$! *#$! L.-02-! +(,%3! (*#$'! &'(*(2(6-! -#(96+! L$! 1.0'67! $.-7! *(
,('8!,0*#
C-*$'0-8!,066!2#$28!1('!&.'.)$*$'-!0%!*#$!1(66(,0%@!('+$'?
O M#$28!*#$!-&$20102!-$2*0(%!1('!*#$!'$6$/.%*!2#.%%$6
W M#$28!*#$!*$)&6.*$!1('!*#$!-$2*0(%
N M#$28!*#$![general]!-$2*0(%
K P-$!*#$!#.'+2(+$+!+$1.96*-
=#0-!)$.%-!*#.*!^9-*!L$2.9-$!7(9!+0+%A*!-&$2017!.!-$**0%@!1('!.!&.'*0296.'
&.'.)$*$'!+($-%A*!)$.%!7(9'!+$/02$!0-%A*!@(0%@!*(!#./$!.!-$**0%@!1('!*#.*
&.'.)$*$' !F1!7(9!.'$!%(*!-9'$3!-$*!*#$!&.'.)$*$'!$D&6020*67!0%!*#$!-$2*0(%
(1!*#$!2(%10@9'.*0(%!106$!*#.*!+$.6-!,0*#!*#.*!-&$20102!2#.%%$63!('!0%!*#$
'$6$/.%*!*$)&6.*$
=#0-!2(%2$&*!-#(96+!).8$!)('$!-$%-$!.-!7(9!'$.+!(%
M(%/$'-$673!01!*#$!+0.6&6.%!#.-!L$$%!&'(@'.))$+!*(!+0.6!.%(*#$'!+$/02$!,#$%!*#$!'$E
B9$-*!1('!$D*$%-0(%!%9)L$'!101!0-!L$0%@!&'(2$--$+3!.!'$B9$-*!*(!+0.6!*$6$&#(%7!+$/02$
0000FFFF0002!,066!9-$!*#$!2#.%%$6!2(%10@9'.*0(%!106$!*(!+$*$')0%$!#(,!*(!&.--!*#$!2.66
L.28!(9*!(1!*#$!+0.6&6.%!*(!*#$!*$6$&#(%$!(%!*#$!%$*,('8!Z0%269+0%@!-92#!+$*.06-!.-
.9*#$%*02.*0(%3!2(+$23!.%+!-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*(!2(%%$2*!,0*#!C-*$'0-8
=#$!10'-*!*#0%@!7(9!%$$+!*(!+(!0-!2'$.*$!.!2(%10@9'.*0(%!106$!0%!7(9'!#$%&#!+%$7-+A!+0'$2*('7
2.66$+!+-'(&" )
>.-*$!('!*7&$!*#$!1(66(,0%@!0%1(').*0(%!0%*(!*#$!106$?
[general]
context=unauthenticated ; default context for incoming calls
allowguest=no ; disable unauthenticated calls
srvlookup=yes ; enabled DNS SRV record lookup on outbound calls
udpbindaddr=0.0.0.0 ; listen for UDP requests on all interfaces
tcpenable=no ; disable TCP support
Q&$%!*#$!+-'(&" )!106$!7(9A/$!^9-*!2'$.*$+3!.%+!,$A66!@(!(/$'!$.2#!0*$)
"$A/$!2'$.*$+!1(9'!-$2*0(%-3!*#$!10'-*!(%$!L$0%@!*#$![general]!-$2*0(% !=#0-!0-!.!-*.%+.'+
-$2*0(%!*#.*!.&&$.'-!.*!*#$!*(&!(1!*#$!2(%10@9'.*0(%!106$!1('!.66!2#.%%$6!)(+96$-3!.%+
)9-*!.6,.7-!L$!%.)$+!0%!*#0-!,.7 !=#$![general]!-$2*0(%!2(%*.0%-!@$%$'.6!2(%10@9'.E
*0(%!(&*0(%-!1('!#(,!*#.*!&'(*(2(6!'$6.*$-!*(!7(9'!-7-*$)3!.%+!2.%!L$!9-$+!*(!+$10%$
+$1.96*!&.'.)$*$'-!.-!,$66
X('!$D.)&6$3!,$A/$!+$10%$+!*#$!+$1.96*!2(%*$D*!.-!unauthenticated3!*(!$%-9'$!*#.*!,$
#./$!$D&6020*67!+$26.'$+!,#$'$!9%.9*#$%*02.*$+!@9$-*!2.66-!,066!$%*$'!*#$!+0.6&6.%!Z'.*#$'
*#.%!6$./0%@!*#.*!*(!2#.%2$[ !"$A/$!%.)$+!0*!unauthenticated!*(!).8$!0*!(L/0(9-!*#.*
2.66-!&'(2$--$+!0%!*#0-!2(%*$D*!.'$!%(*!*'9-*$+3!.%+!*#9-!-#(96+!%(*!L$!.L6$!*(!+(!*#0%@-
-92#!.-!).8$!(9*L(9%+!2.66-!*(!*#$!>H=<!Z,#02#!2(96+!&(*$%*0.667!2(-*!)(%$73!('
'$&'$-$%*!0+$%*0*7!*#$1*[ !4(9!-#(96+!L$!.,.'$!*#.*!,$!2(96+!#./$!9-$+!.%7!%.)$!,$
D". 9*8 7$ ,"'#$-&'= ,(8 8". 9&=(! $6$- ,*'! !" *++", .'*.!($'!&;
)*!$# )*++/0 1($ -$*/"' &/ !(*! &% 8". 3.7+&/( 8".- EAF ?@A "' 8".- 7./&;
'$// )*-#/ >$0=04 %&+,- &*(./0% #1%2&*" &32"('43B4 )*++/ !" !(*! ?@A ,&++
%*&+ &% 8".- .'*.!($'!&)*!$# )"'!$2! /&93+8 (*'=/ .30 G(*! 8". ,*'!
&'/!$*# &/ %"- 8".- .'*.!($'!&)*!$# )"'!$2! !" 3.! &')"9&'= )*++/ &'!" *
)"'!-"++$# $'6&-"'9$'!0 D". 9*8 ,&/( !" *++", !($ )*++/4 7.! 8". ,"'5!
'$)$//*-&+8 !-./! !($90H
1($ srvlookup "3!&"' &/ ./$# !" $'*7+$ </!$-&/C !" 3$-%"-9 * +""C.3 6&* * IJE E@K
-$)"-#4 ,(&)( &/ !83&)*++8 ./$# %"- ".!7".'# )"''$)!&"'/ !" /$-6&)$ 3-"6&#$-/0 G$5++
!*+C 9"-$ *7".! </!$-&/C *'# IJE &' L(*3!$- MN0
1($ udpbindaddrO"3!&"' !*C$/ !($ 6*+.$ "% *' AF *##-$// "- 0.0.0.0 !" !$++ </!$-&/C ,(&)(
'$!,"-C &'!$-%*)$ &! /(".+# +&/!$' !" %"- -$P.$/!/ )*--&$# 78 !($ ?IF '$!,"-C !-*'/3"-!
3-"!")"+ >,(&)( &/ !($ 3-"!")"+ !(*! *)!.*++8 )*--&$/ !($ 6"&)$ )(*''$+/B0 Q8 #$%&'&'=
0.0.0.04 ,$5-$ &'/!-.)!&'= !($ )(*''$+ #-&6$- !" +&/!$' "' *++ *6*&+*7+$ &'!$-%*)$/0 <+!$-;
'*!&6$+84 ,$ )".+# +&9&! K"AF )"''$)!&"'/ %"- !(&/ 3-"!")"+ !" * /&'=+$ &'!$-%*)$ 78
#$%&'&'= !($ AF *##-$// "% * /3$)&%&) '$!,"-C &'!$-%*)$ "' ".- /8/!$90
L.--$'!+8 &' </!$-&/C !($ udpbindaddr *'# tcpbindaddr "3!&"'/ *-$ *'
*++;"-;"'$ 3-"3"/&!&"'0 A' "!($- ,"-#/4 &% 8". (*6$ !(-$$ JAL/ &' 8".-
/8/!$94 8". )*'5! -$/!-&)! K"AF !-*%%&) !" !," "% !($9R &!5/ $&!($- "'$ "'+84
"- *++ "% !($90
H 1($ ,("+$ )"')$3! "% /$).-&!8 *'# !-./! "' * K"AF '$!,"-C &/ /"9$!(&'= !(*! )*' 7$)"9$ P.&!$
)"93+$20 E3*99$-/ *-$ *+-$*#8 (*-# *! ,"-C %&=.-&'= ".! !(&/ !$)('"+"=84 *'# 8". '$$# !" 7$
*,*-$ "% !($ )"')$3!/0 G$5++ )"6$- !(&/ &' 9"-$ #$3!( +*!$- &' !($ 7""C4 /.)( */ &' L(*3!$- S
*'# L(*3!$- NT0
O 1($ )"93+$9$'! !" !(&/ "3!&"' &/ tcpbindaddr4 ./$# %"- +&/!$'&'= %"- -$P.$/!/ )*--&$# 6&* !($ 1LF '$!,"-C
!-*'/3"-! 3-"!")"+0
Configuring Asterisk | 91
IPv6 in sip.conf
</ "% 6$-/&"' M0U4 </!$-&/C /.33"-!/ AF6T %"- 7"!( EAF *'# @1F !-*%%&)0 <++ "% !($ )"';
%&=.-*!&"' "3!&"'/ &' 5 ")5/%" 4&%65%&+()'#* -$+*!$# !" AF *##-$//$/ )*' *))$3! $&!($- *'
AF6V "- *' AF6T *##-$//0 </ *' $2*93+$4 )"'/&#$- !($ #&%%$-$'! 6*+.$/ %"- !($ udpbin
daddr "3!&"'R
1($ tcpenable "3!&"' *++",/ ./ !" *))$3! -$P.$/!/ 6&* !($ 1LF '$!,"-C !-*'/3"-! 3-";
!")"+0 W"- '", ,$56$ #&/*7+$# &!4 */ !($ ?IF 9$!("# &/ ).--$'!+8 9"-$ 9*!.-$ >*'#
9"-$ 3"3.+*-B *'# ,$5-$ *!!$93!&'= !" $+&9&'*!$ */ 9*'8 7*--&$-/ */ 3"//&7+$0 X*6&'=
/*&# !(*!4 %$$+ %-$$ !" !$/! 1LF /.33"-! "')$ 8".5-$ )"9%"-!*7+$ )"'%&=.-&'= 8".-
#$6&)$/0
1($-$ *-$ *+/" tlsenable *'# tlsbindaddr "3!&"'/ %"- $'*7+&'= EAF "6$-
1YE >$')-83!$# EAFB0 G$5++ )"6$- !($ )"'%&=.-*!&"' "% EAF ,&!( 1YE &'
L(*3!$- S0
1($ '$2! /$)!&"' ,$56$ #$%&'$# &/ * !$93+*!$ ,$ (*6$ )("/$' !" '*9$ [office-phone]
(!)0 G$56$ )-$*!$# &! */ * !$93+*!$ /" !(*! ,$ )*' ./$ !($ 6*+.$/ ,&!(&' &! %"- *++ "% ".-
#$6&)$/0
W"++",&'= !($ /$)!&"' '*9$ ,&!( (!) !$++/ </!$-&/C !" !-$*! !(&/ /$)!&"'
*/ * !$93+*!$0 Q8 #"&'= !(&/ ,$ $+&9&'*!$ !($ '$$# !" -$3$!&!&6$+8 *##
*'# )(*'=$ )"'%&=.-*!&"' "3!&"'/ %"- $6$-8 #$6&)$ ,$ )(""/$ !" #$%&'$0
1$93+*!$/ *-$ $2!-$9$+8 ./$%.+ *'# *-$ *6*&+*7+$ &' *++ "% </!$-&/C5/
)"'%&=.-*!&"' %&+$/0 A% 8". ,*'! !" )(*'=$ /"9$!(&'= %"- *' &'#&6&#.*+
#$6&)$ !(*! ,*/ 3-$6&"./+8 #$%&'$# &' !($ !$93+*!$ %"- !(*! #$6&)$4 8".
)*' #" !(*! .'#$- !($ /$)!&"' ($*#$-4 *'# &! ,&++ "6$--&#$ ,(*! ,*/ #$;
%&'$# 78 !($ !$93+*!$0 A! &/ '"! '$)$//*-8 !" ./$ !$93+*!$/4 7.! !($8 *-$
$2!-$9$+8 (*'#84 *'# ,$ ./$ !($9 $2!$'/&6$+80
type = Description
peer Match incoming requests to a configuration entry using the source IP address and port number.
user Match incoming requests to a configuration entry using the username in the From header of the SIP
request. This name is matched to a section in sip.conf with the same name in square brackets.
friend This enables matching rules for both peer and user. This is the setting most commonly used for SIP phones.
G($' * -$P.$/! %-"9 * !$+$3("'$ &/ -$)$&6$# *'# *.!($'!&)*!$# 78 </!$-&/C4 !($ -$;
P.$/!$# $2!$'/&"' '.97$- &/ (*'#+$# 78 !($ #&*+3+*' &' !($ context #$%&'$# &' !($ #$6&)$
)"'%&=.-*!&"'Z &' ".- )*/$4 !($ )"'!$2! '*9$# LocalSets0
1($ host "3!&"' &/ ./$# ,($' ,$ '$$# !" /$'# * -$P.$/! !" !($ !$+$3("'$ >/.)( */ ,($'
,$ ,*'! !" )*++ /"9$"'$B0 </!$-&/C '$$#/ !" C'", ,($-$ !($ #$6&)$ &/ "' !($ '$!,"-C0
Q8 #$%&'&'= !($ 6*+.$ */ dynamic4 ,$ +$! </!$-&/C C'", !(*! !($ !$+$3("'$ ,&++ !$++ ./
,($-$ &! &/ "' !($ '$!,"-C &'/!$*# "% (*6&'= &!/ +")*!&"' #$%&'$# /!*!&)*++80 A% ,$ ,*'!$#
!" #$%&'$ !($ *##-$// /!*!&)*++84 ,$ )".+# -$3+*)$ dynamic ,&!( *' AF *##-$// /.)( */
192.168.128.300
1($ nat "3!&"' &/ ./$# !" !$++ </!$-&/C !" $'*7+$ /"9$ !-&)C/ !" 9*C$ 3("'$ )*++/ ,"-C
,($' * EAF 3("'$ 9*8 7$ +")*!$# 7$(&'# * J<10 1(&/ &/ &93"-!*'! 7$)*./$ !($ EAF
3-"!")"+ &')+.#$/ AF *##-$//$/ &' 9$//*=$/0 A% * 3("'$ &/ "' * 3-&6*!$ '$!,"-C4 &! 9*8
$'# .3 3+*)&'= 3-&6*!$ *##-$//$/ &' EAF 9$//*=$/4 ,(&)( *-$ "%!$' '"! ./$%.+0
1($ 3*//,"-# %"- !($ #$6&)$ &/ #$%&'$# 78 !($ secret 3*-*9$!$-0 G(&+$ !(&/ &/ '"! /!-&)!+8
-$P.&-$#4 8". /(".+# '"!$ !(*! &! &/ P.&!$ )"99"' %"- .'/*6"-8 %"+C/ !" -.' 3(&/(&'=
/)-&3!/ !(*! +""C %"- $23"/$# K"AF *))".'!/ ,&!( &'/$).-$ 3*//,"-#/ *'# /&93+$ #$6&)$
'*9$/ >/.)( */ * #$6&)$ '*9$ "% 100 ,&!( * 3*//,"-# "% 1234B0 Q8 .!&+&[&'= *' .')"9;
9"' #$6&)$ '*9$ /.)( */ * \<L *##-$//4 *'# * 3*//,"-# !(*! &/ * +&!!+$ (*-#$- !" =.$//4
,$ )*' /&='&%&)*'!+8 +",$- !($ -&/C !" ".- /8/!$9 /(".+# ,$ '$$# !" $23"/$ &! !" !($
".!/&#$ ,"-+#0
Configuring Asterisk | 93
Name Purpose Popularity/Status
func_sprintf Performs string format functions similar to C function of same name Useful
func_srv Perform SRV lookups in the dialplan Useful
func_strings Includes over a dozen string manipulation functions Useful
func_sysinfo Gets system information such as RAM, swap, load average, etc. Useful
func_timeout Gets/sets timeouts on channel Useful
func_uri Converts strings to URI-safe encoding Useful
func_version Returns Asterisk version information Usable
func_vmcount Returns count of messages in a voicemail folder for a particular user Useful
func_volume Sets volume on a channel Useful
PBX Modules
1($ FQ] 9"#.+$/ *-$ 3$-&3($-*+ 9"#.+$/ !(*! 3-"6&#$ $'(*')$# )"'!-"+ *'# )"'%&=.;
-*!&"' 9$)(*'&/9/0 W"- $2*93+$4 pbx_config &/ !($ 9"#.+$ !(*! +"*#/ !($ !-*#&!&"'*+
</!$-&/C #&*+3+*'0 1($ ).--$'!+8 *6*&+*7+$ FQ] 9"#.+$/ *-$ +&/!$# &' 1*7+$ N;^0
7/8- 9:$;(9<=>9.'0?- %
Name Purpose Popularity/Status
pbx_ael Asterisk Extension Logic (AEL) offers a dialplan scripting language that looks like a Usablea
modern programming language.
pbx_config This is the traditional, and most popular, dialplan language for Asterisk. Without Useful
this module, Asterisk cannot read extensions.conf.
pbx_dundi Performs data lookups on remote Asterisk systems. Useful
pbx_loopback Performs something similar to a dialplan include, but in a deprecated manner. Insignificantb
pbx_lua Allows creation of a dialplan using the Lua scripting language. Useful
pbx_realtime Provides functionality related to the Asterisk Realtime Architecture. Useful
pbx_spool Provides outgoing spool support relating to Asterisk call files. Useful
a We have not found too many people using AEL. We suspect this is because most developers will tend to use AGI/AMI if they do not want
to use traditional dialplans.
b We’ve never heard of this being used in production.
Resource Modules
@$/".-)$ 9"#.+$/ &'!$=-*!$ </!$-&/C ,&!( $2!$-'*+ -$/".-)$/0 W"- $2*93+$4 res_odbc
*++",/ </!$-&/C !" &'!$-"3$-*!$ ,&!( _IQL #*!*7*/$ )"''$)!&"'/0 1($ ).--$'!+8 *6*&+;
*7+$ -$/".-)$ 9"#.+$/ *-$ +&/!$# &' 1*7+$ N;M`0
Modules | 21
Hardphones, Softphones, and ATAs
1($-$ *-$ !(-$$ !83$/ "% $'#3"&'!/ 8". ,".+# !83&)*++8 3-"6&#$ 8".- ./$-/ ,&!( !(*!
)".+# /$-6$ */ * !$+$3("'$ /$!0 1($8 *-$ 3"3.+*-+8 -$%$--$# !" */ (*-#3("'$/4 /"%!;
3("'$/4 *'# <'*+"= 1$-9&'*+ <#*3!"-/ ><1</B0
< 2/40+2'# &/ * 3(8/&)*+ #$6&)$0 A! +""C/ a./! +&C$ *' "%%&)$ !$+$3("'$R &! (*/ * (*'#/$!4
'.97$-$# 7.!!"'/4 $!)0 A! )"''$)!/ #&-$)!+8 !" !($ '$!,"-C4 *'# &!5/ ,(*! 3$"3+$ *-$
-$%$--&'= !" ,($' !($8 !*+C *7".! * K"AF !$+$3("'$ >"- * EAF !$+$3("'$B0
< %'*"+2'# &/ * /"%!,*-$ *33+&)*!&"' !(*! -.'/ "' * +*3!"3 "- #$/C!"30 1($ *.#&" 9./!
3*// !(-".=( !($ FL5/ /".'# /8/!$94 /" 8". '"-9*++8 '$$# * ($*#/$! !(*! ,&++ ,"-C
,$++ ,&!( !$+$3("'8 *33+&)*!&"'/0 \"-$ -$)$'!+84 /"%!3("'$ *33+&)*!&"'/ (*6$ 7$$'
,-&!!$' %"- /9*-! 3("'$/ !(*! *++", 8". !" )"''$)! !" "!($- '$!,"-C/ "!($- !(*' a./!
!($ )$++.+*- '$!,"-C0 1($ &'!$-%*)$ "% !($ /"%!3("'$ &/ "%!$' /!8+$# !" +""C +&C$ * 3(8/&)*+
!$+$3("'$4 7.! !(&/ &/ '"! '$)$//*-80
<' @7@ &/ #$/&='$# !" *++", !-*#&!&"'*+ *'*+"= !$+$3("'$/ >*'# "!($- *'*+"= #$6&)$/4
/.)( */ %*2 9*)(&'$/4 )"-#+$// 3("'$/4 3*=&'= *93+&%&$-/4 *'# /.)(B !" )"''$)! !" * EAF
'$!,"-C4b *'# ,&++ !83&)*++8 7$ * /*'#,&)(;/&[$# 7"2 !(*! )"'!*&'/ *' @c;MM )"''$)!"-
%"- !($ 3("'$ >)"99"'+8 -$%$--$# !" */ *' W]E 3"-!B4 *' @c;Vd )"''$)!"- %"- !($ '$!;
,"-C4 *'# * 3",$- )"''$)!"-0 E"9$ <1</ 9*8 /.33"-! 9"-$ !(*' "'$ 3("'$0
X*-#3("'$/ (*6$ !($ *#6*'!*=$ !(*! !($ (*'#/$!/ (*6$ =""# *)"./!&) 3-"3$-!&$/ %"-
6"&)$ )"99.'&)*!&"'/0 <'8 #$)$'!;P.*+&!8 !$+$3("'$ &/ $'=&'$$-$# !" 3&)C .3 !($ %-$;
P.$')&$/ "% !($ (.9*' 6"&)$4 %&+!$- ".! .',*'!$# 7*)C=-".'# '"&/$4 *'# '"-9*+&[$ !($
-$/.+!&'= ,*6$%"-90 F$"3+$ (*6$ 7$$' ./&'= !$+$3("'$/ %"- */ +"'= */ !($ !$+$3("'$
'$!,"-C (*/ $2&/!$#4 *'# ,$ !$'# !" +&C$ ,(*! &/ %*9&+&*-4 /" (*6&'= * #$6&)$ !(*! )"9;
9.'&)*!$/ ,&!( </!$-&/C ./&'= * %*9&+&*- &'!$-%*)$ ,&++ 7$ *!!-*)!&6$ !" 9*'8 ./$-/0 <+/"4
* (*-#3("'$ #"$/ '"! -$P.&-$ 8".- )"93.!$- !" 7$ -.''&'= *++ !($ !&9$0
I&/*#6*'!*=$/ !" (*-#3("'$/ &')+.#$ !(*! !($8 *-$ '"'3"-!*7+$ *'# $23$'/&6$4 -$+*!&6$
!" !($ 9*'8 P.*+&!8 /"%!3("'$/ "' !($ 9*-C$! !"#*8 !(*! *-$ *6*&+*7+$ %"- %-$$0 <+/"4
!($ $2!-* )+.!!$- "' 8".- #$/C 9*8 '"! 7$ #$/&-*7+$ &% 8". (*6$ +&9&!$# ,"-C /3*)$4 *'#
&% 8". 9"6$ *-".'# * +"! *'# *-$ '"! =$'$-*++8 *! !($ /*9$ +")*!&"'4 * (*-#3("'$ &/ '"!
+&C$+8 !" /.&! 8".- '$$#/ >*+!(".=(4 "'$ *! $*)( +")*!&"' 8". %-$P.$'! 9&=(! 7$ * 6*+&#
/"+.!&"'B0
E"%!3("'$/ /"+6$ !($ 3"-!*7&+&!8 &//.$ 78 7$&'= &'/!*++$# "' * #$6&)$ !(*! &/ +&C$+8 *+-$*#8
9"6&'= ,&!( 8".4 /.)( */ 8".- +*3!"3 "- /9*-! 3("'$0 <+/"4 !($&- 9&'&9*+ )"/! >!83&;
)*++8 %-$$4 "- *-".'# !($ ef` 3-&)$ -*'=$ %"- * %.++8 %$*!.-$# "'$B &/ *!!-*)!&6$0 Q$)*./$
9*'8 /"%!3("'$/ *-$ %-$$4 &! &/ +&C$+8 !(*! !($ %&-/! !$+$3("'$ /$! 8". )"''$)! !" </!$-&/C
,&++ 7$ * /"%!3("'$0 <+/"4 7$)*./$ /"%!3("'$/ *-$ a./! /"%!,*-$4 !($8 *-$ $*/8 !" &'/!*++
*'# .3=-*#$4 *'# !($8 )"99"'+8 (*6$ "!($- %$*!.-$/ !(*! .!&+&[$ "!($- 3$-&3($-*+/4 +&C$
b _- *'8 "!($- '$!,"-C4 %"- !(*! 9*!!$-0 <1</ )".+# 9"-$ %"-9*++8 7$ /*&# !" 7$ *'*+"=;!";#&=&!*+ =*!$,*8/4
,($-$ !($ '*!.-$ "% !($ #&=&!*+ 3-"!")"+ 9*8 6*-8 >$0=04 3-"3-&$!*-8 <1</ "' !-*#&!&"'*+ FQ]/B0
G$5-$ '", ="&'= !" /!$3 !(-".=( *++ !($ %&+$/ !(*! *-$ -$P.&-$# !" =$! * /&93+$ </!$-&/C
/8/!$9 .3 *'# -.''&'=0
Q$)*./$ ,$5-$ -.''&'= </!$-&/C */ '"';-""!4 ,$ '$$# !" !$++ </!$-&/C ,(&)( ./$- !" -.'
*/0 1(&/ &/ #"'$ ,&!( !($ /%" 4&%6()'#* %&+$0 G$ )*' )"38 * /*93+$ 6$-/&"' "% &! %-"9 !($
</!$-&/C /".-)$ !" 5 ")5/%" 4&%6R
$ cp ~/src/asterisk-complete/asterisk/1.8/configs/asterisk.conf.sample \
/etc/asterisk/asterisk.conf
1($ /%" 4&%6()'#* %&+$ )"'!*&'/ 9*'8 "3!&"'/ !(*! ,$ ,"'5! =" "6$- ($-$ >!($8 *-$ )"6;
$-$# &' i*/!$-&/C0)"'%j "' 3*=$ SMB4 7.! ,$ #" '$$# !" 9*C$ *' *#a./!9$'!0 J$*- !($
$'# "% !($ [options] /$)!&"'4 !($-$ *-$ !," "3!&"'/ ,$ '$$# !" $'*7+$R runuser *'#
rungroup0
Base Configuration | 53
1(&/ &)"' &'#&)*!$/ * ,*-'&'= "- )*.!&"'0
How to Contact Us
F+$*/$ *##-$// )"99$'!/ *'# P.$/!&"'/ )"')$-'&'= !(&/ 7""C !" !($ 3.7+&/($-R
_5@$&++8 \$#&*4 A')0
M``d k-*6$'/!$&' X&=(,*8 J"-!(
E$7*/!"3"+4 L< ^dVSN
>U``B ^^U;^^fU >&' !($ ?'&!$# E!*!$/ "- L*'*#*B
>S`SB UN^;`dMd >&'!$-'*!&"'*+ "- +")*+B
>S`SB UN^;`M`V >%*2B
Preface | xxvii
Asterisk™: The Definitive Guide
The Asterisk CLI
1($ 7$/! ,*8 !" /$$ ,(*! &/ (*33$'&'= ,&!( 8".- </!$-&/C /8/!$9 &/ !(-".=( !($ </!$-&/C
LYA0 1(&/ &'!$-%*)$ 3-"6&#$/ 6*-&"./ +$6$+/ "% ".!3.! !" +$! 8". C'", ,(*! &/ (*33$'&'=
"' 8".- /8/!$94 *'# "%%$-/ * ,$*+!( "% ./$%.+ .!&+&!&$/ !" *++", 8". !" *%%$)! 8".- -.''&'=
/8/!$90 Q$=&' 78 )*++&'= .3 !($ </!$-&/C LYA *'# -$+"*#&'= !($ )"'%&=.-*!&"' %&+$/ %"-
8".- )(*''$+ 9"#.+$/R
$ sudo asterisk -r
*CLI> module reload chan_sip.so
*CLI> module reload chan_iax2.so
<! !(&/ 3"&'! 8".- </!$-&/C /8/!$9 /(".+# 7$ )"'%&=.-$# !" (*'#+$ -$=;
&/!-*!&"'/ %-"9 !($ #$%&'$# #$6&)$/0 L*++/ !" *'# %-"9 !($ /$!/ ,&++ '"!
,"-C .'!&+ !($ )"'%&=.-*!&"' "' !($ #$6&)$/ (*/ 7$$' )"93+$!$#0 E&')$
$*)( #$6&)$ &/ #&%%$-$'! &' !(&/ -$=*-#4 #$!*&+$# )"'%&=.-*!&"' &'/!-.)!&"'/
%"- $*)( 9"#$+ *-$ ".!/&#$ "% !($ /)"3$ "% !(&/ 7""C0
1" )($)C !($ -$=&/!-*!&"' /!*!./ "% * #$6&)$4 /&93+8 )*++ .3 !($ </!$-&/C LYAR
$ sudo asterisk -r
D". 9*8 '"!&)$ !(*! !($ Name/username %&$+# #"$/ '"! *+,*8/ /(", !($
%.++ '*9$ "% !($ #$6&)$0 1(&/ &/ 7$)*./$ !(&/ %&$+# &/ +&9&!$# !" Nd
)(*-*)!$-/0
J"!$ !(*! !($ Status &' ".- $2*93+$ &/ /$! !" Unmonitored0 1(&/ &/ 7$)*./$ ,$ *-$ '"!
./&'= !($ qualify=yes "3!&"' &' ".- %&+()'#* %&+$0
Analog Phones
1($-$ *-$ !," 3"3.+*- 9$!("#/ %"- )"''$)!&'= *'*+"= 3("'$/ !" </!$-&/C0 1($ %&-/! &/
78 ./&'= *' <1< !(*! 9"/! )"99"'+8 )"''$)!/ !" </!$-&/C ./&'= !($ EAF 3-"!")"+0 1($
</!$-&/C )"'%&=.-*!&"' %"- *' <1< &/ !($ /*9$ */ &! ,".+# 7$ %"- *'8 "!($- EAF;7*/$#
(*'#/$!0 1($ "!($- 9$!("# &/ !" #&-$)!+8 )"''$)! !($ 3("'$/ !" !($ </!$-&/C /$-6$- ./&'=
!$+$3("'8 (*-#,*-$ %-"9 * 6$'#"- /.)( */ I&=&.90 I&=&.9 /$++/ !$+$3("'8 )*-#/ !(*!
)*' 7$ *##$# !" 8".- /$-6$- !" 3-"6&#$ W]E 3"-!/ %"- )"''$)!&'= *'*+"= 3("'$/ >"- %*2
9*)(&'$/B0 W"- !($ 3.-3"/$/ "% #$9"'/!-*!&'= !($ )"'%&=.-*!&"'4 ,$5-$ ="&'= !" /(",
!($ )"'%&=.-*!&"' -$P.&-$# &% 8". (*# * I&=&.9 <g]VV`g )*-#4 ,(&)( &/ *' <g]VM`
(*+%;+$'=!( FLA;g23-$// ,&!( %".- W]E 9"#.+$/ *'# (*-#,*-$;7*/$# $)(" )*')$++*!&"'0
@$=*-#+$// "% ,(&)( (*-#,*-$ 8". *-$ ./&'=4 )"'/.+! 8".- 6$'#"-5/
#").9$'!*!&"' %"- *'8 (*-#,*-$;/3$)&%&) )"'%&=.-*!&"' -$P.&-$9$'!/0
W&-/!4 $'/.-$ !(*! 7"!( </!$-&/C *'# I<XIA *-$ &'/!*++$# >-$%$- 7*)C !" iX", !" A'/!*++
A!j "' 3*=$ VU %"- &'/!-.)!&"'/B0 J"!$ !(*! I<XIA 9./! 7$ &'/!*++$# 7$%"-$ 8". &'/!*++
</!$-&/C0 G($' 8". &'/!*++ I<XIA4 7$ /.-$ !" &'/!*++ !($ &#&" /)-&3! */ ,$++0 1(&/ ,&++
$'/.-$ !(*! 8".- (*-#,*-$ &/ 3-"3$-+8 &'&!&*+&[$# ,($' !($ /8/!$9 7""!/ .30 1($ &#&"
/)-&3! &/ &'/!*++$# %-"9 !($ G@IGJ$"''-% 3*)C*=$0