You are on page 1of 29

Technical Handover Document

BTEL CRBT

August 2014 - Version: 1.0


Copyright © 2014, All Rights Reserved
This document is the property of, and is proprietary to PT Bakrie Telecom. It is not to be
disclosed in whole or in part without the express written authorization of PT Bakrie Telecom.

Packet Data Serving Node Surabaya - Technical Handover Document


August 2008 Stictly Confidential

1
APPROVAL SHEET

Document Name BTEL RBT - Technical Handover

Number of Page 42

Issue Date August 10, 2014

Revision Code 1.0

Prepared by Reviewed by

Name : Wisnu Widya Wirawan Name : Febry

Title : IP Packet Switch Specialist Title : Data Service Manager

Department : Data Core Engineering Department : NOC Data Service

Division : VAS & Data Core Engineering Division : NOC

Group : Network Services Group : Network Services

Acknowledged by Reviewed by
Name : Suryo Cahyono Name : Untung

Title : General Manager Title : Specialist Data Service

Department : Department : NOC Data Service

Division : VAS & Data Core Engineering Division : Network Operation Center

Group : Network Services Group : Network Services


TABLE OF CONTENT

APPROVAL SHEET......................................................................................................................................2
TABLE OF CONTENT..................................................................................................................................3
INTRODUCTION..........................................................................................................................................4
PREFACE....................................................................................................................................................4
ASTERISK OVERVIEW...................................................................................................................................4
RBT REQUIREMENT.....................................................................................................................................5
CONTENT MANAGEMENT.............................................................................................................................6
REPORTING...................................................................................................................................................6
NETWORK OVERVIEW.............................................................................................................................8
TOPOLOGY DIAGRAM..............................................................................................................................8
RBT SERVICE DIAGRAM..............................................................................................................................9
PHYSICAL CABLE WIRING IN RBT SERVER RACK.....................................................................................10
DETAIL INFORMATION...........................................................................................................................11
CONSEPTUAL DATA MODEL.......................................................................................................................11
SYSTEM CAPACITY.....................................................................................................................................11
SYSTEM RELIABILITY.................................................................................................................................12
FILE SYSTEM..............................................................................................................................................12
API / EVENT INTERFACE............................................................................................................................13
DEVICE INFORMATION..........................................................................................................................14
PROJECT TIME FRAME.............................................................................................................................19
INTRODUCTION

PREFACE
The purpose of this document is to provide a seamless handover from Data Core
Engineering to the Network Operation Team. This document provides technical
information of RBT Server in Taman Rasuna along with all configuration assistance. The
purpose of this document is to provide the network operation team with sufficient
information to effectively support from the time the network carries live user traffic.

This document will be a baseline and will not be updated as the network changes by
operation team.

Asterisk Overview
Asterisk was VOIP softswitch that can be designed to produce PBX system under IP
based network. They designed to run on numerous operating and hardware
independence. CPU load will always depend on coding that have been used, more
complex codes (in example : G729, speex) will increase processor load dramatically

Asterisk Capability

 Telephony gateway (TDM channels - PRI,POTS)


 VoIP Gateway (IP channels)
 IVR system (Interactive Voice Response)
 Voicemail System
 Scriptable telephony-to-anything (Perl, C, etc.)
Asterisk Scalable Communication Function

Call Flow

 Calls come in on channels and are then handed to the “extensions.conf” file,
which is the dialplan
 Dialplan contains logical sections of matches called ‘Contexts,’ and each channel
sends a call into the dialplan with a context name and a dialed number.
 The dialplan then matches (with modified regexp’s) the number being dialed, and
runs applications accordingly
 Each match on the dialed number has an order of steps called ‘Priorities’, and are
indicated with an integral incrementing number.
 All
RBT Requirement
a) Basic
 Basic feature only allow user to subscribe 1 song/RBT

b) Copy
 User will be able to copy B# RBT’s by pressing 5 (after pre-announcement during
call setup)
 Registration process will be the same as other activation channel without double
