Google utiliza OpenSIPS y YATE en Google Voice

A ver si al final va Google y permite usar SIP con Google Voice… aunque sea con números de teléfono.

Resulta que si sabemos el número de GV de un usuario le podemos ayer le podíamos llamar de manera gratuita por SIP de la siguiente manera:

sip:+14049397606@sip.voice.google.com (el de ejemplo es mi número)

Al comprobar que esto era cierto, lo primero que se me ocurrió fue hacer una consulta DNS y ver si tenían registros DNS SRV:

saghul@hal:~$ dig srv _sip._udp.sip.voice.google.com

; <<>> DiG 9.7.2-P3 <<>> srv _sip._udp.sip.voice.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45638
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 13, ADDITIONAL: 0

;; QUESTION SECTION:
;_sip._udp.sip.voice.google.com.        IN      SRV

;; ANSWER SECTION:
_sip._udp.sip.voice.google.com. 82958 IN SRV    40 1 5060 alt3.voice-sip.l.google.com.
_sip._udp.sip.voice.google.com. 82958 IN SRV    50 1 5060 alt4.voice-sip.l.google.com.
_sip._udp.sip.voice.google.com. 82958 IN SRV    10 1 5060 voice-sip.l.google.com.
_sip._udp.sip.voice.google.com. 82958 IN SRV    20 1 5060 alt1.voice-sip.l.google.com.
_sip._udp.sip.voice.google.com. 82958 IN SRV    30 1 5060 alt2.voice-sip.l.google.com.

;; AUTHORITY SECTION:
com.                    83093   IN      NS      d.gtld-servers.net.
com.                    83093   IN      NS      i.gtld-servers.net.
com.                    83093   IN      NS      c.gtld-servers.net.
com.                    83093   IN      NS      a.gtld-servers.net.
com.                    83093   IN      NS      j.gtld-servers.net.
com.                    83093   IN      NS      e.gtld-servers.net.
com.                    83093   IN      NS      k.gtld-servers.net.
com.                    83093   IN      NS      m.gtld-servers.net.
com.                    83093   IN      NS      l.gtld-servers.net.
com.                    83093   IN      NS      b.gtld-servers.net.
com.                    83093   IN      NS      h.gtld-servers.net.
com.                    83093   IN      NS      f.gtld-servers.net.
com.                    83093   IN      NS      g.gtld-servers.net.

;; Query time: 0 msec
;; SERVER: 192.168.99.116#53(192.168.99.116)
;; WHEN: Mon Mar  7 22:45:44 2011
;; MSG SIZE  rcvd: 502

Parece que si, ¡bien! Ahora probemos a mandarle un OPTIONS:

saghul@hal:~$ sipsak -vvv -s sip:test@sip.voice.google.com
No SRV record: _sip._tcp.sip.voice.google.com
using SRV record: _sip._udp.sip.voice.google.com:5060
fqdnhostname: 192.168.99.53
warning: need raw socket (root privileges) to receive all ICMP errors
our Via-Line: Via: SIP/2.0/UDP 192.168.99.53:53335;branch=z9hG4bK.40128570;rport;alias

New message with Via-Line:
OPTIONS sip:test@sip.voice.google.com SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:53335;branch=z9hG4bK.40128570;rport;alias
From: sip:sipsak@192.168.99.53:53335;tag=626043f9
To: sip:test@sip.voice.google.com
Call-ID: 1650476025@192.168.99.53
CSeq: 1 OPTIONS
Contact: sip:sipsak@192.168.99.53:53335
Content-Length: 0
Max-Forwards: 70
User-Agent: sipsak 0.9.6
Accept: text/plain

request:
OPTIONS sip:test@sip.voice.google.com SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:53335;branch=z9hG4bK.40128570;rport;alias
From: sip:sipsak@192.168.99.53:53335;tag=626043f9
To: sip:test@sip.voice.google.com
Call-ID: 1650476025@192.168.99.53
CSeq: 1 OPTIONS
Contact: sip:sipsak@192.168.99.53:53335
Content-Length: 0
Max-Forwards: 70
User-Agent: sipsak 0.9.6
Accept: text/plain

send to: UDP:74.125.95.192:5060

