Hola David, muchas gracias por responder.

Voy a mirar ahí y/o pregunto ahí..

Gracias

El mié., 15 abr. 2020 a las 13:09, David Villasmil (<david.villasmil.work@gmail.com>) escribió:
Hola y bienvenido,

Aparentemente tienes que agregar un RR con un FQDN.

En la lista en inglés se ha hablado mucho de ese tema. Mira en los archives.

Un saludo

On Wed, 15 Apr 2020 at 10:23, sip user <sipuser404@gmail.com> wrote:
Hola buenos días... soy nuevo en esta lista y estaba empezzando a meterme con Kamailio, principalmente para configurarlo como SBC contra Teams, en este caso.

Pero no consigo que me funcione. Si lanzo una llamadas desde el Teams, en el Kamailio veo:

1.- En syslog:

Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [ip_addr.c:243]: print_ip(): tcpconn_new: new tcp connection: 52.114.7.24
Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [tcp_main.c:1073]: tcpconn_new(): tcpconn_new: on port 4160, type 3
Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [tcp_main.c:1382]: tcpconn_add(): tcpconn_add: hashes: 171:1857:1187, 30
Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [io_wait.h:388]: io_watch_add(): DBG: io_watch_add(0xa1f240, 23, 2, 0x7f90f2438f80), fd_no=17
Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [io_wait.h:610]: io_watch_del(): DBG: io_watch_del (0xa1f240, 23, -1, 0x0) fd_no=18 called
Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [tcp_main.c:4219]: handle_tcpconn_ev(): tcp: DBG: sending to child, events 1
Apr 15 11:11:41 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [tcp_main.c:3902]: send2child(): selected tcp worker 1 10(23159) for activity on [tls:SBC_IP:5061], 0x7f90f2438f80
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_read.c:1507]: handle_io(): received n=8 con=0x7f90f2438f80, fd=9
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: tls [tls_server.c:184]: tls_complete_init(): Using TLS domain TLSs<default>
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: tls [tls_domain.c:700]: sr_ssl_ctx_info_callback(): SSL handshake started
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_main.c:2516]: tcpconn_do_send(): tcp_send: sending...
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_main.c:2550]: tcpconn_do_send(): tcp_send: after real write: c= 0x7f90f2438f80 n=1468 fd=9
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_main.c:2551]: tcpconn_do_send(): tcp_send: buf=
Apr 15 11:11:41 vps793907 kamailio[23122]: #026#003#003
Apr 15 11:11:41 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [io_wait.h:388]: io_watch_add(): DBG: io_watch_add(0x9c1700, 9, 2, 0x7f90f2438f80), fd_no=1
Apr 15 11:11:42 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_read.c:296]: tcp_read_data(): EOF on 0x7f90f2438f80, FD 9
Apr 15 11:11:42 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_read.c:1291]: tcp_read_req(): tcp_read_req: EOF
Apr 15 11:11:42 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [io_wait.h:610]: io_watch_del(): DBG: io_watch_del (0x9c1700, 9, -1, 0x10) fd_no=2 called
Apr 15 11:11:42 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_read.c:1434]: release_tcpconn(): releasing con 0x7f90f2438f80, state -1, fd=9, id=30
Apr 15 11:11:42 vps793907 kamailio[23122]: 10(23159) DEBUG: <core> [tcp_read.c:1435]: release_tcpconn():  extra_data 0x7f90f2432b40
Apr 15 11:11:42 vps793907 kamailio[23122]: 13(23167) DEBUG: <core> [tcp_main.c:3331]: handle_tcp_child(): handle_tcp_child: reader response= 7f90f2438f80, -1 from 1
Apr 15 11:11:42 vps793907 kamailio[23122]: 13(23167) DEBUG: tls [tls_server.c:604]: tls_h_close(): Closing SSL connection 0x7f90f2432b40

2.- Con un TCPDUMP:

