Professional Documents
Culture Documents
G,%,%-'()'
G,%,%-*!+,-.%&/0/123/4567893*:89;<=
45;9>?@7ABG,%,%-CAD451E1<@>;F>@A
.&,#H*,-IJ%'()'
.&,#H*,-IJ%/0/123/4567893*:89;<=45;9>?@7AB,-IJ%C
'
AD451E1<@>;F>@A
! !
,+*&)!/*6(:(6&!;>&$-*'&+!C*-%!
L,ML*
!"#$%&%#!%'()'
!"#$%&%#!%*!+,-.%&/0/123/4567893*:89;<=
45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A
L,ML*!7#+'>3$#!M62#
! !
,+*&)!/*6(:(6&!;>&$-*'&+!C*-%!
L,ML*
!"#$%&%#!%'()'
!"#$%&%#!%'!()*+%&/0/123/4567893*:89;<=
45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A
L*6(:(6&!$'&-#N-!-'!:#3;'32!(''B>:
! !
,+*&)!/*6(:(6&!;>&$-*'&+!C*-%!
L,ML*
!"#$%&%#!%'()'
!"#$%&%#!%*!+,-.%&/,/123/4567893*:89;<=
45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A
O#*)%-!A.#3'!*+!%*)%#+-!C#*)%-E
! !
,+*&)!/*6(:(6&!;>&$-*'&+!C*-%!
L,ML*
!"#$%&%#!%'()'
!"#$%&%#!%*!+,-.%&/0/-.//4567893*:89;<=
45;9>?@7AB!"#$%&%#!%CAD451E1<@>;F>@A
"#$%&'(')H!3#+'>3$#!ACD4/74EF6GH!
/*6(:(6&!963*6=(#E
! !
,+*&)!/*6(:(6&!;>&$-*'&+!C*-%!
L,ML*
!"#$%&%#!%'()'
!"#$%&%#!%*!+,-.%&/0/123/012345/'645789
0175:;<3=>!"#$%&%#!%?=@01-A-8<:7B:<=
7#+>(-!3#->3&#/!*&!CD4/744F(EH
JN62:(#P!
QRL,MLLJ8"S!3#->3&#/!TTU+H+-#2I&#
! !
DUNDIRESULT() and
DUNDIQUERY()
• Unfortunately, in 1.4, we have to query
each server individually – but in 1.6, we
have solved this with DUNDIQUERY()
and DUNDIRESULT()
• DUNDIQUERY() retrieves the data from
the servers, and DUNDIRESULT()
parses it
DUNDIQUERY()!JN62:(#
exten => _X.,1,Set(ID=${DUNDIQUERY(${USERNAME},
trunk_usage,b)})
exten => _X.,n,Set(NUM=${DUNDIRESULT(${ID},getnum)})
exten => _X.,n,NoOp(There are ${NUM} results)
exten => _X.,n,Set(X=1)
exten => _X.,n,While($[${X} <= ${NUM}])
exten => _X.,n,NoOp(Result ${X} is ${DUNDIRESULT(${ID},$
{X})})
exten => _X.,n,Set(X=$[${X} + 1])
exten => _X.,n,EndWhile()
! !
Sample Call Flow
Sample Call Flow
Sample Call Flow
Sample Call Flow
Centralized Advantages
• Easier to control where to send calls
based on prior load testing (DUNDi and
GROUP_COUNT function)
• May be simpler to administer (hub and
spoke topology)
Centralized Disadvantages
• It's... well... centralized -- single point of
failure
• May be a ceiling on the number of
registrations the server can handle
Distributed registration server
• No centralized distribution server
• Phones can register to any server in the
cluster
• Asterisk seeks out the registration point and
delivers the call
• Uses DUNDi and regexten/regcontext methods
(found in sip.conf and iax.conf) to find endpoints
Sample Call Flow
Sample Call Flow
Sample Call Flow
Sample Call Flow
Sample Call Flow
Sample Call Flow
Failed Registration Server
Distributed Advantages
• No central registration point to fail;
phones can auto-failover
• Creates a "self-healing" network by
nature
Distributed Disadvantages
• Harder to control number of calls each
server handles
• Requires careful network planning in
order to scale
• Fully meshed networks are fault tolerant,
but are not (reasonably) scalable
Hybrid registration server
• Combine the advantages of distributed and centralized
registration servers
• Utilize heartbeat to auto-failover registration server to
another server in the LAN
• OR, run a pair of registration servers, balance the
registrations between them, and have the phones fail-
over if a server dies
• Still have separate servers handle media and
processing of calls based on prior load testing
Hybrid topology
Hybrid Advantages
• Get the best of both distributed and
centralized models
• Better tolerance to system failure
Hybrid Disadvantages
• May be more complicated of a topology
to initially configure and maintain
• More technologies involved could
possibly mean more places to break
Clustering Tools
• DUNDi
• Realtime / UnixODBC
(database integration)
• func_odbc
• Centralized voicemail: IMAP or ODBC
DUNDi
(Distributed Universal Number Discovery)
! !
(I'm cheating a bit...)
• svn co
http://svncommunity.digium.com/svn/func_odbc/1.4
/usr/src/func_odbc-1.4
• svn co
http://svncommunity.digium.com/svn/app_stack/1.4
/usr/src/app_stack-1.4
! !
What does the future hold?
• Current efforts include a binary encoded
system inside of Asterisk, allowing
events to be sent across servers
• The first example of this would be
Message Waiting Indication for
Voicemail() being distributed across
various boxes
•
What does the future hold?
• Another application would be sharing
device state amongst the cluster
• Immediately this would be useful for
sharing presence information, and is a
prerequisite for building distributed
systems that depend on device states;
distributed queues for example
"#$!%&'&($!)*!+,-.!
/012!($023!4,(!'$*'5167
8 4&19:2$;*'0'$<!=01&0>>3!*$'!'#$!2$;59$!
*'0'$!,4!0!2$;59$!51!'#$!250>?>01
@ A09B?,('!0;05>0A>$!C
#''?<DD*;19,==&15'3E2565&=E9,=D*;1D(&**$>>D0*'$(5*BFGEHD4&19:2$;*'0'$FGEHD
8 I5*'(5A&'$2!2$;59$!*'0'$!/51!2$;$>,?=$1'7
@ J*$*!K?$1L)M!>5A(0(3
@ N5>>!1,'!#0;$!0!A09B?,('!2&$!',!9,=?>$O5'3
#''?<DD*;1E2565&=E9,=D*;1D0*'$(5*BD'$0=D(&**$>>D$;$1'*D
! !
+,-!)*!"#$!%&'&($.
8 PIQ!L20?'5;$!KIRP
@ 9&*',=!9,>&=1*!=02$!$0*3.
#''?<DD*;19,==&15'3E2565&=E9,=D*;1D'5>6#=01DA(019#$*DGEHD92(:020?'5;$:,2A9E9
8 S,M&A!D!S,M&A)4!D!M'09BT,?
@ 1,-!-5'#!0(6&=$1'*.!/U09(,!($?>09$=$1'7
GoSub(subCallForward,s,1(${USERNAME}))
#''?<DD*;19,==&15'3E2565&=E9,=D*;1D0??:*'09BDGEV L*'$(5*B!GEV!A09B?,('
#''?<DD*;19,==&15'3E2565&=E9,=D*;1D0??:*'09BDGEH L*'$(5*B!GEH!A09B?,('
! !
Questions and Discussion
!"#$%&$'(#)"*+%$,"#
!"#$%&'()"*
+,,-.//00012"#$3'()"*1453
2"#$6(#7#831453
!
,0#,,"9.%2"#$:3'()"*
!