message received
received from: UDP:74.125.95.192:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.99.53:53335;branch=z9hG4bK.40128570;rport=64017;alias;received=62.131.6.55
From: sip:sipsak@192.168.99.53:53335;tag=626043f9
To: sip:test@sip.voice.google.com;tag=b6af3ec14a5583bc5e0a35f4053f902f.d201
Call-ID: 1650476025@192.168.99.53
CSeq: 1 OPTIONS
Server: OpenSIPS (1.6.2-notls (x86_64/linux))
Content-Length: 0

Ey, ¡si nos ha contestado un OpenSIPS! Esto pinta bien, vamos a probar un INVITE:

INVITE sip:+14049397606@sip.voice.google.com SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:39101;rport;branch=z9hG4bKPjuwdK-wRVFy7dsJD4xYtZSpD4vIKEcKRC
Max-Forwards: 70
From: "Saúl" ;tag=9rNjdJVXH-y-5I8i1pzaTQ2lJnH83ktq
To: 
Contact: 
Call-ID: xvpzBMnseFltW2KzzbBAO4DX-ILHionW
CSeq: 15643 INVITE
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: 100rel, norefersub
User-Agent: sipsimple 0.17.1
Content-Type: application/sdp
Content-Length:   281

v=0
o=- 3508522483 3508522483 IN IP4 192.168.99.53
s=sipsimple 0.17.1
c=IN IP4 192.168.99.53
t=0 0
m=audio 50026 RTP/AVP 9 8 0 101
a=rtcp:50027
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

--

2011-03-07 22:34:43.943855: RECEIVED: Packet 2, +0:00:00.150306
74.125.95.192:5060 -(SIP over UDP)-> 192.168.99.53:39101
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 192.168.99.53:39101;rport=61928;branch=z9hG4bKPjuwdK-wRVFy7dsJD4xYtZSpD4vIKEcKRC;received=62.131.6.55
From: "Saúl" ;tag=9rNjdJVXH-y-5I8i1pzaTQ2lJnH83ktq
To: 
Call-ID: xvpzBMnseFltW2KzzbBAO4DX-ILHionW
CSeq: 15643 INVITE
Server: OpenSIPS (1.6.2-notls (x86_64/linux))
Content-Length: 0

--

2011-03-07 22:34:44.004037: RECEIVED: Packet 3, +0:00:00.210488
74.125.95.192:5060 -(SIP over UDP)-> 192.168.99.53:39101
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.99.53:39101;received=62.131.6.55;rport=61928;branch=z9hG4bKPjuwdK-wRVFy7dsJD4xYtZSpD4vIKEcKRC
Record-Route: 
From: "Saúl" ;tag=9rNjdJVXH-y-5I8i1pzaTQ2lJnH83ktq
To: ;tag=1537395514
Call-ID: xvpzBMnseFltW2KzzbBAO4DX-ILHionW
CSeq: 15643 INVITE
Server: YATE/3.0.0
Contact: 
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Type: application/sdp
Content-Length: 183

v=0
o=yate 1299533672 1299533672 IN IP4 74.125.94.83
s=SIP Call
c=IN IP4 74.125.94.83
t=0 0
m=audio 65392 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000

--
2011-03-07 22:34:44.004432: SENDING: Packet 4, +0:00:00.210883
192.168.99.53:39101 -(SIP over UDP)-> 74.125.95.192:5060
ACK sip:+14049397606@10.13.154.2:7654 SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:39101;rport;branch=z9hG4bKPj8Cj2D-inZu80ylX.FAmnAxfo3-NkXkVv
Max-Forwards: 70
From: "Saúl" ;tag=9rNjdJVXH-y-5I8i1pzaTQ2lJnH83ktq
To: ;tag=1537395514
Call-ID: xvpzBMnseFltW2KzzbBAO4DX-ILHionW
CSeq: 15643 ACK
Route: 
User-Agent: sipsimple 0.17.1
Content-Length:  0

Nos ha contestado un YATE, interesante… ¿y si el usuario no existe?

INVITE sip:test@sip.voice.google.com SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:39101;rport;branch=z9hG4bKPjbIhDd.7vIzCwrZggWb1vRZ1KXCGSo2xw
Max-Forwards: 70
From: "Saúl" ;tag=o-QeubGVq.yh3Q-WN9yipgfWGOaexiPT
To: 
Contact: 
Call-ID: .O6U-GGy0TcQuD5fpM47wsiJXRiC0IN.
CSeq: 25827 INVITE
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: 100rel, norefersub
User-Agent: sipsimple 0.17.1
Content-Type: application/sdp
Content-Length:   281