11:13:09.311797 IP SBC_IP .1024 > SBC_IP .eu.sip-tls: Flags [S], seq 261244614, win 64240, options [mss 1440,nop,wscale 8,nop,nop,sackOK], length 0
11:13:09.311898 IP  SBC_IP .eu.sip-tls > 52.114.76.76.1024: Flags [S.], seq 812357247, ack 261244615, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
11:13:09.340358 IP 52.114.76.76.1024 >  SBC_IP .eu.sip-tls: Flags [.], ack 1, win 2053, length 0
11:13:09.340560 IP 52.114.76.76.1024 > SBC_IP .eu.sip-tls: Flags [P.], seq 1:187, ack 1, win 2053, length 186
11:13:09.340578 IP SBC_IP .eu.sip-tls > 52.114.76.76.1024: Flags [.], ack 187, win 237, length 0
11:13:09.341361 IP SBC_IP .eu.sip-tls > 52.114.76.76.1024: Flags [P.], seq 1:1469, ack 187, win 237, length 1468
11:13:09.369606 IP 52.114.76.76.1024 > SBC_IP .eu.sip-tls: Flags [.], ack 1469, win 2053, length 0
11:13:12.451498 IP 52.114.7.24.1216 > SBC_IP .eu.sip-tls: Flags [S], seq 309084204, win 64240, options [mss 1440,nop,wscale 8,nop,nop,sackOK], length 0
11:13:12.451587 IP SBC_IP .eu.sip-tls > 52.114.7.24.1216: Flags [S.], seq 3275066862, ack 309084205, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
11:13:12.707119 IP 52.114.7.24.1216 > SBC_IP .eu.sip-tls: Flags [.], ack 1, win 2053, length 0
11:13:12.707311 IP 52.114.7.24.1216 > SBC_IP .eu.sip-tls: Flags [P.], seq 1:187, ack 1, win 2053, length 186
11:13:12.707345 IP SBC_IP .eu.sip-tls > 52.114.7.24.1216: Flags [.], ack 187, win 237, length 0
11:13:12.708273 IP SBC_IP .eu.sip-tls > 52.114.7.24.1216: Flags [P.], seq 1:1469, ack 187, win 237, length 1468
11:13:12.965101 IP 52.114.7.24.1216 > SBC_IP .eu.sip-tls: Flags [.], ack 1469, win 2053, length 0
11:13:12.965156 IP 52.114.7.24.1216 > SBC_IP .eu.sip-tls: Flags [F.], seq 187, ack 1469, win 2053, length 0
11:13:12.965688 IP SBC_IP .eu.sip-tls > 52.114.7.24.1216: Flags [F.], seq 1469, ack 188, win 237, length 0
11:13:13.220871 IP 52.114.7.24.1216 > SBC_IP .eu.sip-tls: Flags [.], ack 1470, win 2053, length 0

No consigo "recibir" nada.

Tengo generados los certificados y configurados en el tls.cfg del Kamailio:

[server:default]
method = TLSv1.2
verify_certificate = no
require_certificate = no
private_key = /etc/letsencrypt/ssl/cert.key
certificate = /etc/letsencrypt/ssl/cert.crt
ca_list = /etc/letsencrypt/ssl/ca.crt

Dentro del propio Kamailio tengo configurado para que devuelva un 200 KeepAlive al Teams cuando recibe un OPTIONS:

event_route[tm:local-request] {

        if(is_method("OPTIONS") && $ru =~ "pstnhub.microsoft.com") {
               append_hf("Contact: <sip: SBC_DNS :5061;transport=tls>\r\n");
        }
        xlog("L_INFO", "Sent out tm request: $mb\n");
}

Y he midificado el record_route por este nuevo:

record_route_preset(" SBC_DNS :5061;transport=tls", " SBC_IP :5061");

He creado una dispatcher.list:

# setid(integer) destination(sip uri) flags (integer, optional), priority(int,opt), attrs (str,optional)
1:1:sip:sip.pstnhub.microsoft.com;transport=tls 0 3 socket=tls: SBC_IP :5061;ping_from= sip:SBC_DNS
2:1:sip:sip2.pstnhub.microsoft.com;transport=tls 0 2 socket=tls: SBC_IP :5061;ping_from=sip: SBC_DNS
3:1:sip:sip3.pstnhub.microsoft.com;transport=tls 0 1 socket=tls: SBC_IP :5061;ping_from=sip: SBC_DNS
4:1:sip:sip-all.pstnhub.microsoft.com;transport=tls 0 1 socket=tls: SBC_IP :5061;ping_from=sip: SBC_DNS

Creo, que uno de los problemas es que no mando bien el OPTIONS hacia el Teams, ya que este en su panel, me indica que el SBC está INACTIVO.

No se si podrías ayudarme a enderezar un poco esto....

Muchas gracias por todo..

Un saludo
_______________________________________________
sr-users-es mailing list
sr-users-es@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users-es
--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337
_______________________________________________
sr-users-es mailing list
sr-users-es@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users-es