Hello,

regarding 1), you set request uri (r-uri/$ru) or destination uri ($du) to an UDP address, but you force sending via a TLS socket. How do you route out in this case? Do you use dispatcher or some other module?

Cheers,
Daniel

On 18.02.20 19:15, Bugaian A. Vitalie wrote:
Hi Ben,

I get request timeout.

1) Most probably that is the cause> but I just changed it to tls and get the following>

Feb 18 20:02:05 sbc /usr/local/sbin/kamailio[37664]: WARNING: {1 275 INVITE 800C9970-E650-EA11-808F-6EEEB899592C@192.168.169.102} <core> [core/forward.c:229]: get_send_socket2(): protocol/port mismatch (forced tls:217.26.163.205:5061, to udp:52.114.75.24:5061)
I forced it to tls on my side as it was udp, but looks like it complains that other side is udp?

What are tls numbers on msft side? All examples I have show 506, when I send option it confirms that tls is on 5061 actually>(so above error is confuzing a bit)

Sent out tm request to TEAMS: OPTIONS sip:sip.pstnhub.microsoft.com;transport=tls SIP/2.0#015#012Via: SIP/2.0/TLS 217.26.163.205:5061;branch=z9hG4bKcc7f.5a6648b5000000000000000000000000.0#015#012To: <sip:sip.pstnhub.microsoft.com;transport=tls>#015#012From: <sip:sbc.pride.md>;tag=2cab7f8b5170c57239647c2c07226d7c-45063c71#015#012CSeq: 10 OPTIONS#015#012Call-ID: 43c771b814737421-37669@192.168.172.4#015#012Max-Forwards: 70#015#012Content-Length: 0#015#012User-Agent: Oracle ESBC#015#012#015#012

2) Its all good and green in web interface and in powershell cli>
PS C:\WINDOWS\system32> Get-CsOnlinePSTNGateway


Identity                           : sbc.pride.md
InboundTeamsNumberTranslationRules : {}
InboundPstnNumberTranslationRules  : {}
OutbundTeamsNumberTranslationRules : {}
OutboundPstnNumberTranslationRules : {}
Fqdn                               : sbc.pride.md
SipSignalingPort                   : 5061
FailoverTimeSeconds                : 10
ForwardCallHistory                 : True
ForwardPai                         : False
SendSipOptions                     : True
MaxConcurrentSessions              : 10
Enabled                            : True
MediaBypass                        : False
GatewaySiteId                      :
GatewaySiteLbrEnabled              : False
FailoverResponseCodes              : 408,503,504
GenerateRingingWhileLocatingUser   : True
PidfLoSupported                    : False
MediaRelayRoutingLocationOverride  :
ProxySbc                           :
BypassMode                         : None

Also user is enabled and has correct number in:
PS C:\WINDOWS\system32> Get-CsOnlineUser "sbcactivtor@sbc.pride.md" | fl *uri*
OnPremLineURI            : tel:+37360844269
LineServerURI            :
OnPremLineURIManuallySet : True
LineURI                  : tel:+37360844269

3) Thanks.

Thanks  lot for your suggestion. I am looking to get it sorted out at point 1.

Vitalie.



On Tue, Feb 18, 2020 at 5:29 PM Ben Kaufman <ben.kaufman@altigen.com> wrote:

Do you get any response from Teams at all?

 

A few base thoughts:

 

  1. The first line of your example, it looks like the source port of the packet you’re sending is port 5060.  Are you certain that this is sent as TLS?  I’d normally expect to see an ephemeral TCP port.
  2. You have outbound calls working, so I’m guessing that you have sbc.pride.md as a record when you run Get-CsOnlinePstnGateway, but it would be good if you confirmed this.
  3. Also note that frequently issuing a change to teams returns a positive response, but takes a quite a long time to actually become enforced.  For example, if you add a new gateway with New-CsOnlinePstnGateway, the commandlet may be successful, but it won’t actually work for anywhere from 5 minutes to three hours (yes, really, multiple hours…)

 

We provide service to Teams, but use Ribbon gateways as the ‘last hop’ before Teams because they’re “officially” supported, and we’re offering this as a commercial service, so customers want to know that they’re using “officially supported” solutions.  With that said, we do route the calls to the ribbon gateways through teams.

 

 

Ben Kaufman

ben.kaufman@altigen.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Bugaian A. Vitalie
Sent: Tuesday, February 18, 2020 10:06 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Teams integration

 

Hello list,

 

its been about one month for me playing with kamailio and I need some help to sort out a real life situation.

 

I followed this guide https://skalatan.de/en/blog/kamailio-sbc-teams; great article, also got some inspiration from here https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/..articles look very similar.

 

I manged to get my calls out to kamailio from TEAMS it works perfectly call gets connected and  codec negotiation is fine, but I am facing issue geting the call inbound to TEAMS.

 

My invite looks like this:

 

========================

U 217.26.163.205:5060 -> 52.114.75.24:5061 #22
INVITE sip:+37360844269@sip.pstnhub.microsoft.com:5061 SIP/2.0.
Record-Route: <sip:sbc.pride.md:5061;transport=tls;lr>.
Record-Route: <sip:217.26.163.205:5061;nat=yes;lr>.
Via: SIP/2.0/UDP 217.26.163.205;branch=z9hG4bK7838.7417f50ed201fcada9609f5b7c4e520f.0.
Via: SIP/2.0/UDP 192.168.169.102:5060;received=46.214.187.67;branch=z9hG4bK80e3f7e5cc50ea11806b6eeeb899592c;rport=5060.
From: "+37379844267" <sip:+37379844267@sbc.pride.md>;tag=1604785394.
To: "+37360844269" <sip:+37360844269@sip.pstnhub.microsoft.com:5061;user=phone>.
Call-ID: 80E3F7E5-CC50-EA11-8069-6EEEB899592C@192.168.169.102.
CSeq: 227 INVITE.
sip:+37379844267@192.168.169.102:5060;gr=008A94E3-CA50-EA11-805B-6EEEB899592C;alias=46.214.187.67~5060~1Content-Type: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, INFO, MESSAGE, NOTIFY, OPTIONS, REFER, UPDATE, PRACK.
Max-Forwards: 69.
User-Agent: SIPPER for PhonerLite.
Session-Expires: 1800.
Supported: 100rel, replaces, from-change, gruu, timer.
P-Preferred-Identity: <sip:+37379844267@sbc.pride.md>.
Content-Length:   362.
Contact: <sip:+37379844267@sbc.pride.md:5061;user=phone;transport=tls>.
.
v=0.
o=- 2307737351 1 IN IP4 217.26.163.205.
s=SIPPER for PhonerLite.
c=IN IP4 217.26.163.205.
t=0 0.
m=audio 36864 RTP/SAVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:owGy5+mMZNyO5+9lFmUUOK3WqpEsxJH0+jtWz

 

===============================================

 

Anybody has a good invite exaple for Teams?

 

Or do you see any issue with my invite? I do use :

 

 record_route_preset("sbc.pride.md:5061;transport=tls","217.26.163.205:5060;nat=yes");
 add_rr_param(";r2=on");

 

before sending this out.

 

Please let me know if you can help.

 

Thanks.

 

Vitalie.

 

 

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, or the person responsible for delivering the
e-mail to the intended recipient, be advised you have received this
message in error and that any use, dissemination, forwarding, printing,
or copying is strictly prohibited. Please notify AltiGen Communications
immediately at either (888)258-4436 or via email to
administrator@altigen.com, and destroy all copies of this message and any
attachments.

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com