confirmation ((for example: USSD, CRM, Web, IVR) on pre-announcement, will
inform tariff to avoid complaint)
RBT Copy is still under development on Asterisk Server

Content Management

a) BTEL

BTEL will be able to manage CRBT using CMS.


The CMS is an interface that will let BTEL manage the contents, approval, campaign, bulk
upload and partner registration.
I. Content
• BTEL should be able to upload contents or modify
• BTEL should be able to create ALIASES and modify
• BTEL should be able to approve request of content submission from partner

II. Bulk Upload


• BTEL should be able to do bulk upload of contents using metadata (or other
ways of bulk uploading). Sample Meta Data needed
• BTEL should be able to do bulk upload of subscribers using DN List (format
file TBD)

Reporting
Reporting tools will be use to view transactions as well as subscriptions traffic. BTEL will be able
to see data of all partners while Partner will be able to see only it’s own data. Below are
requirements for the reporting tools:
a) Subscribers Data
• Able to view subscribers data based on status (for example: active, new, suspension,
monthly, weekly, daily, churn, etc)
• Able to view subscribers data based on certain date, daily, weekly, monthly, or
periodically
• Able to export data to offline file (example: xls or pdf)
• Longevity
• Statistics based on period comparison
b) Transactions Data
• Able to query transactions based on partner (success, fail, NEF, etc)
• Able to query transactions based on certain date, daily, weekly, monthly, or
periodically
• Able to query transactions based on album, artist, or song
• Able to export data to offline file (example: xls or pdf)
• Able to view top songs on certain period
• Able to view top artists on certain period
• Able to view top partner on certain period
• Able to view transactions based on channel activation
• Statistics based on partner Monthly performance
c) Reconciliation Report
• Able to generate reconciliation report based on Period & Partner
• Able to generate reconciliation report based on detail song per partner per period
and revenue share
NETWORK OVERVIEW

Equipement covered in this document includes:


1. RBT Server
2. Cisco Switch 2960

TOPOLOGY DIAGRAM

Diagram included in this documentation are:

 RBT Service Diagram


This diagram shows the detail connectivity beetwen RBT server with other node
for RBT service
 Physical Cable Wiring in NOC Taman Rasuna
This diagram shows detail connectivity and wiring between RBT Server and PE
Router
RBT Service Diagram

CRBT Signaling Flow


In case subscriber A calling to subscriber B:
1. Subscriber A connect to MSC A.
2. MSC A send IAM to MSC B.
3. MSC B check information about Subcriber B in HLR B.
4. HLR response to MSC B that sub B is active and use CRBT Service.
5. MSC B send ACM to MSC A
6. MSC B send IAM to CRBT system
7. CRBT System check information (ANIS, DNIS ) in CRBT system and send ACM
to MSC B.
8. After that, CRBT System send ANM to MSC B
9. From this time, CRBT System will play song and sub A can listen song.
10. In this time, MSC B is paging Sub B.
11. If Sub accept this call, Sub A and B will conversation, MSC B send REL to CRBT
System.
12. After that, CRBT send RLC to MSC B for finish connection with CRBT System

CRBT Platform Structure


1. CRBT Player
Two server are developed using Asterisk software under Centos OS 6.5. Codec
translation wasn’t supported due to free software license agreement. Database
MySQL database are used by the service to handle transaction under service test
and development, but InnoDB will be used for real implementation

2. CMS
Registration by CMS are triggered by SMS or SOA which come from website or
direct registration by customer with dial the tone. CMS admin also have ability to
sent from and stored all music and metadata file to RBT Server under directory
/var/music/

Physical Cable Wiring in RBT Server Rack

For each RBT server have four external port which consist of two Ethernet port and two
gigaethernet port. In current development just two port will be used, one for OAM and
others for signaling and traffic.

Switch
Server Name Port IP Address Gateway
Port VLAN ID
OAM
RBT01 eth0 172.19.90.50/28 172.19.90.49 GI 1/1
RBT02 eth0 172.19.90.51/28 172.19.90.49 Gi 1/2 801
Catalyst 2960 172.19.90.52/28 172.19.90.49
Signaling
RBT01 eth1 172.31.13.130/28 172.31.13.129 Gi 1/3
802
RBT02 eth1 172.31.13.130/28 172.31.13.129 Gi 1/4
DETAIL INFORMATION

