SOLVED

Teams Direct routing media bypass mode ICE controlled

%3CLINGO-SUB%20id%3D%22lingo-sub-1872373%22%20slang%3D%22en-US%22%3ETeams%20Direct%20routing%20media%20bypass%20mode%20ICE%20controlled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1872373%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20a%20strange%20scenario%20when%20I%20enabled%20media%20bypass%20on%20my%20SBC%20and%20thought%20to%20check%20with%20everyone%20here%20first%20before%20contacting%20MS.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOutbound%20calls%20from%20Teams%20to%20PSTN%20works%20with%20ICE%20being%20CONTROLLING%20from%20Teams%20end%20(FULL%20ICE)%20and%20once%20the%20call%20is%20established%20Teams%20starts%20nominating%20the%20ICE%20candidates%20via%20a%20re-invite%20and%20it's%20handled%20correctly%20and%20audio%20is%20flowing%20in%20both%20directions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInbound%20calls%20from%20PSTN%20to%20Teams%20is%20having%20a%20strange%20problem%20from%20Teams%20endpoint%20as%20the%20SBC%20should%20be%20ICE-LITE%20mode%20(controlled)%20and%20not%20doing%20any%20connectivity%20checks%20%2C%20just%20responding%20to%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20SDP%20being%20sent%20looks%20perfect%20like%20the%20following%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Ea%3Drtcp-mux%0Aa%3Dcrypto%3A1%20AES_CM_128_HMAC_SHA1_80%20inline%3A%2FMdAvE9GIDAg7H6ydytIrVyKbgrirK614YLxHj%2FF%7C2%5E31%0Aa%3Dice-lite%0Aa%3Dice-ufrag%3AwIoWCV4A%0Aa%3Dice-pwd%3AfD9WHcj3cCbNPcxDjU9Cp0AUEt%0Aa%3Dcandidate%3ACeTxOSQoHkYUy9st%201%20UDP%202130706431%20xxx.xxx.xxx.xxx%2030036%20typ%20host%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehowever%20Teams%20endpoints%20are%20sending%20their%20STUN%20requests%20as%20CONTROLLED%20!!%20while%20it%20should%20be%20CONTROLLING.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ice.png%22%20style%3D%22width%3A%20436px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F232635i3715B97E010415C7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ice.png%22%20alt%3D%22ice.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eyes%20audio%20is%20flowing%20fine%20but%20am%20not%20getting%20the%20nomination%20via%20the%20re-invite%20which%20of%20course%20is%20wrong%3C%2FP%3E%3CP%3Eany%20suggestions%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1872373%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECONTROLLED%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECONTROLLING%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EICE%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emedia%20bypass%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1956868%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20media%20bypass%20mode%20ICE%20controlled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1956868%22%20slang%3D%22en-US%22%3E%3CP%3EI%20see%20exactly%20the%20same%20issue.%20The%20result%20is%20that%2C%20for%20inbound%20calls%20from%20PSTN%2C%20the%20RTP%20flows%20comes%20directly%20from%20the%20Teams%20client%20to%20SBC%20but%20a%20media%20relay%20is%20used%20for%20the%20other%20way%20(sbc%20to%20Teams%20user).%20And%20there%20is%20no%20RE-INVITE%20sent%20to%20the%20SBC.%3C%2FP%3E%3CP%3EDid%20you%20get%20an%20answer%20from%20MS%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1956947%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20media%20bypass%20mode%20ICE%20controlled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1956947%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F891378%22%20target%3D%22_blank%22%3E%40Alain_Cougny%3C%2FA%3EYes%20make%20sure%20you%20have%20%3CSTRONG%3Ea%3Dice-lite%3C%2FSTRONG%3E%20in%20all%20requests%20sent%20to%20MS%20Teams%20to%20make%20sure%20SBC%20is%20in%20controlled%20state%20while%20Teams%20endpoints%20are%20full-ICE%20with%20controlling%20attribute.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1960503%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20media%20bypass%20mode%20ICE%20controlled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1960503%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774304%22%20target%3D%22_blank%22%3E%40afouad5%3C%2FA%3E%26nbsp%3BThanks%20.%20yes%2C%20a%3Dice-lite%20is%20included%20in%20the%20initial%20SIP%20INVITE%20sent%20by%20the%20SBC.%20And%20I%20still%20see%20ICE-CONTROLLED%20in%20the%20stun%20binding%20resquests%20coming%20from%20the%20called%20Teams%20agent.%3C%2FP%3E%3CP%3ESo%2C%20the%20issue%20on%20your%20setup%20is%20it%20fixed%20%3F%20Does%20your%20SBC%20receive%20a%20RE-INVITE%20(with%20a%3Dremote-candidates)%20and%20c%3D%20with%20the%20remote%20Teams%20agent%20IP%20address%20after%20it%20received%20the%20200%20OK%20%3F%26nbsp%3B%20Is%20it%20possible%20to%20have%20a%20trace%26nbsp%3B%3CSPAN%3Eof%20a%20call%20%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture1.png%22%20style%3D%22width%3A%20558px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F238103i2BAEEAB42C12A1A7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture1.png%22%20alt%3D%22Capture1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Enote%20%3A%20the%20issue%20is%20only%20for%20calls%20that%20are%20initiated%20by%20the%20SBC%20to%20a%20Teams%20agent.%20It%20works%20as%20expected%20for%20calls%20from%20Teams%20agent%20to%20SBC%20%3A%20SBC%20receives%20stun%20requests%20with%20ICE-CONTROLLING%2C%20RE-INVITE%20received%20by%20SBC%20(after%20it%20sends%20200%20OK)%20with%20c%3D%20indicating%20the%20Teams%20agent%20remote%20address.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20this%20link%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fopenspecs%2Foffice_protocols%2Fms-sdpext%2Ffca7a99e-5408-47a6-9793-5be0800df1a4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fopenspecs%2Foffice_protocols%2Fms-sdpext%2Ffca7a99e-5408-47a6-9793-5be0800df1a4%3C%2FA%3E%26nbsp%3B%20It%20is%20written%20%22%3CSPAN%3EThis%20means%20that%20the%20caller%20MUST%20send%20the%20ICE%20re-INVITE%22.%20I%20do%20not%20know%20if%20this%20is%20relevant%20for%20a%20SBC%20which%20supports%20only%20ice-lite%20but%20I%20was%20wondering%20if%20the%20SBC%20should%20send%20such%20RE-INVITE%20(maybe%20will%20it%20receive%20the%20remote%20IP%20address%20in%20the%20200%20OK%2Fc%3D%20attribute)%20and%20what%20to%20indicate%20in%20a%3Dremote-candidates%20attribute%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1974904%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20media%20bypass%20mode%20ICE%20controlled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1974904%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F774304%22%20target%3D%22_blank%22%3E%40afouad5%3C%2FA%3E%26nbsp%3BWe%20are%20doing%20a%20POC%20with%20our%20own%20SBC%20to%20check%20interoperability.%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20you%20had%20the%20same%20issue%20and%20as%20it%20seems%20to%20be%20fixed%20now%2C%20what%20would%20be%20nice%20is%20to%20have%20a%20sip%20trace%20%2F%20debug%20logs%26nbsp%3B%20of%20an%20outbound%20successfull%20call.%20Bellow%20the%20configuration%20of%20our%20sbc%20in%20O365%2C%20maybe%20is%20there%20something%20wrong%20(we%20tried%20to%20enable%20BypassMode%20%22Always%22%2C%20but%20no%20effect)%20%3F%20%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22CaptureMS.JPG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F239488i181551598EBA382D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CaptureMS.JPG%22%20alt%3D%22CaptureMS.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1974969%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20media%20bypass%20mode%20ICE%20controlled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1974969%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F891378%22%20target%3D%22_blank%22%3E%40AlainC%3C%2FA%3EPlease%20check%20%3CA%20href%3D%22https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc5245%23page-75%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc5245%23page-75%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%22ice-lite%22%20is%20a%20session-level%20attribute%20only%2C%20and%20indicates%20that%20an%0A%20%20%20agent%20is%20a%20lite%20implementation.%3C%2FPRE%3E%3CP%3EIn%20your%20trace%20you%20have%20it%20within%20the%20media%20part%20%2C%20once%20you%20have%20it%20in%20the%20right%20position%20before%20m%3Daudio%3C%2FP%3E%3CP%3Eyou%20will%20get%20the%20correct%20controlled%20state%20and%20nomination.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I've a strange scenario when I enabled media bypass on my SBC and thought to check with everyone here first before contacting MS.

 

