<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am not sure what you exactly try to achieve, but for the record-route parameter, I can provide two options for you.
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If you are not satisfied with the second record-route, you might remove (remove_hf();) "Record-Route" header before adding a new one via 'record_route_preset'.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
But I think it is like a workaround solution, for better way you can check whether you used "record_route();" or not before/after using ''record_route_preset''<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Egemen U.<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Gönderen:</b> sip user <sipuser404@gmail.com> adýna sr-users <sr-users-bounces@lists.kamailio.org><br>
<b>Gönderildi:</b> 11 Eylül 2020 Cuma 14:25<br>
<b>Kime:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Konu:</b> Re: [SR-Users] Kamailio drop calls with Teams</font>
<div> </div>
</div>
<div>
<div dir="auto">Any idea? Can i change that second récord router?
<div dir="auto"><br>
</div>
<div dir="auto">Thanks</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El lun., 7 sept. 2020 8:42, sip user <<a href="mailto:sipuser404@gmail.com">sipuser404@gmail.com</a>> escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div>Hi.... I've tried to add record_route_preset( "yourdomain.com:5061;transport=tls", "your_ip:5060" ) in incoming calls, call, from Teams to Asterisk, and with sipdump I see that:</div>
<div><br>
</div>
<div>INVITE:</div>
<div><br>
</div>
<div>tag: snd<br>
pid: 15506<br>
process: 10<br>
time: 1599460531.198988<br>
date: Mon Sep 7 06:35:31 2020<br>
proto: udp ipv4<br>
srcip: FQDN IP<br>
srcport: 5060<br>
dstip: IP ASTERISK<br>
dstport: 18060<br>
~~~~~~~~~~~~~~~~~~~~<br>
INVITE sip:s@IP ASTERISK:18060 SIP/2.0<br>
Record-Route: <sip:FQDN DNS:5061;transport=tls;lr><br>
Record-Route: <sip:FQDN IP:5060;lr><br>
FROM: AdminTeams<sip:+1099@sip.pstnhub.microsoft.com:5061;user=phone>;tag=295acf4c5acf4a3c8ae8f64dce4a9a05<br>
TO: <sip:+34590@FQDN DNS:5061;user=phone><br>
CSEQ: 1 INVITE<br>
CALL-ID: 901952e5fbc15d8ca107fd3c6e8f2edc<br>
MAX-FORWARDS: 69<br>
Via: SIP/2.0/UDP FQDN IP;branch=z9hG4bK4108.41910a703c892d309f8aaa6eee303e1c.0;i=1<br>
VIA: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKab9565a8<br>
RECORD-ROUTE: <sip:sip-du-a-eu.pstnhub.microsoft.com:5061;transport=tls;lr><br>
CONTACT: <sip:api-du-a-usea.pstnhub.microsoft.com:443;x-i=8ce77537-20fd-43b0-9a49-7c5b7fb7e198;x-c=901952e5fbc15d8ca107fd3c6e8f2edc/d/8/31abc1996a874f5a8133d653d07239f4><br>
CONTENT-LENGTH: 1102<br>
MIN-SE: 300<br>
SUPPORTED: timer<br>
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.9.1.3 i.EUWE.0<br>
CONTENT-TYPE: application/sdp<br>
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY<br>
P-ASSERTED-IDENTITY: <tel:+1099>,<sip:mail><br>
PRIVACY: id<br>
SESSION-EXPIRES: 3600</div>
<div><br>
</div>
<div>200 OK</div>
<div><br>
</div>
<div>tag: rcv<br>
pid: 15498<br>
process: 2<br>
time: 1599460531.207751<br>
date: Mon Sep 7 06:35:31 2020<br>
proto: udp ipv4<br>
srcip: IP ASTERISK<br>
srcport: 18060<br>
dstip: FQDN IP<br>
dstport: 5060<br>
~~~~~~~~~~~~~~~~~~~~<br>
SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP FQDNIP;branch=z9hG4bK4108.41910a703c892d309f8aaa6eee303e1c.0;i=1;received=92.222.217.64<br>
Via: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bKab9565a8<br>
Record-Route: <sip:FQDN DNS:5061;transport=tls;lr><br>
Record-Route: <sip:FQDN IP:5060;lr><br>
Record-Route: <sip:sip-du-a-eu.pstnhub.microsoft.com:5061;transport=tls;lr><br>
From: AdminTeams<sip:+1099@sip.pstnhub.microsoft.com:5061;user=phone>;tag=295acf4c5acf4a3c8ae8f64dce4a9a05<br>
To: <sip:+34590@FQDN DNS:5061;user=phone>;tag=as5e107437<br>
Call-ID: 901952e5fbc15d8ca107fd3c6e8f2edc<br>
CSeq: 1 INVITE<br>
Server: Asterisk PBX 11.25.3<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE<br>
Supported: replaces, timer<br>
Session-Expires: 1800;refresher=uas<br>
Contact: <sip:s@IP ASTERISK:18060><br>
Content-Type: application/sdp<br>
Require: timer<br>
Content-Length: 345</div>
<div><br>
</div>
<div>I rewrite the first record-route in both, INVITE and 200 OK, but the second record-route, is the FQDN IP again..</div>
<div>Could be it the problem?</div>
<div><br>
</div>
<div>How can I rewrite that record-route?</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El jue., 3 sept. 2020 a las 13:53, Pepelux (<<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">I don't know. Try to write the domain directly and not an alias:
<div><br>
</div>
<div>record_route_preset("yourdomain.com:5061;transport=tls", "your_ip:5060");<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, 3 Sep 2020 at 13:38, sip user <<a href="mailto:sipuser404@gmail.com" target="_blank" rel="noreferrer">sipuser404@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Yes, this is I do:</div>
<div><br>
</div>
<div>record_route();<br>
xlog("L_INFO", "***********ROUTE PSTN***********");<br>
$rU="1005";</div>
<div><br>
</div>
<div>Have I do any more? Why mu record-route is different yours?</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El jue., 3 sept. 2020 a las 13:27, Pepelux (<<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">You have to use record_route_preset when the message is sent from Kamailio to Teams
<div><br>
</div>
<div>if (from_uri =~ ".*<a href="http://microsoft.com" target="_blank" rel="noreferrer">microsoft.com</a>") { <br>
</div>
<div> record_route();<br>
</div>
<div>} else {</div>
<div> record_route_preset("SBC-DNS-DOMAIN:5061;transport=tls", "SBC-IP-ADDR:5060");<br>
</div>
<div>}</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, 3 Sep 2020 at 13:13, sip user <<a href="mailto:sipuser404@gmail.com" target="_blank" rel="noreferrer">sipuser404@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Thanks Pepelux..</div>
<div><br>
</div>
<div>Yes, I follow that post to configure it. But I don´t know where could be the problem and change Record-Route, because, in the post say, only I have to change it when I call from kamailio to Teams, so outgoing calls, right? With record-route-preset... I'm
wrong?</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El jue., 3 sept. 2020 a las 13:07, Pepelux (<<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>It looks good but in the capture file I saw FQNDIP in RR and not FQNDDNS<br>
<br>
</div>
<div>This post by Henning may help you: <a href="https://skalatan.de/en/blog/kamailio-sbc-teams" target="_blank" rel="noreferrer">https://skalatan.de/en/blog/kamailio-sbc-teams</a></div>
<div><br>
</div>
<div>And also you can read that:</div>
<div><a href="http://sip-router.1086192.n5.nabble.com/Kamailio-as-SBC-for-Microsoft-Teams-td181493.html" target="_blank" rel="noreferrer">http://sip-router.1086192.n5.nabble.com/Kamailio-as-SBC-for-Microsoft-Teams-td181493.html</a><br>
</div>
<div><br>
</div>
<div>This is a response from my Kamailio to Teams. Maybe it can be useful for you:</div>
<div><br>
</div>
<div>tag: snd<br>
pid: 1394<br>
process: 1<br>
time: 1599126436.582012<br>
date: Thu Sep 3 11:47:16 2020<br>
proto: tls ipv4<br>
srcip: SBC-IP-ADDR<br>
srcport: 5061<br>
dstip: 52.114.75.24<br>
dstport: 5061<br>
~~~~~~~~~~~~~~~~~~~~<br>
SIP/2.0 200 OK<br>
Via: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bK8ac0b4eb<br>
Record-Route: <sip:SBC-DNS-DOMAIN:5060;r2=on;lr><br>
Record-Route: <sip:SBC-DNS-DOMAIN:5061;transport=tls;r2=on;lr><br>
Record-Route: <sip:sip-du-a-eu.pstnhub.microsoft.com:5061;transport=tls;lr><br>
From: Pepelux <sip:+34XXXXXXXXX@sip.pstnhub.microsoft.com:5061;user=phone>;tag=3a6ca98c0a9a46c98ad781c82f389c4d<br>
To: <sip:+34YYYYYYYYY@SBC-DNS-DOMAIN:5061;user=phone>;tag=as524dd8d6<br>
Call-ID: 99ac64b5ad3455be9fd8c838cbdd4c6c<br>
CSeq: 1 INVITE<br>
Server: Asterisk PBX 16.2.1~dfsg-1+deb10u1<br>
Allow:sINVITE, ACK, CANCEL, OPTIONS, BYE, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE<br>
Supported: replaces<br>
Contact: <sip:+34YYYYYYYYY@SBC-IP-ADDR:5080><br>
Content-Type: application/sdp<br>
Content-Length: 532<br>
<br>
v=0<br>
o=root 11212956 11212956 IN IP4 SBC-IP-ADDR<br>
s=Asterisk PBX 16.2.1~dfsg-1+deb10u1<br>
c=IN IP4 SBC-IP-ADDR<br>
t=0 0<br>
m=audio 30444 RTP/SAVP 8<br>
a=maxptime:150<br>
a=mid:1<br>
a=rtpmap:8 PCMA/8000<br>
a=sendrecv<br>
a=rtcp:30445<br>
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:13aivX1dzg2Pbon6bNcvyzNenxMbtvCEh65mnL0t<br>
a=ptime:20<br>
a=ice-ufrag:oysP7oty<br>
a=ice-pwd:Vsv8LeF21onN8NFIKhOvpF53zL<br>
a=candidate:MLkUNexgYqowLxtY 1 UDP 2130706431 SBC-IP-ADDR 30444 typ host<br>
a=candidate:MLkUNexgYqowLxtY 2 UDP 2130706430 SBC-IP-ADDR 30445 typ host<br>
~~~~~~~~~~~~~~~~~~~~<br>
tag: rcv<br>
pid: 1412<br>
process: 19<br>
time: 1599126436.612972<br>
date: Thu Sep 3 11:47:16 2020<br>
proto: tls ipv4<br>
srcip: 52.114.75.24<br>
srcport: 6209<br>
dstip: SBC-IP-ADDR<br>
dstport: 5061<br>
~~~~~~~~~~~~~~~~~~~~<br>
ACK sip:+34YYYYYYYYY@SBC-IP-ADDR:5080 SIP/2.0<br>
FROM: Pepelux <sip:+34XXXXXXXXX@sip.pstnhub.microsoft.com:5061;user=phone>;tag=3a6ca98c0a9a46c98ad781c82f389c4d<br>
TO: <sip:+34YYYYYYYYY@SBC-DNS-DOMAIN:5061>;user=phone;tag=as524dd8d6<br>
CSEQ: 1 ACK<br>
CALL-ID: 99ac64b5ad3455be9fd8c838cbdd4c6c<br>
MAX-FORWARDS: 70<br>
VIA: SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bK693bb042<br>
ROUTE: <sip:SBC-DNS-DOMAIN:5061;transport=tls;r2=on;lr>,<sip:SBC-DNS-DOMAIN:5060;r2=on;lr><br>
CONTACT: <sip:api-du-c-euwe.pstnhub.microsoft.com:443;x-i=21167d9c-8cf9-4253-b059-2d987fadae5a;x-c=99ac64b5ad3455be9fd8c838cbdd4c6c/d/8/90df5d0ec92048de868e268fa57ac0f1><br>
CONTENT-LENGTH: 0<br>
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.9.1.3 i.EUWE.7<br>
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, 3 Sep 2020 at 12:34, sip user <<a href="mailto:sipuser404@gmail.com" target="_blank" rel="noreferrer">sipuser404@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Hi Pepelux,</div>
<div><br>
</div>
<div>I have this one:</div>
<div><br>
</div>
<div>remove_hf("Route");<br>
if (is_method("INVITE|SUBSCRIBE")) {<br>
if($src_ip != "IP ASTERISK"){<br>
record_route();<br>
xlog("L_INFO", "***********ROUTE PSTN***********");<br>
$rU="1005";<br>
} else {<br>
xlog("L_INFO","LLamada desde $si con puerto $sp");<br>
record_route_preset("FQNDDNS:5061;transport=tls", "FQNDIP:5060");<br>
add_rr_param(";r2=on");<br>
route(DISPATCH);<br>
route(RELAY);<br>
}<br>
}</div>
<div><br>
</div>
<div>When the call is from Teams (src_ip != "IP ASTERISK"), incoming calls, I send the call to 1005 extension. Is here where I have to make the change? Or where?</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El jue., 3 sept. 2020 a las 12:14, Pepelux (<<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">Hi
<div><br>
</div>
<div>Kamailio doesn't receive any ACK from Teams. I think the problem is the '200 Ok' that you send to Teams is not what he expected. Maybe this is wrong:</div>
<div>Record-Route: <sip:FQNDIP;r2=on;lr><br>
Record-Route: <sip:FQNDIP:5061;transport=tls;r2=on;lr><br>
</div>
<div><br>
</div>
<div>Try to put the registered domain (FQNDDNS) and not de IP address</div>
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, 3 Sep 2020 at 10:56, sip user <<a href="mailto:sipuser404@gmail.com" target="_blank" rel="noreferrer">sipuser404@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Sorry.. Yes, I need to load sipdump.so module..</div>
<div><br>
</div>
<div>I attach the result..</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El mar., 1 sept. 2020 a las 14:03, Pepelux (<<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">Hi
<div><br>
</div>
<div>Have you loaded the module? </div>
<div><br>
</div>
<div>loadmodule "sipdump.so"</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, 1 Sep 2020 at 13:56, sip user <<a href="mailto:sipuser404@gmail.com" target="_blank" rel="noreferrer">sipuser404@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Hi pepelux.. When I set:</div>
<div><br>
</div>
<div><span>
<pre style="background-color:rgb(252,255,252); border:1px solid rgb(153,204,204); color:rgb(0,0,0); padding-left:15pt; overflow:auto; border-radius:2.5px; font-size:15px">modparam("sipdump", "enable", 1)</pre>
</span><br>
</div>
<div>Error, Kamailio not start, error bad config..</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El mar., 1 sept. 2020 a las 13:45, Pepelux (<<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Sorry, I've sent last mail without finishing :)</div>
<div><br>
</div>
<div><a href="https://kamailio.org/docs/modules/5.5.x/modules/sipdump.html" target="_blank" rel="noreferrer">https://kamailio.org/docs/modules/5.5.x/modules/sipdump.html</a><br>
<br>
You only have to load the module and set:<br>
<pre style="background-color:rgb(252,255,252); border:1px solid rgb(153,204,204); color:rgb(0,0,0); padding-left:15pt; overflow:auto; border-radius:2.5px; font-size:15px">modparam("sipdump", "enable", 1)</pre>
</div>
<div><br>
</div>
Also you can enable or disable using RPC commands:
<div>
<pre style="background-color:rgb(252,255,252); border:1px solid rgb(153,204,204); color:rgb(0,0,0); padding-left:15pt; overflow:auto; border-radius:2.5px; font-size:15px">kamcmd sipdump.enable
kamcmd sipdump.enable 1
kamcmd sipdump.enable 0</pre>
<div><br>
</div>
<div>Regards</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, 1 Sep 2020 at 13:37, Pepelux <<a href="mailto:pepeluxx@gmail.com" target="_blank" rel="noreferrer">pepeluxx@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">Hi
<div><br>
</div>
<div><a href="https://kamailio.org/docs/modules/5.5.x/modules/sipdump.html" target="_blank" rel="noreferrer">https://kamailio.org/docs/modules/5.5.x/modules/sipdump.html</a><br>
</div>
<div><br>
</div>
<div>You only have to load the module and set:</div>
<div><br>
</div>
<div>modparam("sipdump", "enable", 1)</div>
<div><br>
</div>
<div>
<pre style="background-color:rgb(252,255,252); border:1px solid rgb(153,204,204); color:rgb(0,0,0); padding-left:15pt; overflow:auto; border-radius:2.5px; font-size:15px">kamcmd sipdump.enable 1
kamcmd sipdump.enable 0</pre>
</div>
<div>
<pre style="background-color:rgb(252,255,252); border:1px solid rgb(153,204,204); color:rgb(0,0,0); padding-left:15pt; overflow:auto; border-radius:2.5px; font-size:15px">modparam("sipdump", "enable", 1)</pre>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, 1 Sep 2020 at 13:23, sip user <<a href="mailto:sipuser404@gmail.com" target="_blank" rel="noreferrer">sipuser404@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div>Hi Daniel..</div>
<div><br>
</div>
<div>And how load sipdump?</div>
<div>I'm using kamailio 5.2.1-1 and I think sipdump module is not available, right?</div>
<div><br>
</div>
<div>Thanks<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El mar., 1 sept. 2020 a las 12:27, Daniel-Constantin Mierla (<<a href="mailto:miconda@gmail.com" target="_blank" rel="noreferrer">miconda@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<p>Hello,</p>
<p>it seems that the ACK comes in, but my guess is that the R-URI is not properly set. From the logs it looks like same value as for To header URI, while it should be the address in Contact header of 200ok for INVITE.</p>
<p>Load the sipdump module and that will save all the sip traffic in a text file, making it easier to see what comes/goes on both directions, no matter is over tls or not. If you use kamailio devel version (master branch), then sipdump module can also store
traffic in pcap file (tls traffic saved as udp for simplicity, but it is easy to spot from headers or meta data extra header).</p>
<p>You can send the sipdump file here for investigation, so we can see if some headers or r-uri are not correct.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 01.09.20 11:15, sip user wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi Daniel, thanks for answered to me...</div>
<div><br>
</div>
<div>With debug=3 I see that:</div>
<div><br>
</div>
<div>kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method: <ACK><br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri:
<a rel="noreferrer"><sip:+34590@FQND:5061;user=phone;transport=tls></a><br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0><br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=92e2fd8688a9d17b927d9be2f84faa55-8079<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <TO> [94]; uri=[<a rel="noreferrer">sip:+34590@FQND:5061;user=phone</a>]<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body [<a rel="noreferrer"><sip:+34590@FQND:5061;user=phone></a>], to tag [92e2fd8688a9d17b927d9be2f84faa55-8079]<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSEQ>: <1> <ACK><br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bKf4784e39>; state=16<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/receive.c:240]: receive_msg(): --- received sip message - request - call-id: [d3649f52dc0057768ec6c18733de8206] - cseq: [1 ACK]<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field(): content_length=0<br>
kamailio[1096]: 9(1109) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header<br>
kamailio[1096]: 9(1109) DEBUG: {1 1 ACK d3649f52dc0057768ec6c18733de8206} <core> [core/receive.c:295]: receive_msg(): preparing to run routing scripts...<br>
kamailio[1096]: 9(1109) DEBUG: {1 1 ACK d3649f52dc0057768ec6c18733de8206} sl [sl_funcs.c:397]: sl_filter_ACK(): too late to be a local ACK!</div>
<div><br>
</div>
<div>So, I understand that ACK comes from Teams, right? So kamailio routing problem?</div>
<div><br>
</div>
<div>Thanks
<div>
<div id="x_m_6811044577692437487gmail-m_-2585765685690227747gmail-m_1365525141599918192gmail-m_7316769297071584507gmail-m_-2107098092908059170gmail-m_7793088240166450154gmail-m_6534907034885007247gmail-m_8906909764253046600gmail-m_3627773665162087218gmail-m_7569791116750699942gmail-m_-3676526021935537077gmail-m_-7903172492480682388m_4238966687936567587gmail-m_-8742331068559269799gmail-m_-4085600822694883313gmail-m_9057787174862801108gmail-:nd">
<img src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div>
</div>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">El mar., 25 ago. 2020 a las 15:32, Daniel-Constantin Mierla (<<a href="mailto:miconda@gmail.com" target="_blank" rel="noreferrer">miconda@gmail.com</a>>) escribió:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<p>Hello,</p>
<p>run with debug=3 in kamailio.cfg and see if the ACK comes to Kamailio, if yes, then some routing issue in kamailio.cfg. If does not come, you will have to check the headers to see if MS Teams expects something else there, typically is about Record-Route
domains...</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 20.08.20 12:25, sip user wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi, I'm connecting Teams with kamailio server. From Kamailio to teams I have no problems, but from teams to Kamailio yes. Drop the call..</div>
<div><br>
</div>
<div>With ngrep I see that:</div>
<div><br>
</div>
<div>
<div>INVITE <a rel="noreferrer">sip:1005@CLIENT_IP:55766;transport=UDP;rinstance=d47edf336726e940</a> SIP/2.0.<br>
Record-Route: <a rel="noreferrer"><sip:FQND_IP;r2=on;lr></a>.<br>
Record-Route: <a rel="noreferrer"><sip:FQND_IP:5061;transport=tls;r2=on;lr></a>.<br>
FROM: "Javier Gonz..lez Mu..oz"<a rel="noreferrer"><sip:+324@sip.pstnhub.microsoft.com:5061;user=phone></a>;tag=c17bb1eb7f8649d4a89d8d4a876ac32b.<br>
TO: <a rel="noreferrer"><sip:+34560@FQND:5061;user=phone></a>.<br>
CSEQ: 1 INVITE.<br>
CALL-ID: c1364913e582553a9a9c2544c3583b0a.<br>
MAX-FORWARDS: 69.<br>
Via: SIP/2.0/UDP 92.222.217.64;branch=z9hG4bK7bb5.0fbae76a37829205e04279f220a26af2.0;i=a1.<br>
VIA: SIP/2.0/TLS 52.114.76.76:5061;branch=z9hG4bKd216a55.<br>
RECORD-ROUTE: <a rel="noreferrer"><sip:sip-du-a-eu.pstnhub.microsoft.com:5061;transport=tls;lr></a>.<br>
CONTACT: <a rel="noreferrer"><sip:api-du-a-euno.pstnhub.microsoft.com:443;x-i=b0b53fc5-76ef-4619-9a68-13e0a4eea92d;x-c=c1364913e582553a9a9c2544c3583b0a/d/8/6c25eb3789a14bf188ce6b05b5e27891></a>.<br>
CONTENT-LENGTH: 1091.<br>
MIN-SE: 300.<br>
SUPPORTED: timer.<br>
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2020.7.31.1 i.EUNO.0.<br>
CONTENT-TYPE: application/sdp.<br>
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY.<br>
P-ASSERTED-IDENTITY: <a href="tel:+324" target="_blank" rel="noreferrer"><tel:+324></a>,<a rel="noreferrer"><sip:EMAIL></a>.<br>
PRIVACY: id.<br>
SESSION-EXPIRES: 3600.<br>
.<br>
v=0.<br>
o=- 165103 0 IN IP4 127.0.0.1.<br>
s=session.<br>
c=IN IP4 52.113.44.8.<br>
b=CT:10000000.<br>
t=0 0.<br>
m=audio 50452 RTP/SAVP 104 9 103 111 18 0 8 97 101 13 118.<br>
c=IN IP4 52.113.44.8.<br>
a=rtcp:50453.<br>
a=ice-ufrag:FZTb.<br>
a=ice-pwd:yD3P7nr+xNq0VYdv7xpB1F+Y.<br>
a=rtcp-mux.<br>
a=candidate:1 1 UDP 2130706431 52.113.44.8 50452 typ srflx raddr 10.0.33.240 rport 50<br>
</div>
</div>
<div><br>
</div>
<div>U CLIENT_IP:55766 -> FQND_IP:5060 #2<br>
SIP/2.0 180 Ringing.<br>
Via: SIP/2.0/UDP FQND_IP;branch=z9hG4bK7bb5.0fbae76a37829205e04279f220a26af2.0;i=a1.<br>
Via: SIP/2.0/TLS 52.114.76.76:5061;branch=z9hG4bKd216a55.<br>
Record-Route: <a rel="noreferrer"><sip:FQND_IP;lr;r2=on></a>.<br>
Record-Route: <a rel="noreferrer"><sip:FQND_IP:5061;transport=tls;r2=on;lr></a>.<br>
Record-Route: <a rel="noreferrer"><sip:sip-du-a-eu.pstnhub.microsoft.com:5061;transport=tls;lr></a>.<br>
Contact: <a rel="noreferrer"><sip:1005@CLIENT_IP:55766;transport=UDP;rinstance=d47edf336726e940></a>.<br>
To: <a rel="noreferrer"><sip:+34560@FQND:5061;user=phone></a>;tag=de4e6b45.<br>
From: "Javier Gonz..lez Mu..oz"<a rel="noreferrer"><sip:+324@sip.pstnhub.microsoft.com:5061;user=phone></a>;tag=c17bb1eb7f8649d4a89d8d4a876ac32b.<br>
Call-ID: c1364913e582553a9a9c2544c3583b0a.<br>
CSeq: 1 INVITE.<br>
User-Agent: 3CXPhone 6.0.26523.0.<br>
Content-Length: 0.<br>
</div>
<div><br>
</div>
<div>U CLIENT_IP:55766 -> FQND_IP:5060 #3<br>
SIP/2.0 200 OK.<br>
Via: SIP/2.0/UDP FQND_IP;branch=z9hG4bK7bb5.0fbae76a37829205e04279f220a26af2.0;i=a1.<br>
Via: SIP/2.0/TLS 52.114.76.76:5061;branch=z9hG4bKd216a55.<br>
Record-Route: <a rel="noreferrer"><sip:FQND_IP;lr;r2=on></a>.<br>
Record-Route: <a rel="noreferrer"><sip:FQND_IP:5061;transport=tls;r2=on;lr></a>.<br>
Record-Route: <a rel="noreferrer"><sip:sip-du-a-eu.pstnhub.microsoft.com:5061;transport=tls;lr></a>.<br>
Contact: <a rel="noreferrer"><sip:1005@CLIENT_IP:55766;transport=UDP;rinstance=d47edf336726e940></a>.<br>
To: <a rel="noreferrer"><sip:+34560@FQND:5061;user=phone></a>;tag=de4e6b45.<br>
From: "Javier Gonz..lez Mu..oz"<a rel="noreferrer"><sip:+324@sip.pstnhub.microsoft.com:5061;user=phone></a>;tag=c17bb1eb7f8649d4a89d8d4a876ac32b.<br>
Call-ID: c1364913e582553a9a9c2544c3583b0a.<br>
CSeq: 1 INVITE.<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE.<br>
Content-Type: application/sdp.<br>
Supported: replaces.<br>
User-Agent: 3CXPhone 6.0.26523.0.<br>
Content-Length: 1067.<br>
.<br>
v=0.<br>
o=3cxVCE 324945090 117647850 IN IP4 .<br>
s=3cxVCE Audio Call.<br>
t=0 0.<br>
m=audio 0 RTP/SAVP 104 9 103 111 18 0 8 97 101 13 118.<br>
c=IN IP4 52.113.44.8.<br>
a=rtpmap:104 SILK/16000.<br>
a=rtpmap:9 G722/8000.<br>
a=rtpmap:103 SILK/8000.<br>
a=rtpmap:111 SIREN/16000.<br>
a=fmtp:111 bitrate=16000.<br>
a=rtpmap:18 G729/8000.<br>
a=fmtp:18 annexb=no.<br>
a=rtpmap:0 PCMU/8000.<br>
a=rtpmap:8 PCMA/8000.<br>
a=rtpmap:97 RED/8000.<br>
a=rtpmap:101 telephone-event/8000.<br>
a=fmtp:101 0-16.<br>
a=rtpmap:13 CN/8000.<br>
a=rtpmap:118 CN/16000.<br>
a=rtcp:50453.<br>
a=ice-ufrag:FZTb.<br>
a=ice-pwd:yD3P7nr+xNq0VYdv7xpB1F+Y.<br>
a=rtcp-mux.<br>
a=candidate:1 1 UDP 213<br>
</div>
<div><br>
</div>
<div>I never received ACK..</div>
<div><br>
</div>
<div>In my configuration:</div>
<div><br>
</div>
<div>Kamailio.cfg:</div>
<div><br>
</div>
<div>#!KAMAILIO<br>
#!define WITH_TLS</div>
<div><br>
</div>
<div>event_route[tm:local-request] {<br>
<br>
if(is_method("OPTIONS") && $ru =~ "<a href="http://pstnhub.microsoft.com" target="_blank" rel="noreferrer">pstnhub.microsoft.com</a>") {<br>
append_hf("Contact: <a rel="noreferrer"><sip:FQND:5061;transport=tls></a>\r\n");<br>
}<br>
xlog("L_INFO", "Sent out tm request: $mb\n");<br>
}</div>
<div><br>
</div>
<div>request_route{</div>
<div><br>
</div>
<div> remove_hf("Route");<br>
if (is_method("INVITE|SUBSCRIBE")) {<br>
xlog("L_INFO","$fU is trying to call to $rU con valores $tu\n");<br>
$rU="1005";<br>
}</div>
<div>}</div>
<div><br>
</div>
<div>What I'm doing wrong?</div>
<div><br>
</div>
<div>I don't understand why not received ACK..</div>
<div><br>
</div>
<div>Could anyone help me?</div>
<div><br>
</div>
<div>Thanks</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" rel="noreferrer">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" rel="noreferrer">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" rel="noreferrer">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" rel="noreferrer">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" rel="noreferrer">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" rel="noreferrer">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" rel="noreferrer">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" rel="noreferrer">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>