Server Information

Server Specification
No. Server
OS Server Model RAM HDD

IBM System
x3650 M3
2x146 GB (RAID 1) + 3x300
1 RBT01 Intel Xeon CPU 16 GB
GB (RAID 5)
E5680
Centos 6.5 @3.33GHz
64bit IBM System
x3650 M3
2x146 GB (RAID 1) + 2x300
2 RBT02 Intel Xeon CPU 8 GB
GB (RAID 1)
E5680
@3.33GHz
Cisco
Cisco Switch
3 Switch
2960
2960

Conseptual Data Model

There are four main table under database, which is : customer, subscribe, song, label.
Additional provisioning table consist of username, password and IP for provisioning.

System Capacity
Based on stress test using SIPP software, both server was able to handle around 1000
concurrent call with Mean Holding Time (MHT) 20 seconds.
Music file capacity is around 500 GB for each server, which can handle around 2 millions
song (with average sample wave song file format at around 500kB)
CDR capacity are expected to handle around one week log

System Reliability
a. Load Sharing Mode Server
RBT Player (Asterisk) are working on load sharing mode with percentage mode, due to
different system capacity on the server. One server have 16 GB of RAM and the other
only have 8 GB of RAM. The percentage of traffic sharing are configured on GMSC, and
on emergency case when one server down, GMSC must be manually configure to whole
traffic to the active server, otherwise the traffic will be sent to the deactive server which
make user will not hear a tone

b.Backup Data Proses


RBT Database is using MySQL which work on active standby mode with first priority on
RBT01 server
Backup data process in the server can be perform manually and automatically.
Automatically using schedule data backup to replicate database to another RBT DB
Server, and manually to data warehouse system

File System
Whole configuration for RBT was stored under MusicOnHold.conf and extension.conf.
MusicOnHold file contains file type and file directory to play on RBT player, meanwhile
extension file contains rule for service user. Both file was called by configuration script
to relate the rule to whole acknowledge user on the database.
AGI script are deliver build in scriptable to allow passing of data back and forth between
Asterisk and external programs
API / Event Interface
1. User Registration
Authentication based on : Username, Password and Client IP. This user information will
be stored under RBT Server Database

There are three main API that will be used on implementation which is : activatication,
deactivation and status query

Activate : http://172.19.90.50/rbtApi.php?
dn=<DN>&status=A&user=<API_USER>&pass=<API_PASS>&song=<SONG_ID>
Deactivate : http://172.19.90.50/rbtApi.php?
dn=<DN>&status=D&user=<API_USER>&pass=<API_PASS>
Query : http://172.19.90.50/rbtApi.php?
dn=<DN>&status=Q&user=<API_USER>&pass=<API_PASS>

Result for activation/deactivation: STATUS:[0(success)|1(FAIL)],DESC=<DETAIL


DESC>
Result for query: STATUS:[0(success)|1(FAIL)],DESC=<DN> <ACTIVE|NOT
ACTIVE>

2. Song Registration

http://172.19.90.50/rbtAPI_Song.php?
status=A&song_id=xxxxxxx&song_title=xxxxx&user=xxxx&pass=xxxxx

http://172.19.90.50/rbtAPI_Song.php?
status=D&song_id=xxxxxxx&user=xxxx&pass=xxxxx
DEVICE INFORMATION

IBM System x3650 M3 (7945-52A)

Form factor/height Rack/2U


Up to two 3.46 GHz six-core (3.60 GHz four-core) Intel Xeon 5600 series
Processor (max)
processors with QuickPath Interconnect technology
Number of processors
1/2
(std/max)
Cache (max) Up to 12 MB L3
288 GB DDR-3 RDIMMs via 18 DIMM slots or 48 GB DDR-3 UDIMMs via 12
Memory (max)
DIMM slots
Expansion slots 4
Disk bays (total/hot
Up to sixteen 2.5 in. hot-swap SAS/SATA HDDs or SSDs
swap)
Maximum internal
Up to 16 TB (hot-swap SAS/SATA)
storage
Network interface Integrated 2 ports, plus 2 ports optional Gigabit Ethernet
Power supply (std/max) 1/2; 460 W, 675 W, 675 W high efficiency or 675 W DC (model dependent)
Hot-swap components Power supplies, fan modules, disks
6 Gbps RAID-0, -1, -10 or 6 Gbps RAID-0, -1, -10, -5, -50 with 256 MB or 512
RAID support
MB cache and additional option battery backup (model dependent)
NEBS 1/ETSI
Equivalent compliance for both AC and DC power supply (model dependent)
compliance
Energy-efficiencyCompliant with 80-PLUS® and ENERGY STAR® energy-efficiency standards
compliance (model dependent)
IBM IMM with Virtual Media Key for optional remote presence enablement,
Predictive Failure Analysis, Diagnostic LEDs, light path diagnostics panel,
Systems management
Automatic Server Restart, IBM Systems Director and IBM Systems Director
Active Energy Manager™
Microsoft Windows Server 2008 R2 and 2008, Red Hat Enterprise Linux, SUSE
Operating systems
Linux Enterprise Server, VMware ESX and ESXi, Oracle Solaris 10 (model
supported
dependent), Centos

Content Specification

Bit Rate : 128 kbps


Audio Sample Size : 16 bit
Channels : 1 (mono)
Audio Sample Rate : 8 kHz
Audio Format : PCM

CDR Location :
/var/log/asterisk

Data Collection Manually


[root@rbt02 cdr-csv]# gunzip -c Master.csv-20140908.gz | grep 2193534385
[root@rbt02 cdr-csv]#

[root@rbt02 cdr-csv]# cat Master.csv | grep 2193534385


"","02193534385","11112192649944","rbt","02193534385","SIP/192.168.36.69-
00000b29","","MusicOnHold","112235","2014-09-08 11:02:30","2014-09-08 11:02:30","2014-09-08
11:02:37",7,7,"ANSWERED","DOCUMENTATION","1410148950.2857",""
"","02193534385","11112192603049","rbt","02193534385","SIP/192.168.36.69-
00000c9e","","MusicOnHold","112235","2014-09-08 15:12:19","2014-09-08 15:12:19","2014-09-
08 15:12:26",7,7,"ANSWERED","DOCUMENTATION","1410163939.3230",""
Hardware Test

Table 1 Hardware Installation

Test No. 1 Revision: 1.0 Author: Wisnu Widya Wirawan Date: 28-8-2014

Test Category: Connectivity Test Standard/Optional: Standard

Hostname: RBT01/RBT02

Precondition

Test Title: Hardware Installation

Test Purpose: Verify hardware was installed properly with hardware installation standard
Procedure: Check rack, cabling and label whether attached properly at the site

Expected Result : All hardware are installed properly

Result :
Additional Note (In Emergency Case):

Table 2 Interface Connectivity

Test No. 2 Revision: 1.0 Author: Wisnu Widya Wirawan Date: 28-8-2014

Test Category: System Audit Test Standard/Optional: Standard

Hostname: RBT01/RBT02

Precondition OS and Application already installed as per service standard

Test Title: Interface Connectivity

Test Purpose: Verify that server can be maintenance locally and remotely
Procedure: 1. Login prompt should be present when connect PC using standard Ethernet cable to
Console Port
2. Perform remote session using SSH to both of server alternally

Expected Result :

Result : Server can be remotely maintenance via SSH connection and locally through Console port

Additional Note (In Emergency Case):


Table 3 OS and Application Check List

Test No. 3 Revision: 1.0 Author: Wisnu Widya Wirawan Date: 28-8-2014

Test Category: System Audit Test Standard/Optional: Standard

Hostname:

Elements Managed (NMS Tests):

Test Title: OS and Application Check