Outbound calls from Teams to PSTN works with ICE being CONTROLLING from Teams end (FULL ICE) and once the call is established Teams starts nominating the ICE candidates via a re-invite and it's handled correctly and audio is flowing in both directions.

 

Inbound calls from PSTN to Teams is having a strange problem from Teams endpoint as the SBC should be ICE-LITE mode (controlled) and not doing any connectivity checks , just responding to them.

 

and SDP being sent looks perfect like the following

 

 

a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:/MdAvE9GIDAg7H6ydytIrVyKbgrirK614YLxHj/F|2^31
a=ice-lite
a=ice-ufrag:wIoWCV4A
a=ice-pwd:fD9WHcj3cCbNPcxDjU9Cp0AUEt
a=candidate:CeTxOSQoHkYUy9st 1 UDP 2130706431 xxx.xxx.xxx.xxx 30036 typ host

 

 

however Teams endpoints are sending their STUN requests as CONTROLLED !! while it should be CONTROLLING.

ice.png

 

yes audio is flowing fine but am not getting the nomination via the re-invite which of course is wrong

any suggestions ?

 

 

9 Replies

I see exactly the same issue. The result is that, for inbound calls from PSTN, the RTP flows comes directly from the Teams client to SBC but a media relay is used for the other way (sbc to Teams user). And there is no RE-INVITE sent to the SBC.

