WHMCS Integration Guide

In by castcontrol

Table of Contents

 

Release Notes / Changelog

2019-01-21 – STABLE Module

  • Added: Flussonic Support

2018-11-18 – STABLE Module

  • Added: Support for Liquidsoap Transcoder
  • Fixed: Issue with password generation for services that do not accept special characters

2017-07-03 – STABLE Module

  • Fixed: Error occuring on some WHMCS/PHP7 installations.

2017-05-08 – STABLE Module

  • Updated: Module is now updated to support WHMCS 7.1 and PHP7

Install the latest WHMCS Module

Please make sure you have the latest version of Media Control Panel.
You can check this from MediaCP Administration -> Software Updates.

  1. Login to https://clients.cast-control.net and select Services -> My Services.
  2. Select your active MediaCP license, select the Downloads Tab and download the appropriate module.
  3. Extract contents to your desktop and copy the extracted mediacp directory into [whmcs]/modules/servers.

 

Upgrade WHMCS Module

  1. Please review the Adding a server in WHMCS and ensure these steps are completed.
  2. Follow the steps provided in Install the latest WHMCS Module.
  3. Navigate to Setup -> Products/Services and select any MediaCP product/service.
  4. After the page loads, press F5 to refresh the page and this will automatically update the Module Settings fields.
  5. Verify the Module Settings fields are entered correctly.

 

Adding a server in WHMCS

Now that you have installed the MEDIACP Module for WHMCS, you will need to add a new server to WHMCS.

  1. Login to WHMCS and navigate to Setup -> Products/Services -> Servers.
  2. Press Add New Server and fill out the following fields:
    • Name -> Set this to the hostname of the machine on which MediaCP is running
    • IP Address -> Set this to the IP Address of the machine on which MediaCP is running.
    • Hostname -> Enter the complete URL to your MediaCP Installation, for example: http://yourdomain.com/mediacp/
    • Type -> Select Mediacp from the list.
    • Username -> Enter your MediaCP admin username.
    • Password -> Enter your MediaCP admin password.
    • Access Hash -> Enter your MediaCP API Key here

whmcs_servers_1

whmcs_servers_2

Creating a new product

You are now ready to create and configure your first product for the MediaCP.

  1. Navigate to Setup -> Products/Services. Then, click Create a new Product.
  2. Select Shared Hosting Account and select a suitable product group and name and click Continue.

new-product

3. Select Module Settings tab and fill out base settings as preferred.

whmcs_module_settings

4. Press Save Changes

OPTIONAL: Allow Customer to specify Publish Name

You can allow you customer to specify their preferred Publish Name by following these steps.

  1. Navigate to Setup->Products/Services. Then select an existing MediaCP product.
  2. Select the Custom Fields tab and Add New Custom Field with the following settings.
    • Field Name -> Publish Name
    • Field Type -> Text Box
    • Validation: /^[a-z\d_]{4,28}$/i
    • Check Required Field
    • Check Show on Order Form

whmcs_custom_field

Configurable Options

You can let your customers build their own packages by setting Configurable Options.

  1. Navigate to Setup->Products/Services -> Configurable Options.
  2. Press Create a New Group
  3. Configure the Group Name and Assigned Products then press Add New Configurable Option.
  4. Refer to the table below to build your package options. It is important that the options are labelled correctly, you can choose to use either the Configurable Option or Alternatives for the Option names.

 

 Configurable Option Alternatives Options Description 
 Media Service Shoutcast
Shoutcast 2
Shoutcast 198
Icecast
Icecast 2
Icecast 2 KH
Icecast KH
Wowza Streaming Engine
Flash Media Service
Windows Media Services
 Source AutoDJ Shoutcast Transcoder V1
Shoutcast Transcoder V2
Ices 0.4 (MP3)
Ices 2.0 (OGG)
Stream Transcoder V3
Alternatively, you can set this value to “Yes” and the module will automatically configure Shoutcast Transcoder V2.
 Source Reencode AutoDJ Reencode Yes
No
ICES 0.4 ONLY
 Connections Listeners
Viewers
Maximum Users
Maximum Listeners
Maximum Viewers
Numerical Value Enter a value between 0 and 9999.
 Bitrate Maximum Bitrate 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 400, 480, 560, 640, 720, 800, 920, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, 4096, 99999 Enter only one of the values in the options column. This may also contain “Kbps” at the end of the option value.
 Disk Usage Disk
