This is from the section in the link you mentioned (https://skalatan.de/en/blog/kamailio-sbc-teams)

 

# Add the Microsoft Teams-specific code here

event_route[tm:local-request] {

 

        if(is_method("OPTIONS") && $ru =~ "pstnhub.microsoft.com") {

               append_hf("Contact: <sip:abcsbc.com:5061;transport=tls>\r\n");

        }

        xlog("L_INFO", "Sent out tm request: $mb\n");

}

 

I have added this in my code after the section

 

# Wrapper for relaying requests

route[RELAY] {

----- Continue scripts -----

 

Below is my Teams admin Center:

 

kamcmd dns.lookup SRV _sips._tcp.sip.pstnhub.microsoft.com

{

        name: _sips._tcp.sip.pstnhub.microsoft.com

        type: SRV

        size_bytes: 360

        reference_counter: 2

        permanent: no

        expires: 3600

        last_used: 0

        negative_entry: no

        records: {

                {

                        rr_idx: 0

                        rr_name: sip.pstnhub.microsoft.com

                        rr_port: 5061

                        rr_priority: 10

                        rr_weight: 0

                        rr_permanent: no

                        rr_expires: 3600

                }

                {

                        rr_idx: 1

                        rr_name: sip2.pstnhub.microsoft.com

                        rr_port: 5061

                        rr_priority: 20

                        rr_weight: 0

                        rr_permanent: no

                        rr_expires: 3600

                }

                {

                        rr_idx: 2

                        rr_name: sip3.pstnhub.microsoft.com

                        rr_port: 5061

                        rr_priority: 30

                        rr_weight: 0

                        rr_permanent: no

                        rr_expires: 3600

                }

                {

                        rr_idx: 3

                        rr_name: sip4.pstnhub.microsoft.com

                        rr_port: 5061

                        rr_priority: 40

                        rr_weight: 0

                        rr_permanent: no

                        rr_expires: 3600

                }

        }

}

 

 

 

 

From: Sergiu Pojoga <pojogas@gmail.com>
Sent: Tuesday, December 19, 2023 12:18 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Cc: faisal.jamil.khan@gmail.com
Subject: Re: [SR-Users] Re: Kamailio - Ms Teams direct Routing - dispatcher issues | FLAGS: IP

 

You didn't confirm if Contact was added to OPTIONS for local requests.

 

In Teams Admin Center, do you have an enrolled SBC? What's the status of TLS, SIP OPTIONS and Enabled status?

 

What's the result of: kamcmd dns.lookup SRV _sips._tcp.sip.pstnhub.microsoft.com

 

Can you ping sip.pstnhub.microsoft.com?

 

On Mon, Dec 18, 2023 at 1:05 PM faisal.jamil.khan--- via sr-users <sr-users@lists.kamailio.org> wrote:

kamctl dispatcher dump
{
  "jsonrpc":  "2.0",
  "result": {
    "NRSETS": 1,
    "RECORDS":  [{
        "SET":  {
          "ID": 1,
          "TARGETS":  [{
              "DEST": {
                "URI":  "sip:sip.pstnhub.microsoft.com:5061;transport=tls",
                "FLAGS":  "IP",
                "PRIORITY": 3,
                "ATTRS":  {
                  "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:abcsbc.com",
                  "DUID": null,
                  "MAXLOAD":  0,
                  "WEIGHT": 0,
                  "RWEIGHT":  0,
                  "SOCKET": "tls:172.31.19.8:5061",
                  "SOCKNAME": null,
                  "OBPROXY":  null
                }
              }
            }, {
              "DEST": {
                "URI":  "sip:sip2.pstnhub.microsoft.com:5061;transport=tls",
                "FLAGS":  "IP",
                "PRIORITY": 2,
                "ATTRS":  {
                  "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:abcsbc.com",
                  "DUID": null,
                  "MAXLOAD":  0,
                  "WEIGHT": 0,
                  "RWEIGHT":  0,
                  "SOCKET": "tls:172.31.19.8:5061",
                  "SOCKNAME": null,
                  "OBPROXY":  null
                }
              }
            }, {
              "DEST": {
                "URI":  "sip:sip3.pstnhub.microsoft.com:5061;transport=tls",
                "FLAGS":  "IP",
                "PRIORITY": 1,
                "ATTRS":  {
                  "BODY": "socket=tls:172.31.19.8:5061;ping_from=sip:abcsbc.com",
                  "DUID": null,
                  "MAXLOAD":  0,
                  "WEIGHT": 0,
                  "RWEIGHT":  0,
                  "SOCKET": "tls:172.31.19.8:5061",
                  "SOCKNAME": null,
                  "OBPROXY":  null
                }
              }
            }]
        }
      }]
  },
  "id": 19731
}


My dispatcher settings.

i am unable to get the trunk up with Microsoft . Can someone guide me how to fix this issue?
__________________________________________________________
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: