0% found this document useful (0 votes)
402 views

MVTS Manual v2

This document provides instructions for installing and configuring a billing module to allow the VoiceMaster VoIP platform to bill calls from an MVTS wholesale traffic system. The module uses rsync over SSH to download MVTS CDR files, parses the data, and simulates the calls in the VoiceMaster billing system to generate call records and statements. It integrates the MVTS traffic seamlessly into the VoiceMaster billing workflow.

Uploaded by

EvaMarie David
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views

MVTS Manual v2

This document provides instructions for installing and configuring a billing module to allow the VoiceMaster VoIP platform to bill calls from an MVTS wholesale traffic system. The module uses rsync over SSH to download MVTS CDR files, parses the data, and simulates the calls in the VoiceMaster billing system to generate call records and statements. It integrates the MVTS traffic seamlessly into the VoiceMaster billing workflow.

Uploaded by

EvaMarie David
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

VoiceMasterMVTSbillingmodulemanual

Voicemaster (VM2000) MVTS BILLING MODULE


Moduledescription

VoiceMasterMVTSbillingmodulemanual

Nov2008

VoiceMasterMVTSbillingmodulemanual

Contents Intro ........................................................................................................................................................... 3 Moduledescription ................................................................................................................................... 3 Installation ................................................................................................................................................ 5 Configuration ............................................................................................................................................ 5 Filedownloadingprocedure ................................................................................................................... 5 PreparingVMbillingsystemtocollectandbillMVTSCDRs ............................................................. 7

VoiceMasterMVTSbillingmodulemanual

Intro
MVTSsystemknownaswelldesignedsystemforwholesaletraffic.Billingsubsystemisonly availableinlatestprofessionalversionreleasesofMVTS(knownasMVTSII). Other(older) versionsofMVTSarecapableforRADIUSandofflineCDRbillingbythirdpartybillingsystems. Thereareanumberofexternalbillingsystemsonthemarket whichcanworkwithMVTS Billbery,MeraBilling,Alepo,CDRanalyzer.Everybillingsystemisunique. VM2000VOIPplatformfromsysmaster(www.sysmaster.com)hasuniqueandveryflexible billingsystem,ithasalmostallpossiblecustombillingfeatureslikeroute/rateswitchingdepending fromANI/DN/DNISprefix,callingplanminutesforarangeofdestinationandlotsofmore.But duetoabigflexibilityandhugenumberoffunctions thisbillingisveryresourceconsuming (mainlyDBbillingprocedures). VM2000canbeconfiguredtoworkasbillingsystemforMVTSviaradiuswithoutanycustom modulesandpatches.JustneedtobesurethatMVTSsendstheoriginationIPaddressasaPIN,and VM can recognize it and do IP authentication based on it. However, to for multiple auth IP addressesperaccountyouneedcustompatch,butthisisnotthethemeofthismanual. VoiceMasterRadiusbilling worksgreat whenresponsetimefromthebillingengine(DB billingprocedures)suitableforradiusservertimeout(<5sec).However,whenbillingsubsystem isfullofdata(rate/routetableskeepsmorethen100000rows,CDRtableover10000000rows etc..)radiusisnotstable(messageERROR:errorreadingfromsocketisonVMradiuslog /home/manager/debug/radius/radius_calls.log).Thisisnotabug,justbillingsystemoverloaded, andneedtoaddresourcesordorate/routetableoptimization,uploadCDRtofilesetc. NOTE!: Module development is done by third party company, which is not related to sysmaster.Allmodification,whichmadeinthesystemwhilemoduleinstallation donewithout havingrootaccess,butconnectiontotheDBisusedunderSystemAdministratorrole.Incase yourVmserverisonsupportyouhavetoinformsysmastersupportteamaboutit.Atanytime, youcanaskthismodulesupplierstorecoverVMserverintooriginalstate.

Moduledescription
This module was createdas alternative toVMRADIUS billingforMVTS system. Idea is simple: automaticallydownloadnewCDRfilesfromMVTSusingrsync(overssh); everyminuterunfilecollectorscript,whichfindnewfilesandregisterthemtoBilling system,placingtheminqueueforbilling every5minuterunMVTSbillingmodule,whichtakesnewfiles,loadthemtotheBilling system,takeeachCDRlineandemulatethecallinVMbillingsystem. Files:collector.sh;mvts_billing.pl Storedprocedures:sp_cdr_import_stage(and5more) This module, by other words, generates traffic based on CDR. Every CDR passed thru traditionalVMbillingsystemexactlylikearegularcall,andprocessedbythesameauth/rating/rouing procedures.Thiscallemulationresultsbillingcallhistorypereveryaccount,statementsforproviders andclients. Technically,foradvancedusers,Icanexplainshortlyinsteps,whatisdone: After file upload to the certain folder (for each MVTS there is a separate folder see configurationpartofthismanual),theperlscriptmvts_bill.plparsestheMVTSCDRfile,extractthe required fields, and generate the BCP file, which is uploaded to Sybase DB temporary table 4