Did you get an answer from MS ?

@AlainCYes make sure you have a=ice-lite in all requests sent to MS Teams to make sure SBC is in controlled state while Teams endpoints are full-ICE with controlling attribute.

@afouad5 Thanks . yes, a=ice-lite is included in the initial SIP INVITE sent by the SBC. And I still see ICE-CONTROLLED in the stun binding resquests coming from the called Teams agent.

So, the issue on your setup is it fixed ? Does your SBC receive a RE-INVITE (with a=remote-candidates) and c= with the remote Teams agent IP address after it received the 200 OK ?  Is it possible to have a trace of a call ?

 

Capture1.png

note : the issue is only for calls that are initiated by the SBC to a Teams agent. It works as expected for calls from Teams agent to SBC : SBC receives stun requests with ICE-CONTROLLING, RE-INVITE received by SBC (after it sends 200 OK) with c= indicating the Teams agent remote address.

 

In this link https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-sdpext/fca7a99e-5408-47a6-9793-5be080...  It is written "This means that the caller MUST send the ICE re-INVITE". I do not know if this is relevant for a SBC which supports only ice-lite but I was wondering if the SBC should send such RE-INVITE (maybe will it receive the remote IP address in the 200 OK/c= attribute) and what to indicate in a=remote-candidates attribute

Hi @AlainC
What is your SBC model ?

@afouad5 We are doing a POC with our own SBC to check interoperability. 

As you had the same issue and as it seems to be fixed now, what would be nice is to have a sip trace / debug logs  of an outbound successfull call. Bellow the configuration of our sbc in O365, maybe is there something wrong (we tried to enable BypassMode "Always", but no effect) ? :

CaptureMS.JPG

 

 

 

 

 

 

 

 

 

Thanks

best response confirmed by afouad5 (Occasional Contributor)
Solution

@AlainCPlease check https://tools.ietf.org/html/rfc5245#page-75

 

"ice-lite" is a session-level attribute only, and indicates that an
   agent is a lite implementation.

In your trace you have it within the media part , once you have it in the right position before m=audio

you will get the correct controlled state and nomination.

@afouad5 , many thanks, it works now :)

Hello @afouad5 

 

With our SBC, everything works fine in media bypass mode except when the SBC sends a hold and retrieve (REINVITE with a=inactive for HOLD, REINVITE with a=sendrcv for RETRIEVE). Then we have a similar issue (one-way voice path)

Description :

- before the HOLD, the ice is completed and RTP flows are properly exchanged between the SBC and the Teams agent.

- To the REINVITE offer with a=inactive, MS Proxy replies an answer with new candidates and c=media relay IP@. No REINVITE from MS Proxy to conclude the ice handshake. I guess it is normal, as the voice traffic is on hold. Voice traffic is stopped on both ways (OK)

- To the REINVITE offer with a=sendrcv, MS Proxy replies an answer with the same candidates as the previous anwer

- But no RE-INVITE from MS Proxy to conclude the ice handshake. The SBC receives RTP flow from teh MS client and sends flow to the Media Relay. The Teams client hears nothing but the voice path Teams client -> SBC is fine.

- During all the session (before the HOLD, between the HOLD and RETRIEVE an after the RETRIEVE, the SBC receives STUN binding requests from the Teams client every seconds with ICE-CONTROLLING and the SBC properly answers to all these STUN requests

- After around 20 seconds, MS Proxy sends a BYE with reason "CallEndReasonMediaError"

 

Attached the sip trace (@IP replaced by XXXX for SBC and YYYY for the teams client)

 

Thanks for your feeback