Test Purpose: Verify OS and application are meet the service requirement
Procedure: 1. Check OS version, upgrade and update repository
2. Check Asterisk Version and state
3. Checking MySQL version and state

Expected Result : All application under OS on normal state

Result : All application on normal state

Additional Note (In Emergency Case):

Table 4 NTP Connectivity

Test No. 1 Revision: 1.0 Author: Wisnu Widya Wirawan Date: 28-8-2014

Test Category: Connectivity Test Standard/Optional: Standard

Hostname:

Elements Managed (NMS Tests):

Test Title: NTP Connectivity

Test Purpose: Network time should be configured properly for time synchronization
between hardware
Procedure: 1. Setting NTP IP server at /etc/ntp.conf
2. Check time using “date” command

Expected Result :

Result : 3. Perform one server shutdown, and confirm the service still work properly

Additional Note (In Emergency Case):


Table 5 SNMP Connectivity

Test No. 2 Revision: 1.0 Author: Wisnu Widya Wirawan Date: 28-8-2014

Test Category: Connectivity Test Standard/Optional: Standard

Hostname:

Elements Managed (NMS Tests):

Test Title: SNMP Connectivity

Test Purpose: Server can be monitored via NMS


Procedure: 1. Configure NMS IP at snmpd file on the server (/etc/snmp/snmpd.conf)
2. Test SNMP walk at client
snmpwalk -v 2 -c public -O e 127.0.0.1
3. Configure Client IP and community name at NMS ( in current network are BTEL
Zabbix NMS)
4. Make service stop or shutdown the server

Expected Result : Node can be monitored on NMS and alarm notification will send by NMS when problem appears

Result : Hardware performance can be monitored can be properly monitored through NMS

Additional Note (In Emergency Case):

NSM Info : http://172.16.8.18/zabbix/

RBT01 Service Application Test

StatusDescription : Asterisk Service to RBT01 is PROBLEM


Host Group : DataService_RBT
ValueDescription : Down (0)
Severity : Major
IP_Address : 172.19.90.50
Start Time : 2014.09.05 | 09:33:13

StatusDescription : Asterisk Service to RBT01 is OK


Host Group : DataService_RBT
ValueDescription : Up (1)
Severity : Major
IP_Address : 172.19.90.50
Start Time : 2014.09.05 | 09:38:10
StatusDescription : Apache service to RBT01 is PROBLEM
Host Group : DataService_RBT
ValueDescription : Down (0)
Severity : Major
IP_Address : 172.19.90.50
Start Time : 2014.09.05 | 09:48:11

StatusDescription : MySQL Service to RBT01 is PROBLEM


Host Group : DataService_RBT
ValueDescription : Down (0)
Severity : Major
IP_Address : 172.19.90.50
Start Time : 2014.09.05 | 09:48:11

StatusDescription : MySQL Service to RBT01 is OK


Host Group : DataService_RBT
ValueDescription : Up (1)
Severity : Major
IP_Address : 172.19.90.50
Start Time : 2014.09.05 | 09:53:11

StatusDescription : Apache service to RBT01 is OK


Host Group : DataService_RBT
ValueDescription : Up (1)
Severity : Major
IP_Address : 172.19.90.50
Start Time : 2014.09.05 | 09:53:11

RBT02 Service Application Test

StatusDescription : Apache service to RBT02 is OK


Host Group : DataService_RBT
ValueDescription : Up (1)
Severity : Major
IP_Address : 172.19.90.51
Start Time : 2014.09.05 | 10:03:15

StatusDescription : MySQL Service to RBT02 is OK


Host Group : DataService_RBT
ValueDescription : Up (1)
Severity : Major
IP_Address : 172.19.90.51
Start Time : 2014.09.05 | 10:08:16
StatusDescription : Asterisk Service to RBT02 is OK
Host Group : DataService_RBT
ValueDescription : Up (1)
Severity : Major
IP_Address : 172.19.90.51
Start Time : 2014.09.05 | 10:03:15

StatusDescription : MySQL Service to RBT02 is PROBLEM