v=0
o=- 3508523286 3508523286 IN IP4 192.168.99.53
s=sipsimple 0.17.1
c=IN IP4 192.168.99.53
t=0 0
m=audio 50028 RTP/AVP 9 8 0 101
a=rtcp:50029
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

--

2011-03-07 22:48:06.431428: RECEIVED: Packet 8, +0:13:22.637879
74.125.95.192:5060 -(SIP over UDP)-> 192.168.99.53:39101
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.99.53:39101;rport=64041;branch=z9hG4bKPjbIhDd.7vIzCwrZggWb1vRZ1KXCGSo2xw;received=62.131.6.55
From: "Saúl" ;tag=o-QeubGVq.yh3Q-WN9yipgfWGOaexiPT
To: ;tag=b6af3ec14a5583bc5e0a35f4053f902f.2904
Call-ID: .O6U-GGy0TcQuD5fpM47wsiJXRiC0IN.
CSeq: 25827 INVITE
Server: OpenSIPS (1.6.2-notls (x86_64/linux))
Content-Length: 0

--

2011-03-07 22:48:06.431510: SENDING: Packet 9, +0:13:22.637961
192.168.99.53:39101 -(SIP over UDP)-> 74.125.95.192:5060
ACK sip:test@sip.voice.google.com SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:39101;rport;branch=z9hG4bKPjbIhDd.7vIzCwrZggWb1vRZ1KXCGSo2xw
Max-Forwards: 70
From: "Saúl" ;tag=o-QeubGVq.yh3Q-WN9yipgfWGOaexiPT
To: ;tag=b6af3ec14a5583bc5e0a35f4053f902f.2904
Call-ID: .O6U-GGy0TcQuD5fpM47wsiJXRiC0IN.
CSeq: 25827 ACK
User-Agent: sipsimple 0.17.1
Content-Length:  0

Vuelve a contestarnos OpenSIPS. Por lo que parece OpenSIPS balancea la carga de YATE.

Voy a tentar la suerte y mandar un MESSAGE:

2011-03-07 22:51:44.024234: SENDING: Packet 13, +0:00:06.016478
192.168.99.53:46854 -(SIP over UDP)-> 74.125.95.192:5060
MESSAGE sip:+14049397606@sip.voice.google.com SIP/2.0
Via: SIP/2.0/UDP 192.168.99.53:46854;rport;branch=z9hG4bKPjp8qvrhlbAINZHmHSl1P9s9QlDZqtKsVG
Max-Forwards: 70
From: "Saúl" ;tag=3SMMO5vwdhW4LOXNXFcfy4dOfiAkOvzo
To: 
Call-ID: vcMiSLdsP56mxb5rIY6os94QuCWJ12V-
CSeq: 23424 MESSAGE
User-Agent: sipsimple 0.17.1
Content-Type: text/plain
Content-Length:     4

test
--

Could not deliver MESSAGE: 404 Not Found
2011-03-07 22:51:44.170734: RECEIVED: Packet 14, +0:00:06.162978
74.125.95.192:5060 -(SIP over UDP)-> 192.168.99.53:46854
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.99.53:46854;rport=64109;branch=z9hG4bKPjp8qvrhlbAINZHmHSl1P9s9QlDZqtKsVG;received=62.131.6.55
From: "Saúl" ;tag=3SMMO5vwdhW4LOXNXFcfy4dOfiAkOvzo
To: ;tag=b6af3ec14a5583bc5e0a35f4053f902f.7ee2
Call-ID: vcMiSLdsP56mxb5rIY6os94QuCWJ12V-
CSeq: 23424 MESSAGE
Server: OpenSIPS (1.6.2-notls (x86_64/linux))
Content-Length: 0

Una pena, esto hubiera sido para nota. Aunque lo extraño es que no rechaza el MESSAGE, dice que el usuario no existe.

Veremos con qué nos sorprende Google, espero que sea algo decente por lo que vender lo poco de alma que me pueda quedar 😉

NOTA: Si intentáis probar esto hoy ya no funcionará, no se si ayer funcionaba por un descuido o no, pero hoy lo han deshabilitado 🙁

One thought on “Google utiliza OpenSIPS y YATE en Google Voice

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *