Call Transfer: Using SIP REFER
Microsoft Teams does not naturally send a REFER message to your PBX when a call is transferred or parked. This causes broken SIP flows or incomplete information for normal processing. To use REFER you must opt in to that functionality on each direct route.
Benefits of enabling REFER:
Call parking and transferring will work as is typical.
Drawbacks of enabling REFER:
Attended transfers will not work unless the PBX hairpins the transferred call back to Teams where the media is anchored.
The only supported codec is G.711
In Netsapiens versions earlier than v43.2, there is a known compatibility issue with Netsapiens and Microsoft with transfers. Netsapiens does not send a NOTIFY to let Microsoft know the status of the transfer; it sends a BYE instead. The Netsapiens workaround is to NOT enable REFER in the ConnecttoTeams portal; this lets ConnecttoTeams' SBC handle processing of the REFER instead of asking the PBX to handle it (incorrectly).
Pro Transfer
Pro Transfer is an enhanced transfer option that allows the Direct Routing PBX Teams user to transfer calls in several ways:
Transfer BY NAME to another Teams user (whether or not that user is configured with a Direct Routing number or extension)
Transfer by PBX extension number
Transfer to PSTN number via the PBX
Enabling the Pro Transfer requires some changes in both the Direct Routing setup and also on the PBX, as described below.
On the ConnecttoTeams Side
We make a DNS change to cause the Direct Route domain to resolve to a different profile on the SBC that is configured to deal with the Pro Transfer calls.
Note
Since this will impact ALL transfers made on that Direct Route, we suggest first creating a separate Direct Route on your internal Enterprise for testing your PBX handling of the Pro Transfer scenario. A couple of test users can be assigned to that direct route to test the various transfer scenarios. Once that works, then we can make the change to your main direct route domain.
Enabling this feature on your customers is pretty trivial – just let us know and we can make the DNS change for their Direct Route domain(s).
On the PBX
The only difference in call handling on the PBX will involve transfers by a Teams Direct Routing user to another Teams user by-name who is NOT a DR user. We are able to “fix” transfers by-name to other Teams DR users so that they can be handled like any other transfer.
In the case of a transfer to a non-DR user, we will construct a Refer-To
header with a special prefix 0770 and a special domain edge.connecttoteams.com
.
For example:
Refer-To: <sip:[email protected];x-refer-id=fa7016f8-d4a1-11ef-aa21-0022482b9ee7>
There is also a x-refer-id
param which would be helpful to include on the resulting INVITE
, but isn’t strictly necessary.
Routing rules on the PBX must be configured to recognize this 0770 prefix and process the call as described below.
The resulting INVITE
should be created in the typical way but routed to edge.connecttoteams.com
:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 37.27.0.198:5060;branch=z9hG4bK75a620bf
Max-Forwards: 70
From: <sip:[email protected]>;tag=as51cbf31a
To: <sip:[email protected]>
When we get that INVITE
with the 0770 prefix we are able to reconstruct the necessary headers and send the INVITE
to Teams to complete the transfer.
Example Configuration for Asterisk
These are example changes for Pro Transfer for an Asterisk PBX.
In extensions.conf
(Dialplan):
exten => _0770X.,1,Dial(PJSIP/${EXTEN}@edge.connecttoteams.com)
In pjsip.conf
:
[edge.connecttoteams.com]
type=endpoint
aors=edge.connecttoteams.com
disallow=all
allow=ulaw
[edge.connecttoteams.com]
type=aor
contact=sip:edge.connecttoteams.com:5060