Host Group : DataService_RBT
ValueDescription : Down (0)
Severity : Major
IP_Address : 172.19.90.51
Start Time : 2014.09.05 | 09:58:14

StatusDescription : Apache service to RBT02 is PROBLEM


Host Group : DataService_RBT
ValueDescription : Down (0)
Severity : Major
IP_Address : 172.19.90.51
Start Time : 2014.09.05 | 09:58:15

StatusDescription : Asterisk Service to RBT02 is PROBLEM


Host Group : DataService_RBT
ValueDescription : Down (0)
Severity : Major
IP_Address : 172.19.90.51
Start Time : 2014.09.05 | 09:55:47

Table 61 Load Sharing Server

Test Category: Reliability Test Standard/Optional: Standard

Hostname: RBT01/RBT02 Server


Elements Managed (NMS Tests):

Test Title: Single Server Service

Test Purpose: Perform one server shutdown, and confirm the service still work properly
Procedure: 1. Shutdown interface port which handle signalling to MGW and GMSC on one of
RBT Service
ifconfig eth1 down
2. Check service for both server, make sure no user was handle by inactive server, and
new transaction are handled by RBT active server
asterisk –rvvvv (check transaction log at both server)
3. Check user experience, make sure Ring Back Tone are responsed and played
properly

Expected Result : RBT Server was working on load sharing mode. If one of the server are down, the service will be not
interrupted

Result : When one server are down, GMSC still try to route the user to inactive server, that’s make the
user got silent ring back tone for a while

Additional Note (In Emergency Case): When one server down, changing routing on GMSC to send SIP only to active
RBT server

Table 7 Black Out Service Server

Test No. 1 Revision: 1.0 Author: Wisnu Widya Wirawan Date: 28-8-2014

Test Category: Reliability Test Standard/Optional: Standard

Hostname: RBT01/RBT02 Server

Elements Managed (NMS Tests):

Test Title: Black Out Service Server

Test Purpose: Perform shutdown on both server, and confirm the ring back tone service will
be changed to standard tone response
Procedure: 1. Shutdown interface port which handle signalling to MGW and GMSC on both of
RBT Service
ifconfig eth1 down
2. Check service for both server, make sure no user was handle by inactive server
asterisk –rvvvv (check transaction log at both server)
3. Check user experience

Expected Result : RBT song will be not played due to RBT Server down, ring back tone will be on default mode from
MGW

Result : User got silent ring back tone


Additional Note (In Emergency Case): Need to deactivate route to RBT server

PROJECT TIME FRAME

DEVELOPMENT COST

Development Cost

Server Specification
No. Server Server
OS RAM HDD
Model
IBM
System 2x146 GB
x3650 M3 (RAID 1) +
1 RBT01 16 GB
Intel Xeon 3x300 GB
CPU E5680 (RAID 5)
Centos 6.5 @3.33GHz
64bit IBM
System 2x146 GB
x3650 M3 (RAID 1) +
2 RBT02 8 GB
Intel Xeon 2x300 GB
CPU E5680 (RAID 1)
@3.33GHz
HP Proliant
DL380 G5
Server 2x146 GB
(RAID 1) +
3 CMS Intel(R) 12 GB 4x146GB
Xeon(R)
(RAID 5)
CPU 5110
@ 1.60GH
Cisco Cisco
4 Switch Switch
2960 2960

/etc/asterisk/

root@rbt01 asterisk]# more sip.conf


[general]
context = rbt
allowguest = yes
allowoverlap = no
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = no
disallow = all
allow = ulaw
;allow = g729
allow = alaw
allow = gsm
allow = slin
alwaysauthreject = yes
canreinvite = no
nat = yes
session-timers =refuse
externrefresh = 15
subscribecontext = default
;media_address = 172.19.31.138
;dtmfmode=rfc2833
;prematuremedia = no
;progressinband = yes
;localnet=172.16.12.0/255.255.255.0
;useragent=

[gmsc]
type=friend
host=192.168.36.69
context=gmsc
qualify=1000|yes