VoiceMasterMVTSbillingmodulemanual

cdr_import_stage.Nexttheprocedure sp_cdr_import_stage isexecutedinDB,whichanalizethe uploaded data, removes duplications, corrects datetime formats, remove zero calls and sarts sp_call_finishprocedurewithcalldetailes.Proceduresp_call_fiishtriestofinishthecallwithgiven session_id,butfailstofinditincurrentcalls(callers)andemulatethecallstart(thisiswhereweneed H323/SIPcallstotermination optionEnableexceptionbillingtobeset).Oncecallstartisamulatedsp_call_finishstartsfrom providers beginning,findsthecallandfinishs/stops/billsit.Afterthiscallappearsincallhistory.Incasecall Picture1.MVTSCDRbillingschema failedtostartforsomereason(routenotfound,ratenotfound,accountnotfound)CDRisignored, counter Accountnotfoundisincreased,andreportshowsthiscounterpereveryuploadedMVTS cdrfile(seelastsectionofthismanual).

Standard mvts procedures:

- Call routing procedures - Call signaling - Call proxy - Codec conversion - Protocol conversion

rsyncrequest

Writing CDRs locally to files: / usr/local/mvts/billi ng/*

CDRfiles downloading proccess

every minute check for new cdrs at MVTS using rsync over ssh, do auth over ssh using user & pub DSA(RSA) key parse cdr files and upload them in VM database system Emulating calls from CDR, executing call start per every call and place it in callers table Billing calls using traditional VM billing system procedures Generate statements,

IncomingH323/SIPcalls fromclients

VoiceMasterMVTSbillingmodulemanual

Installation
Usually,moduleinstallationandconfigurationisdonebyme(thecreator),itsavesyourtime,and, atleast,youhaveguarantee,thatitworkslikedescribed.However,youmaywanttoknowtheprocess. Hereitis: putfilescollector.shandmvts_bill.plto/home/manager/scripts/, doDBmodificationofstoredprocedures(6procedures) setupcronjobtorunthe/home/manager/scripts/collector.sheveryminute, configurecommunicationwithMVTSusingsskkey,likedescribedinthismanual,laterand configuretheBillingsystem(addMVTSasagateway,addrates/routes/accounts)

Configuration
Filedownloadingprocedure
Communication between VM andMVTS basedonrsynclinux tool. This command makes synchronizationoffilesandfolders,insteadofcopythem.Everytimethiscommandexecuted onlynewpartsofdata(thedifference)isdownloaded. Inourcase,thebestandsimplewaytorunrsyncusingsshsecurechannel.MVTSshouldallow ssh connection from VM for user manager without password. Instead the PUB/PRIVATE authenticationkeypairsareused(thisisdefaultauthprocedureofssh).

ConfigurationstepsofcreatinguserandRSAauthkeys:
1)CreatemanageraccountatMVTS; root@mvts#:useraddmanager 1) Generatepub/privatekeyforusermanageratVM(passphraseisempty,justpressenterforall thequestions) manager@voicemaster:~>sshkeygentrsa Generatingpublic/privatersakeypair. Enterfileinwhichtosavethekey(/home/manager/.ssh/id_rsa): Enterpassphrase(emptyfornopassphrase): Entersamepassphraseagain: Youridentificationhasbeensavedin/home/manager/.ssh/id_rsa. Yourpublickeyhasbeensavedin/home/manager/.ssh/id_rsa.pub. Thekeyfingerprintis: 51:21:15:c5:4a:c1:8e:13:f9:c1:78:45:c9:3e:fc:21 manager@voicemaster:~>

manager@voicemaster

2) AtMVTScreatedirectory/home/manaer/.sshandchangeownertomanager mkdir/home/manaer/.ssh&&chownmanager.manager/home/manaer/.ssh 6

VoiceMasterMVTSbillingmodulemanual

3) InsertpublicrsakeyofusermanageratVM/home/manager/.ssh/id_rsa.pubtotheMVTS,in file/home/manager/.ssh/authorized_keys2 cat/home/manager/.ssh/id_rsa.pub(doitatVM,andcopythekey) vi /home/manager/.ssh/authorized_keys2 (do it at MVTS, press I, paste the key, and save&exit:wq) Incaseeverythingiscorrect,yousholdbeabletologinfromVMtoMVTSasmanagerwithout password.Trytoconnecthere,inordertostoretheRSAkeyfingerpoint(typeYESwhenitasks): manager@voicemaster:~>sshmvts Theauthenticityofhost'mvts(192.168.1.111)'can'tbeestablished. RSAkeyfingerprintis34:9d:71:0b:08:be:eb:b4:ac:39:8f:cc:db:a9:92:eb. Areyousureyouwanttocontinueconnecting(yes/no)?yes Warning:Permanentlyadded'mvts'(RSA)tothelistofknownhosts. manager@ :~ mvts >

FinalstepistogivereadpermissionforusermanagertothefilesinMVTSCDRfolder,by defaultis/usr/local/mvts/billing/* Asalternative,forsecurityreasons,youcansetupautomaticfileuploadingfromMVTStoVM. Forthat,youneedtorepeattheprocedurewithcreatingusersandauthkeypairs,butgeneratekeypair (priv/pub) at MVTS server, and put PUB key to VM manager profile: /home/manager/.ssh/authorized_keys2.Then,runperiodicallyCDRfilessynchronizationusingrsync (mostoptimaltool)everyminute,10minutes,oreveryhour.AddthislineattheMVTSservercrontab (correctthepath,address,portsaccordingtoyourlocations): crontabe */5**** /usr/bin/rsyncae'sshp22'/usr/local/mvts/billing/*manager@VM_SERVER_IP /home/manager/upload/cdr/Mera>/dev/null2>&1 wherefolder/home/manager/upload/cdr/Meraispredefined,theformatis:

/home/manager/upload/cdr+GW_ID GW_IDitisgw_idforMVTSgateway,whichisaddedtogatewaylist:Route>gatewayin VMadminconsole.(Seenextconfigurationstep).

VoiceMasterMVTSbillingmodulemanual

PreparingVMbillingsystemtocollectandbillMVTSCDRs
VoicemasterMVTSbillingmodulecanworkwithmultipleMVTSgateways.EveryGWshouldbe presentinVMgatewaylist,andhavecorrectIPaddress.ThisIPaddressusedforfiledownloadingand managementpurposes.ClientIPaddressandterminationGWshouldalsobecorrectlysetinvmbilling systemlikeforregularcalltraffic. Configurationsteps: AddcustomeraccountwithIPaddressauthentication

Picture1.CreatingcustomeraccountwithIPauthentication

VoiceMasterMVTSbillingmodulemanual

Itissupposed,thatrouting/ratetableSystem[0],SystemRoute[0],keepsthecorrectprefixes andratestobilltheCDR.OtherwisecallswontbebilledduetoerrorNoroutetodestinationor Nobillingratefoundfor. addMVTStotheVMgatewaylist,puttingtheIPaddressandGW_ID,nametotheform.

Picture2.AddingnewMVTSgatewaytoVM. NOTE:theGW_IDisusedasafoldernametokeeptheCDRfilesforthisGW,itisautomatically created in VM system /home/manager/upload/cdr/GW_ID. Each MVTS GW will have its own folder, you can add unlimited gateways to the system, keeping GW_ID unique for each MVTS gateway. addthisGWtotheMVTSCDRBillinglist.Thisstepisimportant,ittellssystemtorun MVTSbillingforthisGW,i.e.connecttoitviassh,downloadfilesandbillthem.

VoiceMasterMVTSbillingmodulemanual

Picture3.AddingMVTSGWforbilling Ifyoudideverythingcorrect,withinaminuteMVTScdrfilesshouldbeappearedintheGWlist. YouhavetoreloadtreetoseetheMVTSgatewayfiles.

Picture4.Refreshingthemenutree

10

VoiceMasterMVTSbillingmodulemanual

Onceitisdone,youhavetoseethelistofCDRs,whicharedownloadedfromMVTSserver.There isapossibility,thattherearetoomuchoffiles;itisrequiressometimetodownloadthem(depends fromconnectionspeedbetweenVMandMVTS).Billingisexecutedatonceafterdownloadprocess finished.

Picture5.DownloadedCDRfiles. From this moment,thebillingisstarted.Itisexecutingdownloadandbillingprocedureevery minute.Incasewhennewcdrfilesfoundtheyareloadedandbilledautomatically. FieldsBilled%,TotalCalls,Billedcalls,Authfailedreflectthebillingresults. Billed%reflectsdynamicallythebillingprocesspercent; TotalcallstotalcallcountinuploadedCDRfile; ZerocallscountofcallsinCDRwithduration=0.ThiscouldnerejectedcallsbyMVTS duetosomeerrors; Billedcallsimportantfield,reflectthecountofcallswhichwereauthenticated(account found)andbilledbythesystemrates.TheseCDRsareprocessedbytheVMbillingsystem, andyoucanseecallsinaccountCDRhistory Auth failed reflects count of calls, which was not authenticated and not processed. Accountnotfounderrorisgeneratedbythesystem.Mostprobablyyoudonothavesuch IP,prefixinyourVMsystem.

11

VoiceMasterMVTSbillingmodulemanual

Picture4.Billedcalls. VMsystembillingisveryflexible,ithasalmostallcommonfeaturesforbillingthecallsand services. In ourexample, MVTS files with total file count 65000 rows was billed for 6minutes. Mostly,timeisspentforfileuploadingandvalidation.Billingitselftookabout1minute.

12

You might also like