Knowlege base

How to configure secondary server as master to import calls in Billy Blues

Article ID: 632
Last updated: 26 Jun, 2020
Applies from Application Suite 2016.1.1
to version Application Suite 201x (any version)

Applies to:

BillyBlues 4 for Cisco

Description:

This article explains how to enable the call processing of Billy Blue's on a secondary server of a n Application Suite cluster. This is useful if the primary server is out of order and it is likely to unavailable for a long time.

The article also describes the failback procedure to move the processing to the primary server as soon as it gets available again.

Requirements

  • The CuCM sends the CDRs to both servers via FTP. (PBX configuration)
  • The (redundancy) Billy Blue's license is active on the secondary server.

Notes

In a high-availability configuration of Billy BLue's, by default:  

  • The following Billy Blue's services are in "Stand-by" mode on the secondary server(s):
    • Recorder
    • Miner
    • Scheduler 
  • The directory <StonevoiceAS>\Apps\BillyBlues\Engine\ccm5cdr contains CUCM CDR files of the latest 10 days. Older files are automatically deleted to prevent the disk gets filled.
  • In order to prevent call data loss, the failover proceudre described by this article should be done in 10 days since the primary server fault.

How-to:

When the primary server has a problem and cannot import calls, we can choose two steps to follow:

A) Repair the primary server before the deadline of 10 days.

No configuration on the secondary server is needed, the calls on the secondary server are available.
The displayed calls are up to the day of the service disruption.
 

B) Configure the secondary server as master to start acquiring new calls.

This procedure can be performed at the latest 10 days after the blocking of the master server.

1. Verify that the Billing application is properly licensed on the secondary server.

2. Verify that the new CDRs are stored into the FTP directory, which corresponds to the local directory:
<StonevoiceAS>\Apps\BillyBlues\Engine\ccm5cdr\

3. Stop 'Blues Service Host' service on the master server from the webpage Billing | Administrative Pages | Service Manager  if needed.

4. Enable secondary server as master:

  • Edit the following file using Notepad
    <StonevoiceAS>\System\SvSasPlatforms.ini
  • Copy the name of the server that you find after this label: 'InstallationAddress ='
  • Edit the following file with Notepad
    <StonevoiceAS>\Apps\BillyBlues\Engine\BillingCluster.ini
  • Paste the server name you have copied previously to 'MasterHostName ='
  • Save and close the file.
  • Wait a minute and make sure that the Miner, Recorder and Scheduler services are active in the page Billing | Administrative Pages | Service Manager

5. Enable secondary server to import the new calls it could import some duplicate calls (Delete any duplicate calls)

  • Open the IAS database ('BluesPro' on older versions, normally ‘IAS’ on recent versions) using Microsoft SQL Management Studio or the HeidiSQL tool (contained in StonevoiceAS\Toubleshooting\HeidiSQL).
  • Make a Backup copy of the database.
  • Right-click on the 'BluesPro' database> Tasks> Back Up ... and wait the finish of the process.
  • Click [New Query]

6. If you are running an AppSuite 2020.3.1 or later version, run this SQL query to delete duplicated calls:

DELETE c1
FROM [BibCalls] c1
WHERE c1.[Id] NOT IN (
    SELECT MAX(c2.[Id])
    FROM [BibCalls] c2
    WHERE c1.[StartDate] = c2.[StartDate]
      AND c1.[StartTime] = c2.[StartTime]
      AND c1.[DurationInSeconds] = c2.[DurationInSeconds]
      AND c1.[SiteId] = c2.[SiteId]
      AND c1.[LocalPartyId] = c2.[LocalPartyId]
      AND c1.[RemotePartyId] = c2.[RemotePartyId]
      AND c1.[IsExternal] = c2.[IsExternal]
)
AND c1.[StartDate] BETWEEN
    DATEADD(dd, -20, DATEADD(dd, DATEDIFF(d, 0, GETDATE()), 0)) AND
    DATEADD(dd, DATEDIFF(d, 0, GETDATE()), 0)

7. If you are running an AppSuite older than 2020.3.1 version, run these 2 SQL queries to delete duplicated calls:

A) Duplicated external calls:

DELETE FROM Chiamate 
WHERE lPKId not in
( SELECT Max(C2.lPKId) FROM Chiamate as C2 
WHERE Chiamate.dData = C2.dData 
AND Chiamate.dOra = C2.dOra 
AND Chiamate.dDurata = C2.dDurata 
and Chiamate.sSito = c2.sSito
and Chiamate.sDerivato = c2.sDerivato
and Chiamate.sNumero = c2.sNumero )
and dData between  DATEADD(dd,-20,DATEADD(dd, DATEDIFF(d,0,getdate()), 0)) and DATEADD(dd, DATEDIFF(d,0,getdate()), 0)

B) Duplicated internal calls:

DELETE FROM ChiamateInterne
WHERE lPKId not in
( SELECT Max(C2.lPKId) FROM ChiamateInterneas C2 
WHERE ChiamateInterne.dData = C2.dData 
AND ChiamateInterne.dOra = C2.dOra 
AND ChiamateInterne.dDurata = C2.dDurata 
and ChiamateInterne.sSito = c2.sSito
and ChiamateInterne.sDerivato = c2.sDerivato
and ChiamateInterne.sNumero = c2.sNumero )
and dData between  DATEADD(dd,-20,DATEADD(dd, DATEDIFF(d,0,getdate()), 0)) and DATEADD(dd, DATEDIFF(d,0,getdate()), 0)


Failback procedure

When the primary server is repaired, make sure to set the current secondary server  in standby, following these steps:

1. Edit in the primary server this file with Notepad
<\StonevoiceAS>\System\SvSasPlatforms.ini

2. Copy the name of the server displayed after the label 'InstallationAddress ='

3. Edit in the primary server this file with Notepad
<\StonevoiceAS>\Apps\BillyBlues\Engine\BillingCluster.ini
of the secondary server (temporarily being the primary server).

4. Paste the copied new primary server name to 'MasterHostName ='

5. Save and close this file.

6. Wait a minute and make sure that the Miner, Recorder and Scheduler services are active in the page Billing | Administrative Pages | Service manager

7. Repeat steps 6-7 of the previous section to delete duplicate calls, if needed.

Article ID: 632
Last updated: 26 Jun, 2020
Revision: 7
Views: 261
Print Export to PDF Subscribe Share
This article was:  
Prev   Next
No calls or no recent calls displayed on Billy Blue's statistics...     Node in standby, the scheduler service is disabled on this...