[22222]
type = friend
host = dynamic
secret = 123
context = rbt

[root@rbt01 asterisk]# extensions.conf


[default]
;exten => 11112141463962,1,Answer()
;exten => 11112141463962,2,MusicOnHold(112234)

;exten => 11112141463962,1,Answer()


;same => n,AGI(rbt.php,${CALLERID(num)},${EXTEN})
;same => n,AGI(cobarbt.php,${CALLERID(num)},${EXTEN})

;exten => 123456789,1,Answer()


;same => n,AGI(cobarbt.php,${CALLERID(num)},${EXTEN})
[rbt]
exten => _1111N.,1,Answer()
same => n,AGI(rbt.php,${CALLERID(num)},${EXTEN})

exten => 11110233445566,1,Answer()


same => n,AGI(rbt.php,${CALLERID(num)},${EXTEN})

;exten => 1112,1,Answer()


;same => n,MusicOnHold(112233)
;same => n,Dial(SIP/1111,60,mtT)
;same => n,Hangup()

;exten => 1113,1,Answer()


;same => n,MusicOnHold(esia)
;same => n,Dial(SIP/1112,31,mtT)
;same => n,Hangup()

;exten => 1114,1,Answer()


;same => n,MusicOnHold(112234)

;exten => 11112141463962,1,Answer()


;exten => 11112141463962,2,MusicOnHold(112234)

;exten => 11112191099090,1,Answer()


;exten => 11112191099090,2,MusicOnHold(112233)

[root@rbt01 asterisk]# musiconhold.conf

[112233]
mode=files
directory=/var/music/112233

[112234]
mode=files
directory=/var/music/112234

[112235]
mode=files
directory=/var/music/112235

[112236]
mode=files
directory=/var/music/112236
[112237]
mode=files
directory=/var/music/112237

[root@rbt01 asterisk]# cd agi-bin/


[root@rbt01 agi-bin]# ls
\ [0m[01;34mbackup[0m [01;32mcobarbt.php[0m [01;34mphpagi[0m
[01;32mrbt.php[0m [01;32mtest.php[0m
[m[root@rbt01 agi-bin]# more cobarbt.php
[?1h=[1;47r[m[m[0m[H[J[47;1H"cobarbt.php" 101L, 2522C[1;1H#!/usr/bin/php -q
<?php
pcntl_signal(SIGHUP, SIG_IGN);
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));

$DB_Username = "rbtnoc";
$DB_Password = "rbtnoc";
$DB_Host = "localhost";
$DB_Schema = "rbtesia";

include (dirname(__file__) . "/phpagi/phpagi.php");


$agi = new AGI();

$DB_Connection = connectToDBMysql($DB_Username,$DB_Password,$DB_Host,
$DB_Schema);

$web_ANI = trim($argv[1]);
addLogCobaRbt("a_number : ".$web_ANI."\n");
$web_DID = trim($argv[2]);
addLogCobaRbt("b_number : ".$web_DID."\n");
$rbt_music = getLagu($web_DID);
addLogCobaRbt("rbt_music : ".$rbt_music."\n");

$result = $agi->exec("MusicOnHold", $rbt_music);

function getLagu($cid)
{[27;8H $sql = "select SONG_ID from SUBSCRIBE where dn='$cid'";[28;8H $qr_rbt =
DBQuery($sql);[29;8H $rbt = $qr_rbt[0][0];
// addLogCobaRbt($qr_rbt);[31;8H if($rbt){return $rbt;}else{return FALSE;}

function connectToDBMysql($DB_Username,$DB_Password,$DB_Host,$DB_Schema)
{[37;8H if (!$link = mysql_connect($DB_Host, $DB_Username, $DB_Password))
{[38;16H addLogCobaRbt("Could not connect to mysql");[39;16H exit;[40;8H }[42;8H
if (!mysql_select_db($DB_Schema, $link)) {[43;16H addLogCobaRbt("Could not select
database");[44;16H exit;[45;8H }[46;8H return $link;[1;1H

You might also like