[SR-Users] MS Teams SBC
Victor Velo
victor.velo at yahoo.ca
Sun May 9 04:47:30 CEST 2021
Hello,
I'm trying to test a Henning's tutorial for Teams SBC described here: https://skalatan.de/en/blog/kamailio-sbc-teams.
A minor change at the MS Teams setup is just about the login. Now it requires MFA.The license I used is : Microsoft 365 developer subscriptions (E5).The domanin dv-sbc.openabrik.com is added + 1 user
PS> Connect-MicrosoftTeams (MFA)PS> New-CsOnlinePSTNGateway -Fqdn dev-sbc.openfabrik.com -SipSignalingPort 5061 -MaxConcurrentSessions 10 -ForwardCallHistory $true -Enabled $true
Everything seems to be OK at MS Teams side.
I'm using the Kamailio coming with Kazoo. Version 5.2.5[root at dev-sbc kamailio]# kamailio -versionversion: kamailio 5.2.5 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RESADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MBpoll method support: poll, epoll_lt, epoll_et, sigio_rt, select.id: unknown compiled on 01:14:59 Nov 19 2019 with gcc 7.3.1
When Kamailio is probing MS Teams, the log shows the following errors (for the 3 GW):
hG4bKc188.6a606040000000000000000000000000.0#015#012To: <sip:sip2.pstnhub.microsoft.com;transport=tls>#015#012From: <sip:dev-sbc.openfabrik.com>;tag=d9a52ca041d9e6253dd2a7d5399056e3-2f56#015#012CSeq: 10 OPTIONS#015#012Call-ID: 4ed99b8a73a96dcd-10234 at 155.138.140.233#015#012Max-Forwards: 70#015#012Content-Length: 0May 9 01:26:17 dev-sbc kamailio[10234]: ERROR: <core> [core/tcp_main.c:618]: _wbufq_add(): (517 bytes): write queue full or timeout (0, total 1100374016, last write 41683154 s ago)May 9 01:26:17 dev-sbc kamailio[10234]: ERROR: <core> [core/tcp_main.c:2673]: tcpconn_1st_send(): 52.114.76.76:5061: EAGAIN and write queue full or failed for 0x7fce434db860May 9 01:26:17 dev-sbc kamailio[10234]: ERROR: tm [../../core/forward.h:293]: msg_send_buffer(): tcp_send failedMay 9 01:26:17 dev-sbc kamailio[10234]: ERROR: tm [uac.c:648]: send_prepared_request_impl(): Attempt to send to precreated request failedMay 9 01:26:17 dev-sbc kamailio[10234]: INFO: <script>: Sent out tm request to Teams: OPTIONS sip:sip.pstnhub.microsoft.com;transport=tls SIP/2.0#015#012Via: SIP/2.0/TLS 155.138.140.233:5061;branc
config:
tls.cfg
[server:default]method = TLSv1.2+verify_certificate = yesrequire_certificate = yesprivate_key = /etc/letsencrypt/live/openfabrik.com/privkey.pemcertificate = /etc/letsencrypt/live/openfabrik.com/fullchain.pemca_list = /etc/letsencrypt/live/openfabrik.com/bc2025.pemserver_name = dev-sbc.openfabrik.com
[client:default]method = TLSv1.2+verify_certificate = yesrequire_certificate = yesprivate_key = /etc/letsencrypt/live/openfabrik.com/privkey.pemcertificate = /etc/letsencrypt/live/openfabrik.com/fullchain.pemca_list = /etc/letsencrypt/live/openfabrik.com/bc2025.pem
====
event_route[tm:local-request]{ setflag(FLAG_LOCAL_REQUEST);
if(is_method("OPTIONS") && $ru =~ "pstnhub.microsoft.com") { append_hf("Contact: <sip:dev-sbc.openfabrik.com:5061;transport=tls>\r\n"); xlog("L_INFO", "Sent out tm request to Teams: $mb\n"); }
xlog("L_DEBUG", "$ci|local|start $pr request $rm $ou\n"); xlog("L_DEBUG", "$ci|local|source $si:$sp -> $dd:$dp\n"); xlog("L_DEBUG", "$ci|local|from $fu\n"); xlog("L_DEBUG", "$ci|local|to $tu\n");
#!ifdef SIP_TRACE_ROLE route(SIP_TRACE); #!endif
#!ifdef PRESENCE_ROLE route(PRESENCE_LOCAL_REQUEST); #!endif
}
====# setid(integer) destination(sip uri) flags (integer, optional), priority(int,opt), attrs (str,optional)kamctl dispatcher add 2 'sip:sip.pstnhub.microsoft.com;transport=tls' 0 3 'socket=tls:155.138.140.233:5061;ping_from=sip:dev-sbc.openfabrik.com'kamctl dispatcher add 3 'sip:sip2.pstnhub.microsoft.com;transport=tls' 0 2 'socket=tls:155.138.140.233:5061;ping_from=sip:dev-sbc.openfabrik.com'kamctl dispatcher add 4 'sip:sip3.pstnhub.microsoft.com;transport=tls' 0 1 'socket=tls:155.138.140.233:5061;ping_from=sip:dev-sbc.openfabrik.com'
[root at dev-sbc kamailio]# kamctl dispatcher showdispatcher gatewayssqlite_query: /usr/bin/sqlite3 /etc/kazoo/kamailio/db/kazoo.db select * FROM dispatcher ORDER BY setid; 1|1|sip:155.138.140.233:11000|9|0|zone=local;profile=sipinterface_1;duid=243;node=freeswitch at dev-sbc.openfabrik.com|added by nodes role2|2|sip:sip.pstnhub.microsoft.com;transport=tls|0|3|socket=tls:155.138.140.233:5061;ping_from=sip:dev-sbc.openfabrik.com|3|3|sip:sip2.pstnhub.microsoft.com;transport=tls|0|2|socket=tls:155.138.140.233:5061;ping_from=sip:dev-sbc.openfabrik.com|4|4|sip:sip3.pstnhub.microsoft.com;transport=tls|0|1|socket=tls:155.138.140.233:5061;ping_from=sip:dev-sbc.openfabrik.com|
Is it a bug on the Kamailio 5.2.5 release or Do I miss something?
Thanks,
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210509/65cdf088/attachment.htm>
More information about the sr-users
mailing list