[SR-Users] Kamailio as MS-Teams SBC

Pepelux pepeluxx at gmail.com
Wed Feb 3 20:00:25 CET 2021


I'm talking about inbound calls ...

PSTN -> Kamailio -> Teams ... and transfer to another Teams user

I remember that Teams was sending me the transfer until I changed header
removing REFER from ALLOW

Kamailio support REFER but I couldn't get it to work with Teams

On Wed, 3 Feb 2021 at 19:08, Davide Zanichelli <dav.zanichelli at gmail.com>
wrote:

> Yes
> But for inbound calls i dont know why
> Teams send me a REFER !
>
> Do your know  if kamailio support Refer transfer ?
>
> Thanks
>
> Davide
>
> Il giorno mer 3 feb 2021 alle 15:27 Pepelux <pepeluxx at gmail.com> ha
> scritto:
>
>> I use something similar and all transfers between Teams users work fine:
>>
>> onreply_route[PBX_REPLY_TO_TEAMS] {
>>         subst('/^Allow:\s(.*)\,\sREFER(.*)$/Allow:\s\1\2/ig');
>>
>> Teams thinks that we don't support the refer method and it manages the
>> transfers.
>>
>> I have not tried the external transfers but I think if the SBC rules are
>> ok, it must be managed by Teams.
>>
>> Regards
>>
>>
>> On Wed, 3 Feb 2021 at 12:00, Davide Zanichelli <dav.zanichelli at gmail.com>
>> wrote:
>>
>>> Outbound call transfer fixed !
>>>
>>> if can helps :
>>>
>>>         if(status=="200"){
>>>         remove_hf("ALLOW:");
>>>         append_hf("ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY \r\n",
>>> "CONTENT-TYPE");
>>>         }
>>>
>>> last but not least i need to fix transfer for incoming calls
>>>
>>> so in my case i use rtpengine for manage RTP > SRTP conversion ..
>>> so my issue in if i try to transfer pbx send me "not acceptable here"
>>> if i remove ice PBX accept the INVITE but Teams require SRTP,
>>> so does anyone know how to get it to work ?
>>>
>>>
>>>
>>> Thanks you !!!
>>>
>>> Davide
>>>
>>>
>>>
>>> Il giorno ven 29 gen 2021 alle ore 12:53 Davide Zanichelli <
>>> dav.zanichelli at gmail.com> ha scritto:
>>>
>>>> Direct Routing supports two methods for call transfer:
>>>>
>>>>    -
>>>>
>>>>    Option 1. SIP proxy processes Refer from the client locally and
>>>>    acts as a Referee as described in section 7.1 of RFC 3892.
>>>>
>>>>    With this option, the SIP proxy terminates the transfer and adds a
>>>>    new Invite.
>>>>    -
>>>>
>>>>    Option 2. SIP proxy sends the Refer to the SBC and acts as a
>>>>    Transferor as describing in Section 6 of RFC 5589.
>>>>
>>>>    With this option, the SIP proxy sends a Refer to the SBC and
>>>>    expects the SBC to handle the Transfer fully.
>>>>
>>>> The SIP proxy selects the method based on the capabilities reported by
>>>> the SBC. If the SBC indicates that it supports the method “Refer”, the
>>>> SIP proxy will use Option 2 for call transfers.
>>>>
>>>> The following is an example of an SBC sending the message that the
>>>> Refer method is supported:
>>>> ConsoleCopia
>>>>
>>>> ALLOW: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
>>>>
>>>> If the SBC doesn’t indicate that Refer as a supported method, Direct
>>>> Routing will use Option 1 (SIP proxy acts as a Referee) . The SBC must
>>>> also signal that it supports the Notify method:
>>>>
>>>> Example of SBC indicating that Refer method is not supported:
>>>> ConsoleCopia
>>>>
>>>> ALLOW: INVITE, ACK, CANCEL, BYE, INFO, NOTIFY, PRACK, UPDATE, OPTIONS
>>>>
>>>>
>>>> so i try to add "REFER" in the allow ì: heder but still no luck
>>>> Davide
>>>>
>>>>
>>>> Il giorno ven 29 gen 2021 alle ore 11:24 Davide Zanichelli <
>>>> dav.zanichelli at gmail.com> ha scritto:
>>>>
>>>>> Ok thanks
>>>>>
>>>>> My issue is when i try to transfer a call to esternal user
>>>>> Thanks
>>>>>
>>>>> Il giorno ven 29 gen 2021 alle 11:10 Pepelux <pepeluxx at gmail.com> ha
>>>>> scritto:
>>>>>
>>>>>> I think Teams doesn't send REFER messages. Transfers are managed
>>>>>> directly by Teams. When you transfer a call you can send to a Team user
>>>>>> instead to a SIP extension.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> On Fri, 29 Jan 2021 at 10:55, Davide Zanichelli <
>>>>>> dav.zanichelli at gmail.com> wrote:
>>>>>>
>>>>>>> Hello
>>>>>>>
>>>>>>> Now inbound and outbound works as expected!
>>>>>>> But i have a issue during the call transfer.
>>>>>>>
>>>>>>>
>>>>>>> transfer fail and i dont receive REFER from Teams
>>>>>>>
>>>>>>> Does someone know how to manage re invite and refer with Teams ?
>>>>>>>
>>>>>>> Any advice are welcome
>>>>>>> Thanks you
>>>>>>>
>>>>>>> Il giorno mer 27 gen 2021 alle 09:07 Davide Zanichelli <
>>>>>>> dav.zanichelli at gmail.com> ha scritto:
>>>>>>>
>>>>>>>> Hello
>>>>>>>>
>>>>>>>> im still having trouble with ack and bye ...
>>>>>>>>
>>>>>>>> in inbound call my teams client stuck in "calling"
>>>>>>>>
>>>>>>>> and seems that dont like my ack
>>>>>>>>
>>>>>>>>
>>>>>>>> ====================
>>>>>>>> tag: snd
>>>>>>>> pid: 131292
>>>>>>>> process: 6
>>>>>>>> time: 1611683788.220244
>>>>>>>> date: Tue Jan 26 17:56:28 2021
>>>>>>>> proto: tls ipv4
>>>>>>>> srcip: 69.172.96.197
>>>>>>>> srcport: 5061
>>>>>>>> dstip: 52.114.75.24
>>>>>>>> dstport: 5061
>>>>>>>> ~~~~~~~~~~~~~~~~~~~~
>>>>>>>> ACK sip:+1010 at sip.pstnhub.microsoft.com:5061;transport=tls SIP/2.0
>>>>>>>> Record-Route: <sip:kml.call2teams.io:5061
>>>>>>>> ;transport=tls;r2=on;ftag=DKU70jvS4K86p;lr>
>>>>>>>> Via: SIP/2.0/TLS 69.172.96.197:5061
>>>>>>>> ;branch=z9hG4bKaf91.b6d38c1afb72b2dd4847cc3f7d99d698.0
>>>>>>>> v:SIP/2.0/UDP
>>>>>>>> 185.132.68.116;received=185.132.68.116;rport=5060;branch=z9hG4bKZXc92a9KDyUFg
>>>>>>>> Max-Forwards:69
>>>>>>>> f:"Davide Zanichelli"<sip:3454558075 at 185.132.68.116
>>>>>>>> >;tag=DKU70jvS4K86p
>>>>>>>> t:<sip:+1010 at sip.pstnhub.microsoft.com:5061
>>>>>>>> >;tag=25f6b5d613cb478aa1d495a391860101
>>>>>>>> i:9493b287-a2f6-4891-859c-231994af46d6
>>>>>>>> CSeq:31288100 ACK
>>>>>>>>
>>>>>>>> m:<sip:mod_sofia at 185.132.68.116:5060>
>>>>>>>> l:0
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Il giorno gio 21 gen 2021 alle ore 09:18 Davide Zanichelli <
>>>>>>>> dav.zanichelli at gmail.com> ha scritto:
>>>>>>>>
>>>>>>>>> Hello
>>>>>>>>> i dont understand why teams reply me 481 !!!
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> davide
>>>>>>>>>
>>>>>>>>> ||||||||||||||||||||
>>>>>>>>> ====================
>>>>>>>>> tag: snd
>>>>>>>>> pid: 102385
>>>>>>>>> process: 6
>>>>>>>>> time: 1611216424.610918
>>>>>>>>> date: Thu Jan 21 08:07:04 2021
>>>>>>>>> proto: tls ipv4
>>>>>>>>> srcip: 69.172.96.197
>>>>>>>>> srcport: 5061
>>>>>>>>> dstip: 52.114.75.24
>>>>>>>>> dstport: 5061
>>>>>>>>> ~~~~~~~~~~~~~~~~~~~~
>>>>>>>>> BYE sip:+1010 at sip.pstnhub.microsoft.com:5061;transport=tls SIP/2.0
>>>>>>>>> Record-Route: <sip:kml.call2teams.io:5061
>>>>>>>>> ;transport=tls;r2=on;ftag=7NFv9B0B3K6QB;lr>
>>>>>>>>> Record-Route: <sip:69.172.96.197:5060;r2=on;ftag=7NFv9B0B3K6QB;lr>
>>>>>>>>> Via: SIP/2.0/TLS 69.172.96.197:5061
>>>>>>>>> ;branch=z9hG4bK02e5.5f6af95bad6e683b84ebf07b31a7755f.0
>>>>>>>>> v:SIP/2.0/UDP
>>>>>>>>> 185.132.68.116;received=185.132.68.116;rport=5060;branch=z9hG4bK9j0gNmmXj9Q6D
>>>>>>>>> Max-Forwards:69
>>>>>>>>> f:"Davide Zanichelli"<sip:3454558075 at 185.132.68.116
>>>>>>>>> >;tag=7NFv9B0B3K6QB
>>>>>>>>> t:<sip:+1010 at sip.pstnhub.microsoft.com:5061
>>>>>>>>> ;user=phone>;tag=da13ee6f8a0f4277b597fa9fd40a783f
>>>>>>>>> i:781214b3-d662-1239-fc81-9259e6a86632
>>>>>>>>> CSeq:31054416 BYE
>>>>>>>>> User-Agent:FreeSWITCH-mod_sofia/1.6.20~64bit
>>>>>>>>>
>>>>>>>>> Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,PRACK,NOTIFY,PUBLISH,SUBSCRIBE
>>>>>>>>> k:precondition,100rel,path,replaces
>>>>>>>>> Reason:Q.850;cause=16;text="NORMAL_CLEARING"
>>>>>>>>> l:0
>>>>>>>>>
>>>>>>>>> ||||||||||||||||||||
>>>>>>>>> ====================
>>>>>>>>> tag: rcv
>>>>>>>>> pid: 102417
>>>>>>>>> process: 38
>>>>>>>>> time: 1611216424.629297
>>>>>>>>> date: Thu Jan 21 08:07:04 2021
>>>>>>>>> proto: tls ipv4
>>>>>>>>> srcip: 52.114.75.24
>>>>>>>>> srcport: 5061
>>>>>>>>> dstip: 69.172.96.197
>>>>>>>>> dstport: 5061
>>>>>>>>> ~~~~~~~~~~~~~~~~~~~~
>>>>>>>>> SIP/2.0 481 Call Leg/Transaction Does Not Exist
>>>>>>>>> FROM: "Davide Zanichelli"<sip:3454558075 at 185.132.68.116
>>>>>>>>> >;tag=7NFv9B0B3K6QB
>>>>>>>>> TO: <sip:+1010 at sip.pstnhub.microsoft.com:5061
>>>>>>>>> ;user=phone>;tag=da13ee6f8a0f4277b597fa9fd40a783f
>>>>>>>>> CSEQ: 31054416 BYE
>>>>>>>>> CALL-ID: 781214b3-d662-1239-fc81-9259e6a86632
>>>>>>>>> VIA: SIP/2.0/TLS 69.172.96.197:5061;branch=z9hG4bK02e5.5f6af95bad6e683b84ebf07b31a7755f.0,SIP/2.0/UDP
>>>>>>>>> 185.132.68.116;received=185.132.68.116;branch=z9hG4bK9j0gNmmXj9Q6D;rport=5060
>>>>>>>>> REASON:
>>>>>>>>> Q.850;cause=95;text="90301fea-2875-4a99-b6f0-25e35ff07710;Call leg
>>>>>>>>> unavailable"
>>>>>>>>> CONTENT-LENGTH: 0
>>>>>>>>> ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
>>>>>>>>> SERVER: Microsoft.PSTNHub.SIPProxy v.2021.1.15.7 i.EUWE.8
>>>>>>>>>
>>>>>>>>> Il giorno mer 20 gen 2021 alle ore 18:03 Richard Fuchs <
>>>>>>>>> rfuchs at sipwise.com> ha scritto:
>>>>>>>>>
>>>>>>>>>> On 19/01/2021 07.11, Daniel-Constantin Mierla wrote:
>>>>>>>>>> > Hello,
>>>>>>>>>> >
>>>>>>>>>> > I built rtpengine deb packages for debian just a few days ago
>>>>>>>>>> and all
>>>>>>>>>> > went fine. I used the file mr8.5.1.5.tar.gz from the github
>>>>>>>>>> releases
>>>>>>>>>> > of rtpengine project.
>>>>>>>>>> >
>>>>>>>>>> > However, I noticed that some past releases fail to build
>>>>>>>>>> because of
>>>>>>>>>> > the tests. I had to edit a bit the Makefile to disable the
>>>>>>>>>> tests target.
>>>>>>>>>>
>>>>>>>>>> If some of the tests are causing a problem, you can let me know
>>>>>>>>>> and I'll
>>>>>>>>>> see if they can be defused to make things work for everybody.
>>>>>>>>>>
>>>>>>>>>> Cheers
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Kamailio (SER) - Users Mailing List
>>>>>>>>>> sr-users at lists.kamailio.org
>>>>>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>> Kamailio (SER) - Users Mailing List
>>>>>>> sr-users at lists.kamailio.org
>>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Kamailio (SER) - Users Mailing List
>>>>>> sr-users at lists.kamailio.org
>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>>
>>>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> _______________________________________________
> 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/20210203/84f7e167/attachment.htm>


More information about the sr-users mailing list