saghul
Saúl Ibarra orretg! "saghul#gmail.com$ http://www.saghul.net
% About me
● saghul
– (oIP enthusiast, pla)ing around with Asterisk since %k* – +-/inu lo0er likes e0er)thing 1So2tware ibre3
– o42ounder o2 http://sipdoc.net
6 7his presentation
● http://www.saghul.net/blog/downloads/astricon%k'/ ● http://www.slideshare.net/saghul/
– Slides
– omplete con2iguration 2iles – 8atabase eample data
9 Inde
. Asterisk and presence status
%. SIP SIMP; or <MPP?
6. 7he <MPP solution
. =pen>ire setup
9. 7he SIMP; solution
. amailio @ Asterisk setup
* hat we do ha0e now
● Asterisk SIP support BchanCsipD
– In4dialog M;SSA+; :4B
– S-ESFIE; and =7I>G support
●
>or ;0ent: dialog
● hat about ;0ent: Presence? :4B
– o P-EIS5 support :4B
● Asterisk <MPP support
– resCHabber
● abberSend, AEE;FCF;;I(;, AEE;FCS7A7-S
– chanCgtalk, chanCHingle
J 8o we need presence and IM?
● 1I want to talk to )ou, not to )our phone3
● Are )ou ?
– >or an audio con2erence? – ust 2or IM?
– >or whom? ● are )ou? – Mobile – =22ice – 5ome – ...
e need to know i2 a user is
and what his
is
K hat we need
● A ser0er
● -sers ma) their status
● -sers ma) to other users status
● between users
' SIMP; 0s <MPP
● 8id SIMP; rein0ent the wheel?
● arge companies started adopting SIMP; BMicroso2t,
D
– Propietar) etensions :4B
● <MPP does not pro0ide 0oice capabilities
– ell, there is ingle...
● I2 SIP is the (oIP protocol: wh) not use it also 2or
7he <MPP solution
% =pen>ire ● ● a0a based ● Multiplat2orm ●
● SIP so2tphone plugin
● +atewa)s to multiple mi ser0ices: MS, Gahoo,
6 =pen>ire BIID
● 8ownload deb package
9 =pen>ire BIIID
● eb based con2iguration
● lustering architecture
● onnection to the Asterisk Manager Inter2ace
– Multiple connections
● Mapping between Asterisk SIP users and =pen>ire
<MPP users
● Multiplat2orm a0a client: Spark
* =pen>ire BI(D
J =pen>ire B(D
K =pen>ire B(ID
L =pen>ire B(ID
● hat we get
– Instant Messaging – Presence
– +atewa)s to other mi ser0ices – 7et con2erencing
● Problems
– 8uplicated users Bwe could partiall) 2i it with 8APD – eed to handle % protocols
– ot man) so2tphones support SIP and <MPP – 8o an) hardphones support <MPP?
%& A comple protocol
● SIMP; I;7> working group
– Presence F>s ● 6L*J, 6L*K, 6L*L, 6LJ6, 99K', 99L&, 99L%, ... – <AP ● 9L%*, 9L%J, 9L%K, *&%*, – Instant Messaging ● 69%L, 6''9, 9'K*,
SIMP; is =7 simpleN
% 7he SIP solution
● Integrate Asterisk and amailio to pro0ide IM and
presence.
● -sers are registered to amailio.
●
I(I7; reOuests are routed through the Asterisk ser0er.
– Asterisk Feal7ime user integration with amailios
subscriber table.
● P-EIS5, S-ESFIE; and M;SSA+; reOuests are
%% Fegistration
F;+IS7;F
Store location Asterisk does nothingN
%6 amailio Q Asterisk Feal7ime integration
● Asterisk peers are amailios subscribers.
● M)SR 0iew so that Asterisk sees the users as his own.
● Peers IP → amailio IP.
● alls between users go through amailio and Asterisk.
%9 amailio Q Asterisk Feal7ime integration B%D
F;A7; (I; sipCpeers AS S;;7
2riend AS t)pe,
subscriber.domain AS host,
concatBsubscriber.rpid, ,",subscriber.username,$D AS callerid, 2rom4users AS contet,
subscriber.username AS mailbo,
no AS Ouali2), in2o AS dtm2mode,
%* amailio Q Asterisk Feal7ime integration B6D
- AS authuser, subscriber.domain AS 2romdomain, - AS insecure, - AS disallow, all AS allow, - AS restrictcid, subscriber.domain AS de2aultip, subscriber.domain AS outboundpro), *&J& AS port, - AS regseconds >F=M kamailioC.subscriber
%J In0itation
. I(I7; BEobD
%. >ind numeric Alias 6. Add <4Subscriber header 9. I(I7; B%&&D *. 8ial to the <4 Subscriber user J. I(I7; BEobD K. ookup user location Alice Eob L. I(I7; BEobD
%K In0itation B%D T Foute all I(I7; reOuests to Asterisk
i2 BisCmethodBUI(I7;UDD V
T Femo0e <4Subscriber header so that no one sees it... remo0eCh2BU<4SubscriberUD
T e dont ha0e to route the reOuests coming >F=M Asterisk T back to Asterisk. e would make a loopN
i2 BNBWsi XX UAS7CIPU YY Wsp XX UAS7CP=F7UDD V routeBAS7;FISC-S;FSCF=-7;D
Z Z
%L In0itation B6D T Send I(I7; reOuests to the Asterisk ser0er
route[AS7;FISC-S;FSCF=-7;\ V T all to the numeric alias
a0pCdbCOuer)BUS;;7 aliasCusername >F=M dbaliases 5;F; username X Wr- A8 domain X Wa0pBA(PC=FI+8=MAIDIMI7 U,
UWa0pBA(PC-MAIASD3D
i2 BisCa0pCsetBUWa0pBA(PC-MAIASDUDD V
T Sa0e the subscriber in a header so we can use it in Asterisk appendCh2BU<4Subscriber: Wr-]r]nUD Wr- X Wa0pBs:numaliasD Z Wrd X UAS7CIPU Wrp X UAS7CP=F7U routeBF;AGCF=-7;D Z
%' In0itation B9D
[2rom4users\
eten X$ C<.,,o=pBD
eten X$ C<.,n,SetBS-ESFIE;FXWVSIPC5;A8;FB<4SubscriberDZD eten X$ C<.,n,+otoI2BW[WV;BWVS-ESFIE;FZDZ X &\?hangD eten X$ C<.,n,8ialBSIP/WVS-ESFIE;FZD
6& SIMP; presence . S-ESFIE; BEobD %. handleCsubscribe Alice Eob
6. P-EIS5 Asterisk does
nothingN 9. handleCpublish
6 SIMP; presence B%D T 5andle presence reOuests
i2BisCmethodBUP-EIS5^S-ESFIE;UDD V routeBPF;S;;CF=-7;D Z T 5andle presence route[PF;S;;CF=-7;\ V i2 BisCmethodBUP-EIS5UDD V handleCpublishBD tCreleaseBD Z else i2 BisCmethodBUS-ESFIE;UDD V handleCsubscribeBD tCreleaseBD Z eit Z
6% Messaging . M;SSA+; BEobD %. ookup location Alice Eob 6. M;SSA+; Asterisk does nothingN
66 A7 handling
● e Hust need to 2i the A7 in signalling.
● =ur Asterisk peers are con2igured with natX)es
– =M;8IA mode
69 >urther impro0ements...
6* >urther impro0ements... B%D
hat about miing both?
– =pen>ires Asterisk plugin still worksN Bregardless
6K 7hanksN
BYE sip:astricon@astricon.net SIP/2.0
Via: SIP/2.0/UDP guest.astricon.net:5060;ranc!"#$!%&'nas!(s) *a+,-orar(s: )0
-ro: sag!u 1sip:sag!u@sip(oc.net;tag"34224&456 o: 7stri8on 1sip:astricon@astricon.net;tag"$9+ce()6s 8a,ID: 43&32)62$3220335@astricon.net
8Se: BYE
8ontent,engt!: 0
6' icense
http://creati0ecommons.org/licenses/b)4sa/6.&/