Dear List
Hope this email finds you all well.
I have followed the below tutorial on how to integrate Kamailio with MS
Teams
https://skalatan.de/en/blog/kamailio-sbc-teams
However i have been facing an issue with MS Teams with direct routing where
MS Teams does not send back an ACK after a 200 OK.
The current inbound call flow is the following:
*MS Teams ==> Kamailio==>Asterisk*
Once Asterisk answers with 200 OK we send this 200 OK back to MS Teams
however, MS Teams just doesn't answer back with ACK and call drops.
The below trace shows the INVITE coming from MS Teams and the 200 OK we
send back.
||||||||||||||||||||
====================
tag: rcv
pid: 26135
process: 23
time: 1613025911.983278
date: Thu Feb 11 08:45:11 2021
proto: tls ipv4
srcip: 52.114.132.46
srcport: 4352
dstip: SBC_IP_ADDR
dstport: 5061
~~~~~~~~~~~~~~~~~~~~
INVITE sip:+357XXXXXXXX@SBC-FQDN:5061;user=phone;transport=tls SIP/2.0
FROM: Phillip Kyriacou<sip:+357XXXXXXXX@sip.pstnhub.microsoft.com:5061
;user=phone>;tag=c3da9477e05d45fca31c24a155af3318
TO: <sip:+357XXXXXXXX@SBC-FQDN:5061;user=phone>
CSEQ: 1 INVITE
CALL-ID: 9cb9a2f3144e594c87bccda76791c28e
MAX-FORWARDS: 70
VIA: SIP/2.0/TLS 52.114.132.46:5061;branch=z9hG4bK0cf2c45
RECORD-ROUTE: <sip:sip-du-a-us.pstnhub.microsoft.com:5061;transport=tls;lr>
CONTACT: <sip:api-du-b-euwe.pstnhub.microsoft.com:443
;x-i=6e5254d9-79c2-4657-b54b-68791aa8e81f;x-c=9cb9a2f3144e594c87bccda76791c28e/d/10/e21a
6ff7125e4cbd91e75ec687fd4c5d>
CONTENT-LENGTH: 1097
MIN-SE: 300
SUPPORTED: timer
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2021.2.9.1 i.USEA.7
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
SESSION-EXPIRES: 3600
v=0
o=- 170239 0 IN IP4 127.0.0.1
s=session
c=IN IP4 52.113.40.94
b=CT:10000000
t=0 0
m=audio 51414 RTP/SAVP 104 9 103 111 18 0 8 97 101 13 118
c=IN IP4 52.113.40.94
a=rtcp:51415
a=ice-ufrag:BwFs
a=ice-pwd:sFyvnfQ9iH101E80ZKjCxi9+
a=rtcp-mux
a=candidate:1 1 UDP 2130706431 52.113.40.94 51414 typ srflx raddr
10.0.137.19 rport 51414
a=candidate:1 2 UDP 2130705918 52.113.40.94 51415 typ srflx raddr
10.0.137.19 rport 51415
a=candidate:2 1 tcp-act 2121006078 52.113.40.94 49152 typ srflx raddr
10.0.137.19 rport 49152
a=candidate:2 2 tcp-act 2121006078 52.113.40.94 49152 typ srflx raddr
10.0.137.19 rport 49152
a=label:main-audio
a=mid:1
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:Igc2LVM9FH5kQtkRpHw99H5SB7Rd7eKzJy4gdWJg|2^31
a=sendrecv
a=rtpmap:104 SILK/16000
a=rtpmap:9 G722/8000
a=rtpmap:103 SILK/8000
a=rtpmap:111 SIREN/16000
a=fmtp:111 bitrate=16000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:97 RED/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=rtpmap:118 CN/16000
a=ptime:20
||||||||||||||||||||
====================
tag: snd
pid: 26086
process: 6
time: 1613025917.726664
date: Thu Feb 11 08:45:17 2021
proto: tls ipv4
srcip: SBC_IP_ADDR
srcport: 5061
dstip: 52.114.132.46
dstport: 5061
~~~~~~~~~~~~~~~~~~~~
SIP/2.0 200 OK
Via: SIP/2.0/TLS 52.114.132.46:5061;branch=z9hG4bK0cf2c45
Record-Route:
<sip:SBC-IP-ADDR:5060;ftag=c3da9477e05d45fca31c24a155af3318;lr=on>
Record-Route:
<sip:SBC-FQDN:5061;transport=tls;ftag=c3da9477e05d45fca31c24a155af3318;lr=on>
Record-Route: <sip:sip-du-a-us.pstnhub.microsoft.com:5061;transport=tls;lr>
From: Phillip Kyriacou<sip:+357XXXXXXX@sip.pstnhub.microsoft.com:5061
;user=phone>;tag=c3da9477e05d45fca31c24a155af3318
To: <sip:+357XXXXXXXX@SBC-FQDN:5061;user=phone>;tag=as659924a4
Call-ID: 9cb9a2f3144e594c87bccda76791c28e
CSeq: 1 INVITE
Server: MediaGW V1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:357XXXXXXXX@ASTERISK_PUBLIC_IP:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 339
v=0
o=root 411266324 411266324 IN IP4 ASTERISK_PUBLIC_IP
s=ASTERISK
c=IN IP4 ASTERISK_PUBLIC_IP
t=0 0
m=audio 14416 RTP/SAVP 0 8 101
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:9PcaAGjbemJKTERlFTcVwmLRQoDSEQPxX0L1a6RF
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
||||||||||||||||||||
Am I doing anything wrong here that MS Teams wont respond to my 200 OK? The
Kamailio SBC is showing active on MS Teams and Kamailio dispatcher shows
all the MS Team hubs as AP. I also can't see any errors in the log file
My TLS cfg has the following:
======================
*[server:default]method = TLSv1.2+verify_certificate =
yesrequire_certificate = yesprivate_key =
/etc/letsencrypt/live/sbc.intelligentsupport.eu/privkey.pem
<http://sbc.intelligentsupport.eu/privkey.pem>certificate =
/etc/letsencrypt/live/sbc.intelligentsupport.eu/fullchain.pem
<http://sbc.intelligentsupport.eu/fullchain.pem>ca_list =
/etc/ssl/certs/ca-certificates.crt*
*[client:default]method = TLSv1.2+verify_certificate =
yesrequire_certificate = yesprivate_key =
/etc/letsencrypt/live/sbc.intelligentsupport.eu/privkey.pem
<http://sbc.intelligentsupport.eu/privkey.pem>certificate =
/etc/letsencrypt/live/sbc.intelligentsupport.eu/fullchain.pem
<http://sbc.intelligentsupport.eu/fullchain.pem>ca_list =
/etc/ssl/certs/ca-certificates.crt*
Thanks very much in advance!
Phillip
Hello all,
Is it possible to know the elapsed time since the previously received
message?
On outgoing calls, I.e: when i get a 180, how long did the 100 arrived? Or
the INVITE...
Thanks
David
--
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hi
I have setup failover on Kamailio 5.1 using Dispatcher module as below. On a round robin algorithm, INVITEs are being sent to BOTH healthy and faulty GW. When an INVITE is being sent to the faulty GW, a re-transmission will be sent after "t_set_fr" time to the healthy GW and calls are completed successfully.
I was wondering if I can setup the health check correctly so the faulty IP GW can be out of round robin till the health check pass it again, i.e. no INVITE is being sent to the faulty GW as long as the health check not pass it.
Your help is greatly appreciated,
AL
# dispatcher.list
1 sip:X.X.X.X:5060 0 0
1 sip:Y.Y.Y.Y:5060 0 0
# ----- dispatcher params -----
modparam("dispatcher", "list_file", "/usr/local/etc/kamailio/dispatcher.list")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "ds_ping_interval", 10)
modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=3;class=4")
modparam("dispatcher", "ds_ping_interval", 5)
modparam("dispatcher", "ds_probing_threshold", 1)
# Dispatch requests
route[DISPATCH] {
if(!ds_select_dst("1", "4")) {
send_reply("503", "No destination");
exit;
}
t_on_failure("DISPATCH_FAILOVER");
t_set_fr(0,1000);
route(RELAY);
exit;
}
# Failure Route
failure_route[DISPATCH_FAILOVER]{
if (t_is_canceled()) exit;
if(!ds_next_dst()) {
send_reply("503", "Out of gateways");
exit;
}
t_on_failure("DISPATCH_FAILOVER");
t_relay();
}
https://www.kamailio.org/docs/modules/stable/modules/http_async_client says
$http_rr will be the HTTP reason phrase. I'm understanding this to mean:
Code: Reason:
200 OK
404 Not Found
In my current 5.4 build, $http_rr returns empty (not <null> or anything else)
regardless of what the server sends in the headers.
Am I misunderstanding this? I'm writing an API and was hoping to do
send_reply("$http_rs", "$http_rr");
--
Anthony - https://messinet.com
F9B6 560E 68EA 037D 8C3D D1C9 FF31 3BDB D9D8 99B6
Hello,
When receiving a reply, there's a logic which if true, i must cancel the
outgoing invite (can 480 the origination). I tried using something like
t_set_fr(10,10);
to have kamailio cancel it immediately, but it's not happening.
Is there a way to cancel an INVITE/transaction?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hello everybody!
i am trying a setup of kamailio like sbc for ms teams,
I currently have the following scenario:
TLS Connection OK
Out Call ok (except BYE 481 on reply)
my problem is in incoming calls
microsoft only supports srtp
and my pbx (freeswitch based) only works with rtp,
now i was reading that you need to use rtpengine to manage srtp to rtp,
unfortunately it seems that rtpengine has become very difficult to build
especially with recent os,
I was wondering if it is possible to have an alternative to rtpengine for
managing the srtp (rtpproxy does not seem to work)
has anyone managed to get a working setup?
in case it is possible to send a configuration template?
Thanks You !!!
Davide