[SR-Users] Establish connection between MsTeams and Kamailio.

Karsten Horsmann khorsmann at gmail.com
Sat Jan 30 10:51:49 CET 2021


Hi,

If I take a look at the howto from Henning and your dispatcher state I miss
the rest of the ms teams geo redundante dispatcher targets.


https://skalatan.de/de/blog/kamailio-sbc-teams


The OPTION ping works for ms teams AFAIK remember that you must also ping
sip, sip2, sip3.pstnhub....

Kind regards
Karsten Horsmann



Willy Valles Rios <willyvalles17 at gmail.com> schrieb am Di., 26. Jan. 2021,
20:31:

> Hello community,
>
> Please your support, I tell you that I am integrating Kamailio with
> MsTeams, after some time reviewing this, I finally achieved the connection
> from my Kamailio server to MsTeams and I can validate that the connection
> to MsTeams is in AP.
>
> [root @ kamailio-server kamailio] # kamcmd dispatcher.list | egrep "URI |
> FLAGS"
>                                         URI: sip:
> sip.pstnhub.microsoft.com; transport = tls
>                                         FLAGS: AP
>
> However, from the admin panel of MsTeams (Direct Routing) I see that the
> connection to my sbc "sbc.netvoiceperu.com" is with TLS connectivity
> status in "Active" but the SIP options status is in "Warning".
>
> I have made calls from MsTeams thinking that the SIP options status would
> change to "active" but it is still in "Warning" state. On the other hand, I
> have enabled a siptrace in Kamailio and verify that the SIP OPTIONS from
> kamailio are being sent in the following format to MsTeams.
>
> OPTIONS sip: sip.pstnhub.microsoft.com; transport = tls SIP / 2.0
> Via: SIP / 2.0 / TLS 161.35.44.66:5061
> ;branch=z9hG4bKea07.52224687000000000000000000000000.0
> To: <sip: sip.pstnhub.microsoft.com; transport = tls>
> From: <sip: sbc.netvoiceperu.com>; tag =
> d3569c818b500aeb8c373426e76c2884-81763c71
> CSeq: 10 OPTIONS
> Call-ID: 13ea237a751e0c48-9148 at 161.35.44.66
> Max-Forwards: 70
> Content-Length: 0
> User-Agent: kamailio (5.4.0 (x86_64 / linux))
>
> As you can see, the SIP OPTIONS sent from Kamailio to MsTeams does not
> contain the "Contact" field, which in theory said "Contact" field should
> have been added by Kamailio according to the configuration added in
> kamailio.cfg
>
> event_route [tm: local-request] {
> sip_trace ();
>         if (is_method ("OPTIONS") && $ ru = ~ "pstnhub.microsoft.com") {
>                append_hf ("Contact: <sip: sbc.netvoiceperu.com: 5061;
> transport = tls> \ r \ n");
>         }
>         xlog ("L_INFO", "Sent out tm request: $ mb \ n");
> }
>
> As additional information, I inform you that I also managed to observe the
> SIP OPTIONS that MsTeams sends to Kamailio.
>
> OPTIONS sip: sbc.netvoiceperu.com: 5061; transport = tls SIP / 2.0
> FROM: <sip: sip-du-a-eu.pstnhub.microsoft.com: 5061>; tag =
> f1bdeb5f-662f-4544-a436-e9aa9ad78da4
> TO: <sip: sbc.netvoiceperu.com>
> CSEQ: 1 OPTIONS
> CALL-ID: c47e2782-16c3-49cb-8931-24e9709d260a
> MAX-FORWARDS: 70
> VIA: SIP / 2.0 / TLS 52.114.75.24:5061;branch=z9hG4bK48b0e6be
> CONTACT: <sip: sip-du-a-eu.pstnhub.microsoft.com: 5061>
> CONTENT-LENGTH: 0
> USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2021.1.15.7 i.EUWE.10
> ALLOW: INVITE, ACK, OPTIONS, CANCEL, BYE, NOTIFY
>
> However I don't see the 200 OK SIP responses from Kamailio to MsTeams.
>
> I think this may be the reason why I see the SIP OPTIONS status in
> "Warning" from the MsTeams panel. Maybe the contact field is not being
> added in the SIP OPTIONS messages that Kamailio sends to MsTeams and for
> that reason I don't see 200OK responses from MsTeams.
>
> Could you help me solve this please.
>
> Cheers
>
> Saludos Cordiales
> --
> *Willy Valles Rios*
> *Unified Communications Specialist*
>
> phone: +51955747343
> em at il: willyvalles17 at gmail.com
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210130/362bfbd5/attachment.htm>


More information about the sr-users mailing list