Here's my last and best trick, which eliminates Kamailio entirely from being the culprit:

sipexer -options -contact-uri "sip:customers.teamsphone.net:5061;transport=tls" -fd "customers.teamsphone.net" -td  "sip.pstnhub.microsoft.com;transport=tls" \
-tls-insecure -tls-certificate "/usr/local/etc/kamailio/bundle.crt" -tls-key "/usr/local/etc/kamailio/privkey.pem" \
-xh "Max-Forwards: 70" -ua "Ribbon-SIPGateway" "sip:sip.pstnhub.microsoft.com:5061;transport=tls"


If you don't get a reply from Microsoft.PSTNHub then something is awkwardly wrong in your setup, not related to Kamailio, likely Teams backend config or networking.


Note: 

(1) adjust certs path to your case

(2) install sipexer if you don't have it: https://github.com/miconda/sipexer


Regards,
Sergiu
--
Teams PBX connector with full MS Direct Routing automation for service providers
Webhttps://teamsphone.net



On Mon, Dec 18, 2023 at 3:23 PM faisal.jamil.khan--- via sr-users <sr-users@lists.kamailio.org> wrote:
new updated list according to the SRV records and after removing tls port.

1 sip:sip.pstnhub.microsoft.com;transport=tls 0 10 socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
1 sip:sip2.pstnhub.microsoft.com;transport=tls 0 20 socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
1 sip:sip3.pstnhub.microsoft.com;transport=tls 0 30 socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
1 sip:sip4.pstnhub.microsoft.com;transport=tls 0 40 socket=tls:172.31.19.8;ping_from=sip:abcsbc.com
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: