WHMCS Integration Guide

WHMCS Integration Guide
2019-10-03 – STABLE Module
Fixed: WHMCS Module now sets AutoDJ sources limit to 1 instead of disabled when AutoDJ is configured
2019-09-04 – STABLE Module
Added: WHMCS 7.8 Support - Requires hostname change, please review "Adding a server in WHMCS" below. 2019-08-22 – STABLE Module Added: Transcoder Profiles option for MediaCP version 2.6+ 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.
  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.

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 any label describing the server

    • Hostname – Set this to the domain name of your MediaCP installation. For example only “mydomain.com” or “mediacp.net”. Do not include HTTP/HTTPS or the port number.

    • IP Address -> Set this to the IP Address of the machine on which MediaCP is running.

    • Type -> Select Media Control Panel from the list.

    • Username -> Enter your MediaCP admin username.

    • Password -> Enter your MediaCP admin password.

    • Access Hash -> Enter your MediaCP API Key here

    • Secure – Check this box if you have enabled SSL on your MediaCP panel.

    • Port – Port 2000 is the default port for MediaCP.

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

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

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 OptionAlternativesOptionsDescription 
 Media ServiceShoutcast
Shoutcast 2
Shoutcast 198
Icecast
Icecast 2
Icecast 2 KH
Icecast KH
Wowza Streaming Engine
Flash Media Service
Windows Media Services
 
 SourceAutoDJShoutcast 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 ReencodeAutoDJ ReencodeYes
No
ICES 0.4 ONLY
 ConnectionsListeners
Viewers
Maximum Users
Maximum Listeners
Maximum Viewers
Numerical ValueEnter a value between 0 and 9999.
 BitrateMaximum Bitrate24, 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, 99999Enter only one of the values in the options column. This may also contain “Kbps” at the end of the option value.
 Disk UsageDisk
Quota
Disk Quota
MB, GB or TBSpecify a value including MB, GB or TB. For example: 100MB
 Data TransferTransfer
Bandwidth
MB, GB or TBSpecify a value including MB, GB or TB. For example: 100MB
 Historical ReportingReporting
Advanced Reporting
Yes
No
Enabled or Disable Historical Reporting capabilities. Standard Usage tab will be displayed in either case.

Wowza Streaming Engine

 Configurable OptionAlternativesOptionsDescription 
Wowza Media TypeService Type
Flash Media Service
Live Streaming
Live Streaming Low Latency
TV Station
Ondemand Streaming
Shoutcast/Icecast Relay
Live Camera Restream
 
 Live AuthenticationYes
No
Wowza Streaming Engine ONLY.
nDVR AddOnnDVR
nDVR Playback
Yes
No
Wowza Streaming Engine ONLY.
TranscoderTranscoder ServiceYes
No
Wowza Streaming Engine ONLY.
Transcoder ProfilesTranscoder Profiles

160p
240p
360p
480p
576p
720p
1080p
2160p

Comma delimited list of transcoder profiles.

Available with MediaCP 2.6+

For example:
240p
360p,576p
240p,360p,480p
480p,750p,1080p
Stream RecordingLive Stream RecordingYes
No
Wowza Streaming Engine ONLY.
 RTMPRTMP Support
RTMP Service
Yes
No
Enable RTMP/RTSP links for Shoutcast & Icecast Services ONLY.

Flussonic Media Server

 
 Configurable OptionAlternativesOptionsDescription 
 Service TypeService TypeLive Streaming
TV Station
Ondemand Streaming
 
 nDVR AddOnnDVRYes
No
 

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

Field NameField TypeValidationDescription
Publish NameText 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 URLText 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 VHostDrop Down

WOWZA SERVICES ONLY.

Admin Only.
Required Field.

Format:

VHOST:IP:RTMP_PORT:

Example:

_defaultVHost_:110.110.110.1:1935

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
Service IP & Port: {$service_domain}
Streaming Username: dj
Streaming Password: {$service_password}

Admin Address: http://{$service_domain}/admin
Username: admin
Password: {$service_password}

{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}

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}