On Tue, 28 Jan 2025, at 19:40, Fred Posner wrote:
> Teams uses TLS and port 443. You’ll need to use $fs/$fsn/or 
> force_send_socket to send the request. MS Teams is also pretty 
> unforgiving regarding “;transport=tls” and “user=phone” in some (but 
> not all) of their r-uri’s.
>

Hi Fred,

Thanks. Working now. The port 443 really threw me, I was convinced it must be 
wrong and so was concentrating on routing headers to find the issue.

Thanks everyone for your suggestions. 

-Barry

> Some examples/approaches:
>
> https://skalatan.de/en/blog/kamailio-sbc-teams
> https://github.com/ZeljkoBenovic/teamsdr-kamailio/blob/master/kamailio.cfg
>
>
> Regards,
>
> Fred Posner
>
>
>
>
>> On Jan 28, 2025, at 2:23 PM, Barry Flanagan via sr-users 
>> <sr-users@lists.kamailio.org> wrote:
>> 
>> 28 Jan 2025 19:15:05 Alex Balashov via sr-users 
>> <sr-users@lists.kamailio.org>:
>> 
>>> Indeed, you should force TLS.
>>> 
>>> I wouldn't pay attention to the port 443 in the Contact/BYE URI. Consider 
>>> it "logical".
>> 
>> The actual sip request is being sent to port 443, which was really the 
>> thing, unless 443 is correct.
>> 
>>> 
>>>> On Jan 28, 2025, at 1:48 pm, Barry Flanagan via sr-users 
>>>> <sr-users@lists.kamailio.org> wrote:
>>>> 
>>>> 28 Jan 2025 18:26:48 Ovidiu Sas <o...@voipembedded.com>:
>>>> 
>>>>> It seems that you are sending the BYE over UDP instead of TCP/TLS.
>>>> 
>>>> Yes, that is true, but is the host api-du-b-euwe.pstnhub.microsoft.com:443 
>>>> the correct endpoint? Port 443 seems strange.
>>>> 
>>>> I'll try just forcing tls
>>>>> 
>>>>> -ovidiu
>>>>> 
>>>>> On Tue, Jan 28, 2025 at 12:52 Barry Flanagan via sr-users 
>>>>> <sr-users@lists.kamailio.org> wrote:
>>>>>> Hi all,
>>>>>> 
>>>>>> I have a Teams gw working apart from one issue., In a call originated in 
>>>>>> Teams,. if the called party hangs up, the BYE is sent to 
>>>>>> api-du-b-euwe.pstnhub.microsoft.com:443[http://api-du-b-euwe.pstnhub.microsoft.com:443]
>>>>>>  which does not work. This is taken from the Contact header of the ACK I 
>>>>>> presume. 
>>>>>> 
>>>>>> Here is the ACK to the 200 OK:
>>>>>> 
>>>>>> 28/01/2025 17:08:26.560 +00:00: 
>>>>>> 52.114.75.24:53728[http://52.114.75.24:53728] -> 
>>>>>> 100.100.198.241:5061[http://100.100.198.241:5061]
>>>>>> ACK 
>>>>>> sip:9...@teams.domain.com:5061;transport=tls;tps=atpsh-67990f01-8ed8-1 
>>>>>> SIP/2.0
>>>>>> FROM:  "Teams User" 
>>>>>> <sip:+35314375...@sip.pstnhub.microsoft.com:5061;user=phone>;tag=c29cb7a79ddf40f9ba909f3f1034a770
>>>>>> TO:  <sip:9...@teams.domain.com:5061>;user=phone;tag=as6e287620
>>>>>> CSEQ:  1 ACK
>>>>>> CALL-ID:  e49f7df631ee576286ecf159e81952fe
>>>>>> MAX-FORWARDS:  70
>>>>>> VIA:  SIP/2.0/TLS 52.114.75.24:5061;branch=z9hG4bK46d28f33
>>>>>> CONTACT:  
>>>>>> <sip:api-du-b-euwe.pstnhub.microsoft.com:443;x-i=0781e8a1-91e6-4f6a-bc4a-73d6890827d4;x-c=e49f7df631ee576286ecf159e81952fe/d/8/703117d8337e4975a8216a54f59035c2>
>>>>>> CONTENT-LENGTH:  0
>>>>>> USER-AGENT:  Microsoft.PSTNHub.SIPProxy v.2025.1.20.11 i.EUWE.7
>>>>>> ALLOW:  INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
>>>>>> 
>>>>>> ..and here is the BYE.
>>>>>> 
>>>>>> 28/01/2025 17:08:36.119 +00:00: 
>>>>>> 100.100.198.241:5060[http://100.100.198.241:5060] -> 
>>>>>> 52.123.134.13:443[http://52.123.134.13:443]
>>>>>> BYE 
>>>>>> sip:api-du-b-euwe.pstnhub.microsoft.com:443;x-i=0781e8a1-91e6-4f6a-bc4a-73d6890827d4;x-c=e49f7df631ee576286ecf159e81952fe/d/8/703117d8337e4975a8216a54f59035c2
>>>>>>  SIP/2.0
>>>>>> Record-Route:  
>>>>>> <sip:teams.domain.com:5061;transport=tls;ftag=as6e287620;lr;r2=on>
>>>>>> Record-Route:  <sip:100.100.198.241:5060;ftag=as6e287620;lr;r2=on>
>>>>>> Via:  SIP/2.0/UDP 
>>>>>> 100.100.198.241;branch=z9hG4bKc89c.0c1cf04a771c30293432e5f1f59331c8.0
>>>>>> Via:  SIP/2.0/UDP 102.102.139.182:5060;rport=5060;branch=z9hG4bK3c42c163
>>>>>> Max-Forwards:  69
>>>>>> From:  <sip:9...@teams.domain.com:5061>;user=phone;tag=as6e287620
>>>>>> To:  "Teams 
>>>>>> User"<sip:+35314375...@sip.pstnhub.microsoft.com:5061;user=phone>;tag=c29cb7a79ddf40f9ba909f3f1034a770
>>>>>> Call-ID: e49f7df631ee576286ecf159e81952fe
>>>>>> CSeq:  102 BYE
>>>>>> Content-Length:  0
>>>>>> 
>>>>>> How can I get around this? Using a pretty standard WITHINDLG route. I am 
>>>>>> using topos but not manipulating the Contact header.
>>>>>> 
>>>>>> Thanks!
>>>>>> 
>>>>>> -Barry
>>>>>> 
>>>>>> __________________________________________________________
>>>>>> Kamailio - Users Mailing List - Non Commercial Discussions -- 
>>>>>> sr-users@lists.kamailio.org
>>>>>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>>>>>> Important: keep the mailing list in the recipients, do not reply only to 
>>>>>> the sender!
>>>> 
>>>> 
>>>> -Barry Flanagan
>>>> __________________________________________________________
>>>> Kamailio - Users Mailing List - Non Commercial Discussions -- 
>>>> sr-users@lists.kamailio.org
>>>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>>>> Important: keep the mailing list in the recipients, do not reply only to 
>>>> the sender!
>>> 
>>> --
>>> Alex Balashov
>>> Principal Consultant
>>> Evariste Systems LLC
>>> Web: https://evaristesys.com
>>> Tel: +1-706-510-6800
>>> 
>>> __________________________________________________________
>>> Kamailio - Users Mailing List - Non Commercial Discussions -- 
>>> sr-users@lists.kamailio.org
>>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>>> Important: keep the mailing list in the recipients, do not reply only to 
>>> the sender!
>> 
>> 
>> -Barry Flanagan
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions -- 
>> sr-users@lists.kamailio.org
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to the 
>> sender!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
sr-users@lists.kamailio.org
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to