sip y xmpp: amigos para siempre
DESCRIPTION
Slides (in Spanish) from the talk I gave at Telefónica R&D. Talk was about what features SIP and XMPP share which go beyond VoIP and how to implement a gateway functionality between them.TRANSCRIPT
![Page 1: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/1.jpg)
SIP y XMPP: amigos para siempreSaúl Ibarra Corretgé | AG Projects
Saturday, October 6, 2012
![Page 2: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/2.jpg)
¡Hola!
Saturday, October 6, 2012
![Page 3: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/3.jpg)
AG ProjectsSIP Infrastructure Experts
Intro
• Hola, soy @saghul
• En VoIP desde el 2005
• Vamos a hablar de SIP y XMPP
Saturday, October 6, 2012
![Page 4: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/4.jpg)
AG ProjectsSIP Infrastructure Experts
AG Projects
• Infraestructura SIP
• SIP Thor: Plataforma SIP con escalabilidad horizontal mediante P2P
• Proyectos Open Source
• Blink
• SIP SIMPLE SDK
• SylkServer
• MediaProxy
• OpenXCAP
• MSRPRelay
Saturday, October 6, 2012
![Page 5: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/5.jpg)
AG ProjectsSIP Infrastructure Experts
Entendiendo SIP y XMPP
• Ambos son protocolos de señalización
• Nos permiten establecer sesiones multimedia
• Mensajería Instantánea y Presencia
• Pero son MUY distintos
Saturday, October 6, 2012
![Page 6: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/6.jpg)
AG ProjectsSIP Infrastructure Experts
SIP
• Session Initiation Protocol - RFC 3261
• Creado para iniciar, mantener y terminar sesiones multimedia
• Mayormente utilizado en sesiones de audio y video, y conferencias
• Diseñado para que la inteligencia esté en el User Agent
Saturday, October 6, 2012
![Page 7: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/7.jpg)
AG ProjectsSIP Infrastructure Experts
XMPP
• eXtensible Messaging and Presence Protocol - RFC 6120, 6121
• Creado para mensajería y presencia
• Mayormente utilizado para IM
• Diseñado para que la inteligencia esté en el servidor
Saturday, October 6, 2012
![Page 8: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/8.jpg)
Mensajería Instantánea
Saturday, October 6, 2012
![Page 9: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/9.jpg)
AG ProjectsSIP Infrastructure Experts
IM con SIP
• Tipo SMS: SIP MESSAGE
• No hay relación entre mensajes
• Si el transporte es UDP, orden no garantizado
• Utiliza el path de la señalización
Saturday, October 6, 2012
![Page 10: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/10.jpg)
AG ProjectsSIP Infrastructure Experts
IM con SIP
• Basado en sesiones: MSRP
• Igual que una llamada
• Conexión TCP entre los dispositivos
• Múltiples aplicaciones sobre MSRP
Saturday, October 6, 2012
![Page 11: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/11.jpg)
AG ProjectsSIP Infrastructure Experts
MSRP
• Message Session Relay Protocol - RFC4575
• Se negocia con SDP, igual que un stream de audio
• Aplicaciones: chat, transferencia de ficheros, compartir escritorio
•TLS es mandatory
• Usado en RCS
Saturday, October 6, 2012
![Page 12: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/12.jpg)
AG ProjectsSIP Infrastructure Experts
IM con SIP
MESSAGE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP 192.168.99.53:58291;rport;branch=z9hG4bKPjLOuZqe0g8SRst9ipMax-Forwards: 70From: "Saúl" <sip:[email protected]>;tag=QPQ0E6QCFPv8Nx7F3uGPgkmoPvibIZDSTo: <sip:[email protected]>Call-ID: Us.Cphs4LMENWqaKvgR3MDup4Ak4eee2CSeq: 50270 MESSAGEUser-Agent: Blink Pro 2.0.0 (MacOSX)Content-Type: text/plainContent-Length: 3
foo
Saturday, October 6, 2012
![Page 13: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/13.jpg)
AG ProjectsSIP Infrastructure Experts
IM con SIP
Saturday, October 6, 2012
![Page 14: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/14.jpg)
AG ProjectsSIP Infrastructure Experts
IM con SIP
v=0o=- 3557072827 3557072827 IN IP4 192.168.99.53s=Blink Pro 2.0.0 (MacOSX)c=IN IP4 192.168.99.53t=0 0m=message 2855 TCP/TLS/MSRP *a=path:msrps://192.168.99.53:2855/2da6282242d37bc5909b;tcpa=accept-types:message/cpim text/* application/im-iscomposing+xmla=accept-wrapped-types:*a=setup:activem=audio 50002 RTP/AVP 103 102 9 0 8 101a=rtcp:50003a=rtpmap:103 speex/16000a=rtpmap:102 speex/8000a=rtpmap:9 G722/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-15a=sendrecv
{ }
Saturday, October 6, 2012
![Page 15: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/15.jpg)
AG ProjectsSIP Infrastructure Experts
IM con SIP
• SIP MESSAGE es más frágil
• Con MSRP es necesario aceptar la sesión
• Es posible usar early media
• ¿Routing basado en presencia?
Saturday, October 6, 2012
![Page 16: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/16.jpg)
AG ProjectsSIP Infrastructure Experts
IM con XMPP
• Distintos tipos de stanzas para IM
• El servidor inserta nuestra identidad
• Sin soporte para sesiones, son “implícitas”
Saturday, October 6, 2012
![Page 17: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/17.jpg)
AG ProjectsSIP Infrastructure Experts
IM con XMPP
Saturday, October 6, 2012
![Page 18: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/18.jpg)
AG ProjectsSIP Infrastructure Experts
IM con XMPP
<message from="[email protected]/Psi+" type="chat" xml:lang="en" to="[email protected]/λ3DD1000D" id="aaf0a"> <body>foo</body> <active xmlns="http://jabber.org/protocol/chatstates"/> <request xmlns="urn:xmpp:receipts"/></message>
Saturday, October 6, 2012
![Page 19: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/19.jpg)
Presencia
Saturday, October 6, 2012
![Page 20: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/20.jpg)
AG ProjectsSIP Infrastructure Experts
Presencia con SIP
• Modelo PubSub, publicación - subscripción
• Iniciado por el usuario
• No se usa un modelo end to end
• Servidores Presence Agent
• Autorización: XCAP
Saturday, October 6, 2012
![Page 21: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/21.jpg)
AG ProjectsSIP Infrastructure Experts
XCAP
• XML Configuration Access Protocol - RFC4825
• Almacena documentos XML, modificables mediante HTTP
• Apliaciones
• Autorización
• Lista de contactos
• Estado offlineSaturday, October 6, 2012
![Page 22: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/22.jpg)
AG ProjectsSIP Infrastructure Experts
Presencia con SIP
Saturday, October 6, 2012
![Page 23: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/23.jpg)
AG ProjectsSIP Infrastructure Experts
<presence ...> <tuple id="SID-2af16065-6f4c-40a5-8bee-c38678776dec"> <status> <basic>open</basic> <agp-pidf:extended>available</agp-pidf:extended> </status> <c:display-name>saghul</c:display-name> <c:map>Netherlands/Wageningen</c:map> <c:icon>https://...</c:icon> <agp-pidf:device-info id="2af16065-6f4c-40a5-8bee-c38678776dec"> <agp-pidf:description>hal</agp-pidf:description> <agp-pidf:user-agent>Blink Pro 2.0.0 (MacOSX)</agp-pidf:user-agent> <agp-pidf:time-offset>120</agp-pidf:time-offset> </agp-pidf:device-info> <caps:servcaps> <caps:audio>true</caps:audio> <caps:message>true</caps:message> <caps:text>true</caps:text> <agp-caps:file-transfer>true</agp-caps:file-transfer> <agp-caps:screen-sharing>true</agp-caps:screen-sharing> </caps:servcaps> <rpid:user-input idle-threshold="600">active</rpid:user-input> <contact>sip:[email protected]</contact> <note>At work!</note> <timestamp>2012-09-19T22:09:56.929088+02:00</timestamp> </tuple> ...</presence>
Saturday, October 6, 2012
![Page 24: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/24.jpg)
AG ProjectsSIP Infrastructure Experts
Presencia con XMPP
• Modelo Push - el servidor envía los datos a todos
• Iniciado automáticamente por el servidor
• Sólo contempla presencia “básica”
• Presencia extendida
• Personal Eventing Protocol - XEP-0163
Saturday, October 6, 2012
![Page 25: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/25.jpg)
AG ProjectsSIP Infrastructure Experts
Presencia con XMPP
Saturday, October 6, 2012
![Page 26: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/26.jpg)
AG ProjectsSIP Infrastructure Experts
Presencia con XMPP
<presence> <status>ready to rock!</status> <priority>50</priority> <c xmlns="http://jabber.org/protocol/caps" node="http://psi-dev.googlecode.com/caps" ver="0.15" ext="ca cs cv e-time ep-notify-2 last-act mr sxe whiteboard"/> <x xmlns="vcard-temp:x:update"> <photo>6185d7579dab3063e71a09fcd0506a769c72af5e</photo> </x></presence>
Saturday, October 6, 2012
![Page 27: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/27.jpg)
Sesiones con RTP
Saturday, October 6, 2012
![Page 28: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/28.jpg)
AG ProjectsSIP Infrastructure Experts
Audio y Video con SIP
• SIP y SDP para señalización, RTP para el transporte del payload
• Encriptación: SRTP, ZRTP*
• Soporte para múltiples streams
• Soporte para distintas fuentes dentro de un mismo stream
Saturday, October 6, 2012
![Page 29: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/29.jpg)
AG ProjectsSIP Infrastructure Experts
Audio y Vídeo con SIP
v=0o=- 3557075781 3557075781 IN IP4 192.168.99.53s=Blink Pro 2.0.0 (MacOSX)c=IN IP4 192.168.99.53t=0 0m=audio 50542 RTP/AVP 103 102 9 0 8 101a=rtcp:50544a=rtpmap:103 speex/16000a=rtpmap:102 speex/8000a=rtpmap:9 G722/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-15a=ice-ufrag:453af62fa=ice-pwd:21f8ab2ba=candidate:Sc0a86335 1 UDP 1694498815 62.131.6.55 50542 typ srflx raddr 192.168.99.53 rport 55428a=candidate:Hc0a86335 1 UDP 2130706431 192.168.99.53 55428 typ hosta=candidate:Sc0a86335 2 UDP 1694498814 62.131.6.55 50544 typ srflx raddr 192.168.99.53 rport 52633a=candidate:Hc0a86335 2 UDP 2130706430 192.168.99.53 52633 typ hosta=sendrecv
Saturday, October 6, 2012
![Page 30: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/30.jpg)
AG ProjectsSIP Infrastructure Experts
NAT
• RTP viaja sobre UDP
• La mayoría de los usuarios está detrás de NAT
• Necesidad de usar media relays
• ¿O no?
Saturday, October 6, 2012
![Page 31: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/31.jpg)
AG ProjectsSIP Infrastructure Experts
ICE
• Interactive Connectivity Establishment - RFC 5425
• Cada usuario presenta sus candidatos para recibir RTP
• Se hacen pruebas usando paquetes STUN
• Se selecciona el candidato ganador
• ¡Audio P2P detrás de NAT!
• Ayuda en situaciones mixtas IPv4 / IPv6Saturday, October 6, 2012
![Page 32: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/32.jpg)
AG ProjectsSIP Infrastructure Experts
ICE
v=0o=- 3557075781 3557075781 IN IP4 192.168.99.53s=Blink Pro 2.0.0 (MacOSX)c=IN IP4 192.168.99.53t=0 0m=audio 50542 RTP/AVP 103 102 9 0 8 101a=rtcp:50544a=rtpmap:103 speex/16000a=rtpmap:102 speex/8000a=rtpmap:9 G722/8000a=rtpmap:0 PCMU/8000a=rtpmap:8 PCMA/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-15a=ice-ufrag:453af62fa=ice-pwd:21f8ab2ba=candidate:Sc0a86335 1 UDP 1694498815 62.131.6.55 50542 typ srflx raddr 192.168.99.53 rport 55428a=candidate:Hc0a86335 1 UDP 2130706431 192.168.99.53 55428 typ hosta=candidate:Sc0a86335 2 UDP 1694498814 62.131.6.55 50544 typ srflx raddr 192.168.99.53 rport 52633a=candidate:Hc0a86335 2 UDP 2130706430 192.168.99.53 52633 typ host
{ }Saturday, October 6, 2012
![Page 33: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/33.jpg)
AG ProjectsSIP Infrastructure Experts
Audio y Vídeo con XMPP
• Jingle, originalmente creado por Google
• Muy inspirado en SIP
• Stanzas de tipo IQ
• “Un SDP en XML”
• ICE como requisito
Saturday, October 6, 2012
![Page 34: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/34.jpg)
AG ProjectsSIP Infrastructure Experts
Audio y Vídeo con XMPP<iq from='[email protected]/orchard' id='ph37a419' to='[email protected]/balcony' type='set'> <jingle xmlns='urn:xmpp:jingle:1' action='session-initiate' initiator='[email protected]/orchard' sid='a73sjjvkla37jfea'> <content creator='initiator' name='voice'> <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'> <payload-type id='96' name='speex' clockrate='16000'/> <payload-type id='18' name='G729'/> <payload-type id='0' name='PCMU' /> </description> <transport xmlns='urn:xmpp:jingle:transports:ice-udp:1 pwd='asd88fgpdd777uzjYhagZg' ufrag='8hhy'> <candidate component='1' foundation='1' generation='0' id='el0747fg11' ip='10.0.1.1' network='1' port='8998' priority='2130706431' protocol='udp' type='host'/> <candidate component='1' foundation='2' generation='0' id='y3s2b30v3r' ip='192.0.2.3' network='1' port='45664' priority='1694498815' protocol='udp' rel-addr='10.0.1.1' rel-port='8998' type='srflx'/> </transport> </content> </jingle></iq>
Saturday, October 6, 2012
![Page 35: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/35.jpg)
Conferencias
Saturday, October 6, 2012
![Page 36: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/36.jpg)
AG ProjectsSIP Infrastructure Experts
Conferencias con SIP
• Lo habitual: aburridos mixers de RTP
• Lo interesante: RTP + chat + conference control
• Información: RFC 4575
• Control: RFC 4579
Saturday, October 6, 2012
![Page 37: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/37.jpg)
AG ProjectsSIP Infrastructure Experts
<conference-info ... entity="sip:[email protected]" state="full"> <conference-description> <display-text>Ad-hoc conference</display-text> <free-text>Hosted by SylkServer-2.0.0</free-text> </conference-description> <host-info> <web-page>http://sylkserver.com</web-page> </host-info> <conference-state> <user-count>1</user-count> <active>true</active> </conference-state> <users state="full"> <user entity="sip:[email protected]" state="full"> <display-text>Saúl</display-text> <endpoint entity="sip:[email protected]:63047" state="full"> <display-text>Saúll</display-text> <status>connected</status> <joining-info> <when>2012-09-19T23:26:18+02:00</when> </joining-info> <media id="186236108"> <type>message</type> </media> </endpoint> </user> </users></conference-info>
Saturday, October 6, 2012
![Page 38: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/38.jpg)
AG ProjectsSIP Infrastructure Experts
Conferencias con XMPP
• Multi User Chat (MUC): XEP-0045
• Audio y video
• Muji: XEP-0272
• Coin: XEP-0298
• Coin utiliza el payload del RFC 4575
Saturday, October 6, 2012
![Page 39: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/39.jpg)
AG ProjectsSIP Infrastructure Experts
Conferencias con XMPP<presence from='[email protected]/pda' id='n13mt3l' to='[email protected]/thirdwitch'> <x xmlns='http://jabber.org/protocol/muc'/></presence>
<presence from='[email protected]/firstwitch' id='3DCB0401-D7CF-4E31-BE05-EDF8D057BFBD' to='[email protected]/pda'> <x xmlns='http://jabber.org/protocol/muc#user'> <item affiliation='owner' role='moderator'/> </x></presence>
<presence from='[email protected]/secondwitch' id='C2CD9EE3-8421-431E-854A-A2AD0CE2E23D' to='[email protected]/pda'> <x xmlns='http://jabber.org/protocol/muc#user'> <item affiliation='admin' role='moderator'/> </x></presence>
Saturday, October 6, 2012
![Page 40: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/40.jpg)
AG ProjectsSIP Infrastructure Experts
Conferencias con XMPP<iq from='[email protected]/orchard' id='zid615d9' to='[email protected]/balcony' type='set'> <conference-info xmlns="urn:ietf:params:xml:ns:conference-info" entity="xmpp:[email protected]/orchard" state="full" version="1">
<!-- CONFERENCE INFO --> <conference-description> <subject>Ending a relationship</subject> </conference-description>
<!-- CONFERENCE STATE --> <conference-state> <user-count>3</user-count> </conference-state>
<!-- USERS --> <users> <user entity="xmpp:[email protected]" state="full"> <display-text>Romeo</display-text>
<!-- ENDPOINTS --> <endpoint entity="xmpp:[email protected]/orchard"> <display-text>Romeo's smartphone</display-text> <status>disconnected</status> ...
Saturday, October 6, 2012
![Page 41: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/41.jpg)
Construyendo un Gateway
Saturday, October 6, 2012
![Page 42: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/42.jpg)
AG ProjectsSIP Infrastructure Experts
Estado del Arte
• SIP utilizado para audio, video, conferencias y emular la PSTN
• XMPP utilizado para mensajería, presencia y Google Hangouts
• Ambos protocolos funcionarán en los navegadores
• WebSocket + WebRTC
Saturday, October 6, 2012
![Page 43: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/43.jpg)
AG ProjectsSIP Infrastructure Experts
SIP y XMPP: ¿qué tienen en común?
• Misma tecnología para audio y video - RTP
• Misma tecnolgía de NAT traversal - ICE
• Payloads compatibles - CPIM
• Mecanismo PUBLISH - SUBSCRIBE
• usuario@dominio
Saturday, October 6, 2012
![Page 44: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/44.jpg)
AG ProjectsSIP Infrastructure Experts
Combinando SIP y XMPP
• Clientes dual stack
• CUSAX: draft-ivov-xmpp-cusax
• Clientes single stack
• Usar un gateway
• Un gateway transparente
Saturday, October 6, 2012
![Page 45: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/45.jpg)
AG ProjectsSIP Infrastructure Experts
Un solo stack
• SIP y XMPP fueron diseñados de manera distinta, abstraernos de ellos puede traer problemas
• Menos código, menos bugs
• Configuración más simple
Saturday, October 6, 2012
![Page 46: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/46.jpg)
AG ProjectsSIP Infrastructure Experts
SIP SIMPLE Client SDK
Saturday, October 6, 2012
![Page 47: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/47.jpg)
AG ProjectsSIP Infrastructure Experts
Blink
Saturday, October 6, 2012
![Page 48: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/48.jpg)
AG ProjectsSIP Infrastructure Experts
SylkServer
SylkServer
SIP Networks XMPP Networks
ConferencingHigh Definition Audio
Instant MessagingFile Transfer
Presence
Saturday, October 6, 2012
![Page 49: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/49.jpg)
AG ProjectsSIP Infrastructure Experts
SylkServer
• SIP Application Server
• Software Libre
• ZeroConf
• Implementado utilizando SIP SIMPLE Client SDK
Saturday, October 6, 2012
![Page 50: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/50.jpg)
AG ProjectsSIP Infrastructure Experts
SylkServer: Arquitectura
Saturday, October 6, 2012
![Page 51: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/51.jpg)
AG ProjectsSIP Infrastructure Experts
SylkServer: Conferencias
• Audio en HD
• Chat con MSRP
• Información de participantes (RFC 4575)
• Control de conferencias (RFC 4579)
• draft-ietf-simple-chat
• Transferencia de ficheros
• Compartir escritorio
Saturday, October 6, 2012
![Page 52: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/52.jpg)
AG ProjectsSIP Infrastructure Experts
SylkServer: gateway XMPP
• Mensajería Instantánea
• SIP MESSAGE
• MSRP
• Presencia
• MUC
• Jingle
• Transferencia de ficheros
• CoinSaturday, October 6, 2012
![Page 53: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/53.jpg)
AG ProjectsSIP Infrastructure Experts
Diseño del gateway XMPP
• SylkServer es el servidor XMPP autoritativo del dominio
• Sólo soporta conexiones S2S
• Los clientes del dominio local usan SIP
• Routing en base a usuario@dominio (DNS SRV)
Saturday, October 6, 2012
![Page 54: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/54.jpg)
AG ProjectsSIP Infrastructure Experts
Arquitectura del gateway XMPP
• El servidor no hace AAA
• Despliegue detrás de un proxy SIP
• Conexiones XMPP S2S con otros dominios
• Una única opción de configuración necesaria como mínimo: el dominio
Saturday, October 6, 2012
![Page 55: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/55.jpg)
AG ProjectsSIP Infrastructure Experts
Arquitectura del gateway XMPP
Saturday, October 6, 2012
![Page 56: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/56.jpg)
AG ProjectsSIP Infrastructure Experts
Gateway XMPP: IM
Saturday, October 6, 2012
![Page 57: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/57.jpg)
AG ProjectsSIP Infrastructure Experts
Gateway XMPP: Presencia
Saturday, October 6, 2012
![Page 58: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/58.jpg)
AG ProjectsSIP Infrastructure Experts
Retos en la implementación
• Servidor XMPP vs Componente XMPP
• Especificaciones incompletas / obsoletas
• Diferencia de conceptos
• ¿Sesiones XMPP?
• SIP PIDF vs Presencia en XMPP
• Conferencias en SIP vs XMPP MUC
• Jingle y Gingle
Saturday, October 6, 2012
![Page 59: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/59.jpg)
AG ProjectsSIP Infrastructure Experts
Futuro
• La IETF está considerando resucitar los drafts de interoperabilidad SIP - XMPP
• Nuestro roadmap
• Jingle y Gingle
• Transferencia de ficheros
Saturday, October 6, 2012
![Page 60: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/60.jpg)
Desplegando infraestructura SIP
Saturday, October 6, 2012
![Page 61: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/61.jpg)
AG ProjectsSIP Infrastructure Experts
Problemas habituales
• NAT
• Tamaño de los paquetes SIP
• Escalabilidad
• Entornos hostiles a nivel de networking
Saturday, October 6, 2012
![Page 62: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/62.jpg)
AG ProjectsSIP Infrastructure Experts
NAT
• Fácilmente solucionable en el servidor reescribiendo el SDP
• Pero rompe ICE
• OpenSIPS + MediaProxy
• Primera y única solución ICE-friendly
Saturday, October 6, 2012
![Page 63: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/63.jpg)
AG ProjectsSIP Infrastructure Experts
Soporte ICE en MediaProxy
Saturday, October 6, 2012
![Page 64: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/64.jpg)
AG ProjectsSIP Infrastructure Experts
NAT y MSRP
• Uso de relays: MSRPRelay
• Alternative Connection Model (RFC 6135)
• Implementado en SIP SIMPLE SDK
Saturday, October 6, 2012
![Page 65: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/65.jpg)
AG ProjectsSIP Infrastructure Experts
Tamaño de los paquetes SIP
• ¡Cada vez son más grandes!
• Necesidad de un transporte fiable: TCP
• ¿Es TCP el transporte correcto?
• Facebook Messenger usa MQTT
• Si hay SIP ALGs: TLS
• Para que no husmeen
Saturday, October 6, 2012
![Page 66: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/66.jpg)
AG ProjectsSIP Infrastructure Experts
Escalabilidad
• ¿Quién balancea la carga del balanceador?
• Red distribuída de servidores: DHT
• Ejemplo: SIP2SIP.info usa SIPThor
Saturday, October 6, 2012
![Page 67: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/67.jpg)
AG ProjectsSIP Infrastructure Experts
SIP + DHT
Saturday, October 6, 2012
![Page 68: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/68.jpg)
AG ProjectsSIP Infrastructure Experts
Entornos hostiles a nivel de netwoking
• “Internet funciona perfectamente. En el puerto 80.”
• SIP sobre TLS, en otro puerto
• RTP vía TURN / TCP
• RTP multiplexing
• WebRTC
Saturday, October 6, 2012
![Page 69: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/69.jpg)
AG ProjectsSIP Infrastructure Experts
Saturday, October 6, 2012
![Page 70: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/70.jpg)
AG ProjectsSIP Infrastructure Experts
BYE sip:audience@tid SIP/2.0Via: SIP/2.0/UDP 192.168.99.23:49919;rport;branch=z9hG4bKPjDb30Dx0sH7aMMax-Forwards: 70From: "saghul" <sip:[email protected]>;tag=UCpGKVZbQQx7BUKTo: <sip:audience@tid>;tag=as59aef35cCall-ID: DEWDfu63OACwYeQk7MrhmRhRq.1cqqisCSeq: 10633 BYERoute: <sip:81.23.228.129;lr;ftag=UCpGKVZbQQx7BUKY;did=641.a8a9c553>User-Agent: BlinkContent-Length: 0
@saghul
Saturday, October 6, 2012
![Page 71: SIP y XMPP: amigos para siempre](https://reader031.vdocuments.mx/reader031/viewer/2022020105/555a22e5d8b42a900d8b461d/html5/thumbnails/71.jpg)
AG ProjectsSIP Infrastructure Experts
Apéndice: enlaces de interés
• http://sipsimpleclient.com/
• http://sylkserver.com/
• http://icanblink.com/
• http://sylkserver.ag-projects.com/projects/sylkserver/wiki/DesignXMPP
Saturday, October 6, 2012