Initiating RTMP streaming from Skype for Business / Lync clients
Skype for Business / Lync* clients can use the Infinity Gateway service to dial out to an RTMP streaming or recording service.
This allows those SfB/Lync clients to initiate a dedicated RTMP multimedia stream to enterprise CDN (Content Delivery Network) streaming and recording services such as Wowza, Quickchannel, Qumu, Microsoft Stream and Azure Media Services, and to public streaming services such as YouTube, Facebook and Periscope.
To do this, you must:
- Set up the streaming service and obtain the address to which the video stream will be sent (see Integrating with streaming and recording services for more information).
Set up a Call Routing Rule on Pexip Infinity that will match the contact address dialed from the SfB/Lync client and then call out to the streaming service.
The contact address dialed from the SfB/Lync needs to be based upon (but not the same as) the streaming URL as it must be in a format dialable from the SfB/Lync client (avoiding : and / characters). The routing rule will then transform the dialed address into the streaming URL and initiate the call over RTMP. By using suitable regular expressions (regexes), you can make your rule re-usable for future streaming URLS to the same service.
You can then supply the appropriate address to the SfB/Lync users that they can use to dial out to the streaming service.
For streaming services that always use a different stream name for every recording, you will have to provide the user with the address each time. If the streaming service supports a persistent URL (such as with Periscope or YouTube) they could add the address as a SfB/Lync contact for regular use.
See Using Pexip Infinity as a Skype for Business / Lync gateway for complete information about how to configure the Infinity Gateway to integrate with Skype for Business / Lync.
* Note that where this documentation refers to "SfB/Lync", it represents both Microsoft Skype for Business and Lync unless stated otherwise.
Let's assume that:
- The YouTube streaming URL is: rtmp://a.rtmp.youtube.com/live2/qtr9-c85x-dxmw-av4t
The address to be called from the SfB/Lync client is: email@example.com
i.e. it is in the format rtmp_<resource portion of the URL with / characters converted to _ characters>@<SIP domain routed to Pexip Infinity>
Your Call Routing Rule on Pexip Infinity should be configured like this:
|Incoming gateway calls||Ensure this option is selected.|
|Outgoing calls from a conference||Leave unselected.|
|Match Infinity Connect (WebRTC / RTMP)
Match Lync / Skype for Business (MS-SIP)
Select Match Lync / Skype for Business (MS-SIP) and leave the other protocols unselected.
(This rule is only handling call requests received from the SfB/Lync environment.)
|Match against full alias URI||Leave unselected.|
|Destination alias regex match||
Enter a regular expression that will match the format of the streaming address received from the SfB/Lync environment and uses match groups to allow the address elements to be rebuilt in the replace string. For example:
This expression matches:
See Regular expression (regex) reference for more information on using regular expressions and Pexip Infinity's inbuilt regex testing tool.
|Destination alias regex replace string||
The replace string must build the streaming URL to be dialed from Pexip Infinity, based on the elements extracted into match groups from the addressed dialed from the SfB/Lync client.
This builds the streaming URL based on "rtmp://" followed by match group 1, followed by "/" followed by match group 2, followed by "/" followed by match group 3.
|Protocol||Select RTMP (streaming).|
You can then call the alias from within the SfB/Lync client:
YouTube addresses with less variation
If your YouTube streaming URL addresses are more predictable, you can simplify your rule's alias regex matching logic. For example, if the streaming URLs always start rtmp://a.rtmp.youtube.com/live2/ you could use:
- SfB/Lync addresses in the format: youtube_<stream_name>@vc.example.com for example firstname.lastname@example.org
- The rule would then match against: youtube_([-a-z0-9]+)@vc\.example\.com
- The replace string would be: rtmp://a.rtmp.youtube.com/live2/\1
Some streaming services, such as Periscope, support persistent URLs i.e. the same URL can be re-used for subsequent streams. In these cases, streaming initiated from SfB/Lync clients can be simpler to use as you could store the address as a SfB/Lync contact for regular use.
Here is another example of addresses and rule matching, this time using Periscope. Let's assume that:
The Periscope streaming URL always takes the format rtmp://<prefix>.pscp.tv:80/x/<stream_name>
For example: rtmp://de.pscp.tv:80/x/w99qbwg1cz9x
The address to be called from the SfB/Lync client is in the format periscope_<resource portion of the periscope URL>_<stream_name>@<SIP domain routed to Pexip Infinity>
For example: email@example.com
In this case, you could configure your Call Routing Rule with:
- A regex match string of: periscope_([a-z][a-z]\.pscp\.tv)_([a-z0-9]+)@vc\.example\.com
- A replace string of: rtmp://\1:80/x/\2