Quota
Disk Quota
MB, GB or TB Specify a value including MB, GB or TB. For example: 100MB
 Data Transfer Transfer
Bandwidth
MB, GB or TB Specify a value including MB, GB or TB. For example: 100MB
 Historical Reporting Reporting
Advanced Reporting
Yes
No
Enabled or Disable Historical Reporting capabilities. Standard Usage tab will be displayed in either case.

Wowza Streaming Engine

 Configurable Option Alternatives Options Description 
 Wowza Media Type Service Type
Flash Media Service
Live Streaming
Live Streaming Low Latency
TV Station
Ondemand Streaming
Shoutcast/Icecast Relay
Live Camera Restream
 Live Authentication Yes
No
Wowza Streaming Engine ONLY.
 nDVR AddOn nDVR
nDVR Playback
Yes
No
Wowza Streaming Engine ONLY.
 Transcoder Transcoder Service Yes
No
Wowza Streaming Engine ONLY.
 Stream Recording Live Stream Recording Yes
No
Wowza Streaming Engine ONLY.
 RTMP RTMP Support
RTMP Service
Yes
No
Enable RTMP/RTSP links for Shoutcast & Icecast Services ONLY.

 

Flussonic Media Server

 Configurable Option Alternatives Options Description 
 Service Type Service Type Live Streaming
TV Station
Ondemand Streaming
 nDVR AddOn nDVR Yes
No

 

Custom Fields

Custom Fields allow customers to enter specific text values for some configurations.

Field Name Field Type Validation Description
Publish Name Text Box /^[a-z\d_]{4,28}$/i Available for all Media Service Types.

Customer can specify desired Publish Name. If not available, the name will automatically be updated.

Check the Required Field and Show on Order Form.

Shoutcast URL Text Box WOWZA SERVICES ONLY.

Customer can specify their Shoutcast Restream URL or IPCAM Restream URL.

Alternate field names can be:
Icecast URL
Restream Address
IPCAM URL
IPCAM Address

Wowza VHost Drop Down WOWZA SERVICES ONLY.

Admin Only.
Required Field.

Format:

VHOST:IP:RTMP_PORT:

Example:

_defaultVHost_:110.110.110.1:1935

 

Email Templates

You can use the following email templates for various services.

SHOUTCAST / ICECAST SERVICES

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS

Dear {$client_name},

Thank you for your order from us!

Your Shoutcast service has now been created and this email contains all the information you will need in order to begin using your services.

Hosting Control Panel
Service URL: {$service_server_hostname}
Username: {$service_username}
Password: {$service_password}

Media Service Information
{assign var=”shoutcast” value=”:”|explode:$service_domain}Host Address: {$shoutcast.0}
Port Base: {$shoutcast.1}

Streaming Username: admin
Streaming Password: {$service_password}

Admin Address: http://{$service_domain}/admin

{foreach from=$service_config_options item=data}{$data.option}: {$data.value}
{/foreach}

How to stream to your new service
1. Download and install Winamp from www.winamp.com
2. Download and install Winamp Shoutcast DSP Plugin from http://shoutcast.com/BroadcastNow
3. Enter your Service IP, Port & Password into the Shoutcast DSP Plugin then press connect.

Thank you for choosing us.

{$signature}

WOWZA STREAMING ENGINE SERVICES

Please note, this template assumes you have configured the “Publish Name” custom field as the first custom field.

PLEASE READ THIS EMAIL IN FULL AND PRINT IT FOR YOUR RECORDS

Dear {$client_name},

Thank you for your order from us!

Your media service has now been created and this email contains all the information you will need in order to begin using your services.

Hosting Control Panel
Service URL: {$service_server_hostname}
Username: {$service_username}
Password: {$service_password}

Media Service Information
RTMP: rtmp://{$service_dedicated_ip}/{$service_custom_fields.0}/{$service_custom_fields.0}
RTSP: rtsp://{$service_dedicated_ip}/{$service_custom_fields.0}/{$service_custom_fields.0}

{foreach from=$service_config_options item=data}{$data.option}: {$data.value}
{/foreach}

Adobe Media Flash Live Encoder Configuration
FMS URL: rtmp://{$service_dedicated_ip}/{$service_custom_fields.0}
Stream: {$service_custom_fields.0}
Username: {$service_custom_fields.0}
Password: {$service_password}

Thank you for choosing us.

{$signature}