Você está na página 1de 36

PCICardCommonInstallationIssues

ReferenceNumber: Author: LastUpdated: DocumentStatus:

NVXCPTBSH01 RichardSpencer 18May2008 Issue

TechnicalSupport:ThisguideisfreelyavailabletoanyoneintheOpenSourceCommunity tohelpsolveconfigurationandinstallationissues.However,emailbasedtechnicalsupportis onlyavailabletocustomersthathavepurchasedOpenSourcetelephonyequipmentdirectly fromNovavox. Updates:DuetothenumberofalternativeOpenSourceIPPBXsoftwarepackagesavailable andnewversionsbeingregularlyreleased,itisdifficulttokeepOpenSourcedocumentation fullyuptodate.Ifyoufindanyoutofdateor inaccurateinformationwithinthisdocumentthen pleaseletusknowbyemailingusatfeedback@novavox.co.ukandwewillupdatethe documentassoonaspossible. Disclaimer: This document has been compiled based on experience resolving real world customer configuration issues as well as information available within the Open Source community. References to source material have not been included as it would make the document less easy to read. Also, keeping the references up to date would be very time consuming. However, if you discover information contained within this document for which youbelieveyouaretheoriginalsourceandyouwouldliketoreceiveacknowledgement,then pleaseletusknowandwewilladdtheappropriatereference. NovavoxLimitedwww.novavox.co.uk
RegisteredinEnglandNumber:06363978 Registeredoffice:2ndFloor,145157StJohnStreet,London,EC1V4PY VATRegistrationNumber:GB916422731

AboutNovavox
Novavoxhelpscreatereliable,affordable,integratedcommunicationsolutionstomeetthe needsofsmallbusinessesandmediumsizedenterprises.Anofficenetworkconnectedtothe Internetservesasthebasisfortheconvergenceofdata,voice,videoandmobile communicationsinasecure,integratedarchitecture.Withanintegratedcommunications solution,companiescansaveoncostlyphonebills,integratecustomerinformation,andhelp makeemployeesmoremobilewithoutsacrificingcommunicationfunctionality. Torealisethebenefitsthatintegratedcommunicationssolutionscanoffer,acompanyneeds anaffordable,reliablesolutiontailoredforthesmall/mediumofficeanddesignedforeaseof use.NovavoxprovidesOpenSourcetelephonyequipmentspecificallydesignedforsmall businessesandmediumsizeenterprises.UsingOpenSourcesolutionsallowscompaniesto benefitfromprotectionagainstvendorlockinandabandonment,adramaticreductionin capitalexpenditurecostsandanendtoperuser/featurelicensingcosts. Novavoxisdedicatedtosupplyingreliable,affordable,featurerichOpenSourcecomputer telephonyequipmenttosupportbusinessesupgradingexistingsystemsandthosedeploying newsystems.WorkinginpartnershipwithNovavox,smallbusinessesandmediumsized enterprisescandeployOpenSourcecommunicationsolutionstobenefitfromimmediate returnoninvestment(ROI)throughdramaticallyreducedcallchargesandsignificantsavings inequipmentandinfrastructurecosts.

ProductRange
NovavoxsuppliesarangeofalternativeOpenSourcetelephonyproductsincluding: X100PSpecialEditionThebestofbreedsingleportFXOcardavailable OpenVox4portmodularanaloguePCIExpresscards OpenVox14portISDNBRIPCIcards OpenVox12portISDNPRI/E1/T1/J1PCIcards OctWareSoftEchocarriergradeechocancellationsoftwarelicences

Forfulldetailsofouralternativeproductspleasevisitourwebsitesproductsection: www.novavox.co.uk/products

ContactDetails
ContactSales
Ifyourequireadditionalproductinformationorresellerpricinginformation,havean invoice/orderquery,orwouldliketorequestaquoteforacommunicationssolutiontomeet yourcompany'sspecificneedsthenpleasecontactusatsales@novavox.co.uk.

ContactSupport
Forassistancewithequipmentinstallationorforhelpwithadevice/serviceissuepleasevisit ourwebsitesupportsectioninthefirstinstance: www.novavox.co.uk/support Novavoxcustomersonly:Ifafterfollowingtheguidanceprovidedonthesupportpageyou areunabletoresolvetheissuethenpleasecontactusatsupport@novavox.co.uk. PCICardCommonInstallationIssues NovavoxLimited20072008 Page2of36

Contents
1 Introduction ................................................................................................4 2 CardNotDetectedbyMotherboard/Bios ...................................................5
2.1 ProblemDescription.................................................................................................. 5 2.2 Solution .................................................................................................................... 5

3 PCIBusIRQSharingIssues......................................................................6
3.1 ProblemDescription.................................................................................................. 6 3.2 Solution .................................................................................................................... 7

4 PCIBUSIRQMisses/Latency....................................................................8
4.1 ProblemDescription.................................................................................................. 8 4.2 Solution .................................................................................................................... 9

5 Echo.........................................................................................................14
5.1 ProblemDescription................................................................................................ 14 5.2 Solution .................................................................................................................. 15

6 FarendDisconnect ..................................................................................22
6.1 ProblemDescription................................................................................................ 22 6.2 Solution .................................................................................................................. 22

7 KernelPaniconReboot ...........................................................................24
7.1 ProblemDescription................................................................................................ 24 7.2 Solution .................................................................................................................. 24

8 QuickReference ......................................................................................26 9 FurtherAssistance ...................................................................................28 AppendixASignallingmethods ...................................................................29 AppendixBCountrycodes/zones..............................................................30 AppendixCZaptel.confconfigurationparameters ......................................31 AppendixDRecompilingZaptel...................................................................33 AppendixEAcronyms.................................................................................36

PCICardCommonInstallationIssues NovavoxLimited20072008

Page3of36

1 Introduction
Thisdocumentdescribeshowtoovercomesomeofthemostcommonissuesexperienced wheninstallingPCItelephonycardsinOpenSourceIPPBXsystems.SettingupanOpen SourceIPPBXforthefirsttimecanbeadauntingandsometimesfrustratingtask,particularly ifyouarenotfamiliarwithLinux.Thereisonlinehelpavailableintheformofforumsand wikis,andifyouencounteraproblemsomeoneelsehasprobablyhadthesameproblem andfoundasolution.However,searchingthroughtheforumsandwikisfortherelevant informationandfindingasolutioncanbeverytimeconsuming. Themainobjectiveofthedocumentistohelpmakecardinstallationaseasyaspossibleand tominimisetheamountoftimerequired.Themostcommonissuesarecoveredindepthand detailedstepbystepsolutionsareprovidedalongwithbackgroundinformationexplainingthe purposeofeachstep.TheinformationprovidedfocusesonDigiumAsteriskandTrixbox butcanbeusedtohelpinstallanOpenSourcetelephonycardinanyZaptel/Asteriskbased IPPBXsystemincludingAsteriskNOW,ElastixandPBXinaFlash.

Disclaimer:Digium(www.digium.com)andAsterisk(www.asterisk.org)areregistered trademarksofDigium,Inc.Trixbox(www.trixbox.org)isaregisteredtrademarkofFonality, Inc.Elastix(www.elastix.org)isaregisteredofPaloSantoSolutions.NovavoxLimitedisnot affiliatedwith,norendorsedbyanyofthecompanieslistedabove.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page4of36

2 CardNotDetectedbyMotherboard/Bios
2.1 ProblemDescription
Ifthecardyouhaveinstalleddoesnotappeartobelistedinanyshowcommandoutputsthen thefirststepistolookattheKernelsbootprocessmessagebuffer.Thebootprocess messagebuffercanbeviewedusingthedmesg(diagnosticmessage)commandandwill showifthecardhasbeendetectedbythemotherboard/bios: #dmesg|more Ifthecardhassuccessfullybeendetected,thedmesgoutputshouldshow: ... wcfxo:DAAmodeis'FCC' FoundaWildcardFXO:WildcardX100P ... TheaboveoutputisforanX100PSEcardbutsimilaroutputshouldbereceivedforother cards,e.g.FoundaWildcardTDM:WildcardTDM400PREVE/Ffor4portOpenVox analoguecards.

2.2 Solution
Ifyoucannotfindthelines fortherelevantcardinthedmesgoutput,then: 1. CheckthatthePCIslotsupportstherelevantstandard,mostcardsusePCI2.2 2. Checkthatcardhasbeeninsertedcorrectly,occasionallyithelpstopullthecard1 2mmoutoftheslotsothatitdoesnotgorighttothebottom 3. TrymovingthecardtoadifferentPCIslot 4. Tryanothercard(e.g.Networkcard)inthePCIslottofindouttocheckthatitisnot faulty 5. EnsuretheMotherboardhasthelatestBIOSinstalled Thecardmustbedetectedbythemotherboard/biosbeforeyoucanproceedanyfurther.If thecardisshowninthedmesgoutputbutisstillnotlistedinsomeoftherelevantshow commandsthentheremaybeanIRQissueasdescribedinthefollowingsection.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page5of36

3 PCIBusIRQSharingIssues
3.1 ProblemDescription
ThePeripheralComponentInterconnect(PCI)busprovidescommunicationbetween input/output(I/O)devicesandacomputer'sprocessor.Inordertocommunicatewiththe computerprocessoranI/Odevicemustsignalthatitwishestousethebusbysendingan interruptrequest(IRQ).I/OdevicesareallocatedIRQbuslines/channels(commonlyreferred toasIRQs)toallowthemtosignalaninterrupt,whichareidentifiedbyanindex.Inthecase ofOpenSourceTelephonycards,thelineisanactualcontact(finger)onthecard,anditisa correspondingpininthesocketsonthebusconnectedbyatraceonthemotherboard.Acard sendsaninterrupttothemotherboard'sinterruptcircuitrybychangingthevoltagelevelonthe interruptrequestline.Thisvoltagechangeactsviainterruptcontrollercircuitrytointerruptthe processortoservicethecardneedingtheCPU'sattention. IftherearemoreI/OdevicesthantherearespareIRQsthentwoormoredevicescanshare thesameIRQ.ForsomeI/Odevicesthisdoesnotcauseanyissues.However,theZaptel drivergenerates1000interruptsasecondforeachtelephonycardthatitcontrols.Ifthe interruptsarenothandledintimethenthiscancausesignificantissuesforaudiopassing throughthetelephonycardsandcanevenpreventthecardsfromworkingaltogether.Forthis reason,itshouldbemadecertainthatcardsthatusetheZapteldriverliketheX100PSE havetheirowndedicatedIRQtominimiseinterrupthandlinglatency. WheninstallingaPCItelephonycardinanIPPBXforthefirsttime,ormovingittoadifferent slot,youmayreceivethefollowingerrormessage: FailedtoinitailizeDAA,givingup... wcfxo:probeof0000:00:0c.0failedwitherror5 Todetermineifthecardhasbeendetected,usetheLinuxutilitylspciwhichdisplays informationaboutdevicesconnectedtothePCIbuswiththevoptiontocheckwhatIRQ hasbeenallocatedbytheKernel: #lspciv IftheX100PSEcardhasbeendetectedsomethingsimilartothefollowinglinesshouldbe includedintheoutput: 04:06.0Communicationcontroller:MotorolaWildcardX100P Subsystem:Unknowndeviceb100:0003 Flags:busmaster,mediumdevsel,latency32,IRQ217 I/Oportsata800 Memoryatdfafe000(32bit,nonprefetchable) Capabilities:[40]PowerManagementversion2 ThenextstepistoverifythattheX100PSEcardisrecognisedbytheLinuxKernelandthatit isusingitsallocatedIRQ.Thiscanbeachievedusingthefollowingcommand: #cat/proc/interrupts IfthecardisrecognisedandisbeinghandledcorrectlybytheZapteldriverthentheoutput shouldinclude: 7:25680730XTPICwcfxo

PCICardCommonInstallationIssues NovavoxLimited20072008

Page6of36

TheaboveoutputisfromasystemusingastandardXTProgrammableInterruptController (XTPIC).IfasystemisusinganAdvancedProgrammableInterruptController(APIC)then theoutputwilllooklikethisinstead: 217:718680730IOAPIClevelwcfxo Inbothcases,theZapteldriverforthecardmustbeallocateditsowndedicatedIRQ.

3.2 Solution
IfthecarddoesnthaveitsowndedicatedIRQ(listedin/proc/interrupts)then: 1. TrymovingthecardtoadifferentPCIslot 2. Checkthatcardhasbeeninsertedcorrectly,occasionallyithelpstopullthecard1 2mmoutoftheslotsothatitdoesnotgorighttothebottom 3. MakemoreIRQsavailablebydisablingallunnecessaryI/OdevicesintheBIOS,e.g. serialports,parallelports,USB,etc. 4. SeeifyoucanassignanIRQtoaspecificPCIslotintheBIOS(mostmodernbioses don'tallowthisthough) 5. Enable/disabletheplug'nplayOSoptionintheBIOS 6. Enable/disableACPI(AdvancedConfigurationandPowerInterface)inthebiosorby addingacpi=nointhegrubbootloader 7. Enable/disableAPIC(AdvancedProgrammableInterruptController)inthebiosorbe addingnoapicinthegrubbootloader 8. Enable/disablehyperthreadingbyaddingnohtinthegrubbootloader 9. Enable/disableSMP(SymmetricMultiProcessing)ondualcore/processIPPBXsin thebiosorbyselectinganonsmpKernelfromthegrubbootloader 10. Enable/disabletheirqbalancedaemon Asstatedpreviously,OpenSourcetelephonycardsmusthavetheirowndedicatedIRQ (confirmedviacat/proc/interrupts)toavoidanyPCIinterruptrelatedissues.Itcansometimes takeawhile,butusingvariouscombinationsofthestepslistedaboveshouldeventuallyhelp provideadedicatedIRQ.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page7of36

4 PCIBUSIRQMisses/Latency
4.1 ProblemDescription
Asstatedintheprevioussection,theZapteldrivergenerates1000interruptsasecondfor eachtelephonycardthatitcontrols.Iftheinterruptsarenothandledintimethenthiscan causesignificantissuesforaudiopassingthroughthetelephonycardsandcancauseclicks, pops,andglitches.ThemostimportantfunctionofanIPPBXsystemistoswitch/movedigital soundsamplesfromoneport/protocoltotheotheratveryconstantrate.Further,althoughlost audiosamplesmaybetolerableforvoiceapplications,theymaybedetrimentaltodata/fax applications. IfyouexperienceaudioissuesandhaveconfirmedthatthecardhasitsowndedicatedIRQ (viacat/proc/interrupts)thentheremaybeamissinginterruptorinterruptlatencyissue.As previouslystated,theZapteldrivergenerates1000interruptsasecondforeachtelephony cardthatitcontrols.Onewaytocheckthatthecorrectnumberofinterruptsarebeing receivedistousethefollowingcommand: #cat/proc/interruptssleep10cat/proc/interrupts Theoutputshouldbesimilartotheoutputshownbelow: CPU0 217:1961653IOAPIClevelwcfxo ... 217:1971654IOAPIClevelwcfxo ... ThiscommanddisplaysthenumberofinterruptsforeachdeviceconnectedtothePCIbus, waits10secondsandthendisplaystheinformationagain.Ifwetake1961653from1971654 theresultis10001.Asthetestisnotcompletelyaccurate1001isextremelyclosetothe expected1000(i.e.1000persecond)sowecanseethatthecorrectnumberofinterruptsare beingreceived. Iftheoutputshowsthenumberofinterruptsas0oraverylownumberthenyouneedto checkthattherelevantzaptelmodulesareloadedandthatthe/etc/zaptel.confand /etc/asterisk/zapata.conffilesareconfiguredcorrectly. Anotherwayoftestingifthereisanissuewithmissinginterruptsistousethecommand zztoolwhichrunsatimingtest: #zttest (stopwithctrl+c) Theoutputshouldbesimilarto: Openedpseudozapinterface,measuringaccuracy... 99.995216%100.000000%99.995598%99.997948%99.996674%99.997070% 99.996376%99.995995%99.999413%99.996780%99.996483%99.996483% 99.996185%99.997078%99.996780%99.996674%99.996864%99.995125% 99.999413%99.995895%99.997948%99.996689%99.996010%99.997459% 99.997162%99.996971%99.996780%99.995995%99.997559% Resultsafter29passes Best:100.000Worst:99.995Average:99.996918,Difference: 100.003041 Thehigherthepercentagethebetterthesoundsqualitywillbe.Iftheresultsare100%or 99%thentheredefinitelyshouldntbeanymissingIRQrelatedissues.Iftheresultsare98% PCICardCommonInstallationIssues NovavoxLimited20072008 Page8of36

thenthecardshouldworkOK,however,iftheresultsunder99.975%,thentherewillprobably besomeaudioproblemsandthecardmaynotevenwork.

4.2 Solution
4.2.1 UpgradetoLinuxKernel2.6

TheLinuxkernelisresponsibleforcontrollingdiskaccessusingkernelI/Oscheduling.The I/Oschedulerfoundinthe2.4LinuxkernelwasdesignedtomaximizeglobalI/Othroughput. IndoingsoatradeoffwasmadewithregardstofairnesswhichmeansthatIPPBXsystems usinga2.4kernelaremorelikelytosufferfromschedulingdelays.Inordertodecidewhich taskshouldrunnext,theschedulerhadtolookateachtaskandmakeacomputationto determineeachtask'srelativeimportance.Becausethetimerequiredtocompletethe algorithmvariedwiththenumberoftasks,applicationscouldsufferfromslowscheduling. ThekernelI/Oschedulerembeddedinthe2.6kernelhasadvancedtheI/Ocapabilitiesof Linuxsignificantly.TheschedulerinLinux2.6nolongerscansalltaskseverytime.Instead, whenataskbecomesreadytorunitissortedintopositioninaqueue.Whenthescheduler runsitselectsthetaskatthemostfavourablepositionwithinthequeue.Thismeansthat schedulingisdoneinaconstantamountoftime,whichisidealforaudioapplicationslikeIP PBXsoftware.Whenataskisrunningitisgivenaperiodoftimeinwhichitmayusethe processorbeforeithastogivewaytoanotherthread.Whenitstimeperiodhasexpiredthe taskismovedtoadifferentqueueaccordingtoitspriority.ThisnewI/Oschedulerinkernel 2.6isconsiderablyfasterthantheoldone,anditworksequallyaswellwhethertherearea largenumberoftasksinthequeueorjustafew. Thereareactually4I/Oschedulersembeddedinthe2.6kernelthatcanbeselectedatboot time,eachofwhichoffersadifferentcombinationofoptimisations.Thealternativeschedulers aretheCompletelyFairQueuingelevator(cfq),Deadlineelevator(deadline),NOOPelevator (noop),andAnticipatoryelevator(as).TheI/Oschedulersarecalledelevatoralgorithms becausetheyaddressaproblemsimilartothatofkeepinganelevatormovingsmoothlyina largebuilding.Thedefaultschedulerisusuallyasorcfqdependingonthedistribution. InadditiontotheI/Oschedulerimprovements,thereareanumberofotherperformance enhancingimprovementstothe2.6kernelincludingbetterdrivers/featuresetsforIDE/SCSI drives,supportforkernelpreemption,andanimprovedthreadingmodel/library. TheLinux 2.6Kernelalsoincludeanewprocessschedulerthatscalesbetterinmultiprocessor, multicoreandhyperthreadedCPUsystemsthanthe2.4kernelprocessscheduler. 4.2.2 DisableXWindowsandFramebuffer

XWindowsgeneratesalargenumberofinterrupts(especiallywhenusinganinputdevice suchasamouse)thatcandelaytheprocessingoftelephonycardinterrupts.Itcanbeuseful torunXwhenconfiguringtheIPPBXsystem,butoncethesystemupandrunningitis advisabletodisableXWindowsbychangingtherunlevel. AlmostallLinuxdistributionuserunlevel2/3fortextmodeandrunlevel5forGUImode.The runlevelmodesaredefinedinthe/etc/inittabconfigurationfile.IftheIPPBXsystemis currentlyusingXWindowsthen: #cat/etc/inittab shouldshowthefollowinglineintheconfiguration: id:5:initdefault: TodiableXWindowsbysettingthedefaultrunlevelto3(textmode)changethelineusinga texteditor(e.g.vi,nano,etc.)to: PCICardCommonInstallationIssues NovavoxLimited20072008 Page9of36

id:3:initdefault: NexttimetheIPPBXsystemisrebooteditwillbootintextonlymode. TheLinuxframebuffer(fbdev)usedtodisplaygraphicsonaconsolewithoutrelyingon systemspecificlibrariesorXWindowscanalsocauseinterruptprocessingissues.The framebuffercanbedisabledbyincludingthe"vga=normal"optioninthegrubbootloader. 4.2.3 ChangeIDEHardDriveSettings

HarddiskcontrollerscancauseaudioissuesiftheyconsumetoomuchPCIbusresourcesas theycancausetheOpenSourcetelephonycardtosufferfrominterruptlatency/misses.To determineifyourIDEharddiskiscausingissuesyouuse: #hdparmt/dev/[IDEDrive] ThehdparmtcommandcausesasubstantialamountsofI/OtobegeneratedontheIPPBX system.Ifaudioissuesareexperiencewhilstusinghdparmtthenthissignifiesthatthereisa harddriveissue. WhenusingIDEdrives,DigiumrecommendsusingDirectMemoryAccess(DMA)modewith anUltraDMA(UDMA)settingof2or3.UDMAmode2isATA33andUDMAmode3is ATA44.TosettheharddrivetoUDMAmode2forexampleuse: # hdparmd1Xudma2c3/dev/[IDEDevice] Inthecommandabovetheoptiond1enablesDMAmode,Xudma2setstheIDE transfermodetoUDMAmode2andc3enables32bitdatatransfers.Itshouldbenoted thatanychangestoharddrivesettingswillonlybeuseduntiltheIPPBXisrebooted. Therefore,toensuretheharddrivesettingsremainwhentheIPPBXisrebootedthehdparm commandneedstobeincludedinoneoftheIPPBXstartupscripts. 4.2.4 AssignIRQstoSpecificProcessors

Dualcore/processorIPPBXsystemsrunningaSymmetricMultiProcessing(SMP)kernel allowIRQstobeboundtosingleormultipleCPUs.ItisadvantageoustobindtheX100PSE cardIRQtoaseparateprocessorusedforotherIRQs,particularlyIRQsallocatedtothinglike IDEdrives.UsingaseparateCPUfortheX100PSEcardreducesinterruptlatencyandalso improvescachecoherencywhichreducescachemisses. BeforebindingtheX100PSEcardIRQtoaspecificprocessorfirstofalltheirqbalance daemonshouldbedisabledotherwiseitwilloverridethebinding.Thiscanbeachievedusing thefollowingcommands: #servicestopirqbalance #chkconfigirqbalancelevel345off TobindtheIRQstoaparticularprocessorfirstofallcheckwhichIRQhasbeenassignedto eachdeviceusing: #cat/proc/interrupts CPU0 0:29421608IOAPICedgetimer 1:39IOAPICedgei8042 8:3IOAPICedgertc 9:0IOAPIClevelacpi 14: 287820IOAPICedgeide0 PCICardCommonInstallationIssues NovavoxLimited20072008 Page10of36

205:12333IOAPICleveleth0 209:8001IOAPIClevelide1 217:29406181IOAPIClevelwcfxo MakeanoteoftheIRQsforeachperipheraldevice,anydiskdrivesandyourtelephonycard. Nextchangetheassignmentsusingthefollowingcommands: #echo1>/proc/irq/217/smp_affinity#wcfxo #echo2>/proc/irq/14/smp_affinity#ide0 #echo2>/proc/irq/205/smp_affinity#eth0 #echo2>/proc/irq/209/smp_affinity#ide1 UsingthecommandsabovethetelephonycardIRQ(inthiscaseanX100PSE)hasbeen assignedtoprocessor1,whilstallotherrelevantIRQshavebeenassignedtoprocessor2. OncetheIRQbindingconfigurationhasbeencompleted,eachoftheechocommandsused shouldbeaddedtothe/etc/rc.d/rc.localfiletoensurethattheIRQbindingswillremainwhen theIPBPXserverreboots,i.e. #cat/etc/rc.d/rc.local Shouldinclude: echo1>/proc/irq/217/smp_affinity#wcfxo echo2>/proc/irq/14/smp_affinity#ide0 echo2>/proc/irq/205/smp_affinity#eth0 echo2>/proc/irq/209/smp_affinity#ide1 Pleasenote:IfPCIBusdevicesareremovedoraddedtothesystemthentheIRQassigned maychange.Thereforethestepsaboveshouldberepeatedafterremoving/addingPCIBus devicestoensuretheIRQsremainassignedtothemostappropriateprocessor. 4.2.5 ChangeIRQPriorities

IftheIPPBXCPUgetstwointerruptsatthesametime,itwillanswertheminorderofpriority basedontheIRQofthedevicerequestingtheinterrupt.Thereforeonewaytoreduce interruptlatency/missesistouseanIRQwithahigherpriority. IRQsareprioritizedandservicedinpriorityorderbytheCPUasdeterminedbythe controller. WhenastandardXTProgrammableInterruptController(XTPIC)isbeingused IRQs8through15haveahigherprioritythanIRQs3through7.TheIRQpriorityorderis shownbelowwithprioritydecreasingfromlefttoright(0hasthehighestpriority,7thelowest): [0128910111213141534567] ItmaybepossibletoassignacardanIRQwithahigherprioritybymovingittoadifferentslot orbytryingsomeoftheothersuggestionsforchangingIRQassignmentslistedinSection 3.2. IfanAdvancedProgrammableInterruptController(APIC)isbeingusedtheninterruptpriority isn'trelatedwiththepin,butthevectorofthepin.Howthevectorofapinisallocatedisquite random.UsuallythedevicedriverthatcommunicateswiththePCIcontrollerfirstwillgeta lowerpriorityvector.Therefore,whichvectorgetsallocatedtoadevicedependsonhow manydevicedrivershavealreadycontactedthePCIcontroller.Thereisnomethodavailable forreserving/settingvectorsforadevice/IRQandnowayofcheckingwhatvectorhasbeen assignedtowhatIRQ.ThereforeifIAPICisbeinguseditisnotpossibletotryandassigna cardwithahigherpriority.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page11of36

4.2.6

ChangeIRQLatencyTimerSettings

EvenifyoumanagetoassignanIRQwithahigherprioritytoyourcard,alowerpriority interruptcanstillblockhigherpriorityinterruptsifittakesovertheprocessorforseveral millisecondsanddisablesallotherinterruptsduringthattime.Anotherwaytotryandreduce interruptlatency/missesistochangethedefaultIRQlatencytimers.Interruptlatencyisthe timebetweenthegenerationofaninterruptbyadeviceandtheservicingofthedevicewhich generatedtheinterrupt.Thereisusuallyatradeoffbetweeninterruptlatency,throughput,and processorutilization. PCIbuslatencytimerscanrangefrom0to248,thelowerthefigurethequickerthedevice willgiveupthebus.Ifadevicehasasettingof0,thenitwillimmediatelygiveupthebusif anotherdeviceneedstotransmit.Ifadevicehasasettingof248,itwillcontinuetousethe busforalongerperiodoftimebeforestoppingwhilsttheotherdevicewaitsforitsturn.Itis theroleofthedevicedrivertosetthecorrectPCIbuslatencytimervalueforthePCIdevice andmostofthetimethedefaultsettingsworkwell. UsinglowPCIbuslatencytimersettingsresultsindevicesquicklygivingupthebusifanother deviceneedstotransmitdata.Theadvantageofthisapproachisthatitresultsinamuch lowerdatatransmitlatency,sincenodeviceisgoingtoholdontothebusforanextended periodoftimecausingotherdevicestowait.However,thisalsoreducestheeffectivePCIbus becauselargedataburstsbecomemuchlessfrequentandrapidchangesinbuscontrol increasesoverhead.ConfiguringthemajorityofdeviceswithhighPCIbuslatencytimer settingsincreasesinterruptlatency,butalsoincreasethroughput.Aseachdevicegetsto burstlargeamountsofdataacrossthebuswithoutinterruption,thePCIbusisusedmore efficientlyandthePCIdevicescantransmitmoredata. Ingeneral,thebestapproachtoreducinginterruptlatencyistoassignahigherPCIbus latencytimertotheOpenSourcetelephonycardandassignalowerPCIbustimertothe otherPCIbusdevices.ThishelpstoensurethattheotherPCIbusdevicesgiveupthePCI buswhentheOpenSourcecardneedsit. However,itshouldbenotedthatifanIPPBXisbeingusedtoprovidemultipleservicesthat requirelargeamountofdatatobesent/processed,e.g.file/webserver,firewall,etc.then loweringthePCIbustimerforthingsliketheIDEdrivemayactuallydecreaseperformance.In suchcases,CPUutilisationmayincreasesignificantlyduetheprocessornothavingenough timetosendthevolumeofdatarequiredandduetothefrequencyofPCIbuscontrol changes.Therefore,insomecasesitmaybemorebeneficialtoactuallyincreasethePCI latencyofsomeoftheotherdevicesinordertoallowthemtoburstrelativelylargeamountsof dataacrossthebusinonego.Eachsystemisdifferentandthereforeitisacaseoftrialand errorinfindingtheoptimumPCIbuslatencysettings. BeforechangingthePCIBuslatencytimersettings firstofallweneedtofindoutthespecified bus,slotandfunctioninformationforeachPCIbusdevicewewanttochangethelatencyfor. Thisinformationisprovidedinthe[[<bus>]:][<slot>][.[<func>]] formatnexttoeachPCIdevice whenissuingthelcpcivcommand.Forexample: #lspciv 00:0f.0IDEinterface:VIATechnologies,Inc.Unknowndevice5337 (rev80)(progif8f[MasterSecPSecOPriPPriO]) Subsystem:FoxconnInternational,Inc.Unknowndevice0c87 Flags:busmaster,mediumdevsel,latency32,IRQ11 Capabilities:[c0]PowerManagementversion2 04:04.0Ethernetcontroller:RealtekSemiconductorCo.,Ltd.RTL 8139/8139C/8139C+(rev10) Subsystem:FoxconnInternational,Inc.Unknowndevice0c87 PCICardCommonInstallationIssues NovavoxLimited20072008 Page12of36

Flags:busmaster,mediumdevsel,latency32,IRQ209 I/Oportsat9c00[size=256] Memoryatdfaff000(32bit,nonprefetchable)[size=256] Capabilities:[50]PowerManagementversion2 04:06.0Communicationcontroller:MotorolaWildcardX100P Subsystem:EfarMicrosystemsUnknowndevice0001 Flags:busmaster,mediumdevsel,latency32,IRQ217 I/Oportsat9800[size=256] Memoryatdfafe000(32bit,nonprefetchable)[size=4K] Capabilities:[40]PowerManagementversion2 Aftermakinganoteoftherelevantbus,slotandfunctiondetailsforeachdevicethePCI latencytimersvaluescanbechangedusingthefollowingcommands: #setpcivs04:06.0LATENCY_TIMER=f8#wcfxo #setpcivs00:0f.0LATENCY_TIMER=8#ide0 #setpcivs04:04.0LATENCY_TIMER=8#eth0 #setpcivs00:0f.0LATENCY_TIMER=8#ide0 UsingthecommandsabovethePCIlatencytimerfortheOpenSourcetelephonycard(inthis caseanX100PSE)hasbeenincreasedtothemaximumof248(F8inhex),whilstthePCI latencytimersfortheotherPCIdeviceshavebeenreducedto8. AfterthePCIlatencytimershavebeenconfiguredusingthecommandsabove,eachofthe setpcicommandsusedshouldbeaddedtothe/etc/rc.d/rc.localfiletoensurethatthePCI latencytimerswillremainwhentheIPBPXserverreboots,i.e. #cat/etc/rc.d/rc.local Shouldinclude: setpcivs04:06.0LATENCY_TIMER=f8#wcfxo setpcivs00:0f.0LATENCY_TIMER=8#ide0 setpcivs04:04.0LATENCY_TIMER=8#eth0 setpcivs00:0f.0LATENCY_TIMER=8#ide0 Pleasenote:IfPCIBusdevicesareremovedoraddedtothesystemthentherelevantbus, slotandfunctiondetailsmaychange.Thereforethestepsaboveshouldberepeatedafter removing/addingPCIBusdevicestoensurethePCIlatencytimervaluesremainoptimal.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page13of36

5 Echo
5.1 ProblemDescription
Echoisthetermusedtodescribetheexperienceofhearingyourownvoicebackduringa telephonecall.TherearetwomainsourcesofechoinIPPBXsystems: AcousticechoGenerallycausedbyfeedbackfromthetelephonehandset Lineecho Dependantontheimpedancecharacteristicsofthelinetotheexchange

Thetwomainfactorsthatdeterminehowseriousechoisarethetimeperiodafterwhichyou heartheechoandtheloudnessoftheecho.Iftheechoisfairlyquiteandthereareonlyafew millisecondsofdelaythentheechomaybequitebearable.However,ifthedelayisafew hundredmillisecondsandtheechoisquiteloudthenitcanbeextremelyannoyingandeven renderthevoiceserviceunusable. 5.1.1 AcousticEcho

Acousticechoisusuallycausedbyvoicetravellingoutoftheearpieceorspeakerbackinto themouthpieceormicrophone,althoughitcanalsobecausedbysoundbouncingoffthe wallsofaroom.Acousticechoisonlyusuallyanissuewhenusinglowqualityorincompatible headsets,orwhenusingaspeakerphone.However,itcanalsooccurwhenusingatelephone handsetifthemicrophoneissensitiveandthevolumeofthehandsetspeakerisquiteloud. Whensufferingfromacousticechoboththelocalandremotepartieshearechowhen speakingandechoispresentwhencallinganotherextensionconnectedtothesameIPPBX. Acousticechovariesinstrengthanddelaydependingonthechangingacousticenvironment oftheechosource,e.g.movingamicrophonefurtherawayfromaheadset. 5.1.2 LineEcho

LineechoiscommoninPSTNnetworksandiscausedbyimpedancemismatches.Lineecho isapropertyofthelineconnectionandremainsmostlyconstantthroughoutthecall. When makingacalloverthePSTN,thesignalpathbetweentwotelephonesrequiresamplification usingafourwirecircuit.Fourwirecircuitsarenotextendedtocustomerpremisesduetocost, insteadthefourwirecircuitsarecoupledtotwowirecircuitsusingadevicecalledahybrid. Thehybridinthetelephoneprovidersexchangecouplestheanaloguesignalfromthefour wirecircuit(whereincomingandoutgoingsignalsareseparated)tothetwowirecircuitwhere theincomingandoutgoingsignalsarecombined. Assignalspassfromthefourwiretothetwowireportionofthenetwork,theenergyinthe fourwiresectionisreflectedback,creatinganechoofthesignal.Theseverityoftheecho dependsonhowwelltheimpedanceismatchedbetweenbothsidesofthehybrid.The impedanceofthetwowirecircuitcanvarysignificantlydependingonfactorsincludingtheline setupintheexchangeequipment,thedistancebetweentheexchangeandtheIPPBX,the electricalcharacteristicsofthewire,etc.Theactualamountofsignalthatisreflectedback dependsonhowwellthebalancecircuitofthehybridmatchesthetwowireline. LineechoisntanissuewhenusingastandardanaloguePOTStelephoneasthereflected voiceisheardbackatthesametimeasyouarespeaking.Ifthedelayisunder5msitmerges withthesidetone,whichisthesoundofyourownvoiceinyourearpieceandbecomes unnoticeable.However,whenusingatelephoneconnectedtoanIPPBXthevoiceisdelayed slightlyduetothespeechencodinganddigitalprocessing,whichresultsinecho.Thehybrid deviceintheprovidersexchangeissupposedtosubtractthecorrectproportionofthesignal transmittedinordertoeliminatetheechofromthelocalloopbackportionofthecircuit. Unfortunatelythoughpoorlydesignedhybriddevicesareoftenusedanditsverycommonfor impedancesettingstobeimproperlybalanced. PCICardCommonInstallationIssues NovavoxLimited20072008 Page14of36

Itshouldbenotedthatitispossibleforsomecalls madeusingaPSTNlinetosufferfrom echoproblemswhilstothercallsmadeoverthesamelineremainechofree.Forexample, longdistancecallsover600kmareroutinelyechocancelledateachendandmobilephone callstothePSTNarealsoechocancelledsothesetypesofcallwillnotsufferfromecho issues. Inadditiontoechocausedbyhybridbalancingissuesintheexchange,poorqualityinbuilding cablingandsplitterscanalsogenerateechoduetobouncebackcausedbyimpedance variations.

5.2 Solution
5.2.1 CheckforAcousticEcho

Whensolvingechoissuesthefirststepistomakesurethatthesourceoftheechoisnot acousticechobeingcausedbyatelephonehandset/softphone.Methodstodetermine whetherornottheissueisduetoacousticechoare: Doestheremotepartyhearechoorjustthelocalparty?Ifitsbothpartiestheecho mustbeacousticecho. TrymakinganinternalcallbetweenextensionsconnectedtothesameIPPBXora calloveraSIPtrunk,iftheechoisstillpresentit mustbeacousticecho. Holdyourhandoverthemouthpiece/microphoneduringacalltoseeiftheechoisstill present.

Ifitisacousticechothereareanumberofrelativelysimplesolutionsavailable: 5.2.2 Tryturningdownthevolumeonthehandset/speakerphone,mostacousticecho problemscanbegreatlyreducedbysimplyturningthevolumedown. Trymovingthespeakerphonetoaroomthatislesslikelytocreateecho,e.g.a carpetedroomwithsoftfurniturethatcanabsorbthesoundratherthanreflectitback. Tryusingadifferenthandset/headset/speakerphone. ChecktheZaptelModuleOperatingMode

IftheechocanonlybeheardwhenmakingcallsusingaPSTNlinethentheechomustbe lineecho.Theprimaryobjectindealingwithlineechoistotryandpreventtheechofrom occurringinthefirstplace.AllOpenSourcetelephonycardssoldbyNovavoxhavetuneable parametersthataffecttheoperatingcharacteristicsandhaveanimpactonvoicequalityand echo.Someoftheparametersarecountrydependant,andthereforethezapteldrivermodule forthecardneedstoknowwhichcountryparametertouse. Tosetthecorrectoperatingmodetheappropriateoptionneedstobeaddedtothe /etc/modprobe.conffile. Note:DebianbasedLinuxdistributionslikeUbuntudonothavea/etc/modprobe.conffile. Insteadmodulescanbeloaded/unloadedbycreatingaconfigurationfilewiththerelevant optionsandstoringitinthe/etc/modprobe.d/directory.Forexample,youcouldcreateafile called modprobe.confin/etc/modprobe.d/andaddthelinesdescribedabove.Aftercreating thefilerunupdatemodulestomergethechangeswiththesystemmodulesconfiguration. TheoptionsareOpenSourcetelephonycardspecific,twoexamplesareprovidedbelow: X100PSEcards ThedefaultoperatingmodefortheZaptelwcfxodriverisFCC/USlinestandards.Tochange theoperatingmodetoCTR21tosupportEuropeanlinestandardsaddthefollowinglinesto modprobe.conf: PCICardCommonInstallationIssues NovavoxLimited20072008 Page15of36

optionswcfxoopermode=1 installwcfxo/sbin/modprobeignoreinstallwcfxo&&/sbin/ztcfg ThenshutdownandrestarttheIPPBX: #shutdownrnow Tocheckthatthecorrectmodeisinoperationusethefollowing: #dmesg|more Theoutputshouldinclude: ... wcfxo:DAAmodeis'CTR21' FoundaWildcardFXO:WildcardX100P ... ThisconfirmsthatthecardisrunninginEuropeanCTR21mode. Pleasenote:TheZaptelwcfxodriveronlysupportsCTR21modewith600ACtermination, whichmayormaynotbethecorrectsettingdependingonthecountryandthephonesystem inuse.Forexample,intheUKBTPSTNlinesusecompleximpedance,whereasPSTNlines fromsomecablecompaniesmayuse600impedance.Also,theSiliconlabsSi3014/Si3034 DAAchipusedontheX100PSpecialEdition(SE)soldbyNovavoxsupportsgloballine standards.However,theSi3012/Si3035DAAchipusedintheoriginalDigiumX100Pcard andlowcostX100PclonecardsonlysupportsFCC/JATElinestandards.Therefore,unless youhaveanauthenticX100PSEcarditisunlikelythatyourX100Pcardwillsupport EuropeanCTR21mode. Tosupportgloballinestandardswehaveputtogetherasetupguidethatusesapatchto provideadditionaloperationalmodestosupportlinestandardforallcountries.Ifyourcountry isnotsupportedbythedefaultFCCmodeorCTR21600impedancemodethenusethe instructionsinthefollowingguidetoconfiguretheappropriatesettingsforyourcountry: NovavoxX100PSEGlobalLineStandardsSetupGuide OpenVoxA400Pcards ThedefaultoperatingmodefortheZaptelwctdmdriverisFCCUSlinestandards.Tochange theoperatingmodetosupportthelinestandardsforadifferentcountryaddthefollowinglines tomodprobe.conf: ... optionswctdmopermode=<country_code> installwctdm/sbin/modprobeignoreinstallwctdm&&/sbin/ztcfg ... Forexample,thecountrycodefortheUKisUK.Alistofcountrycodesforothercountriesis providedinAppendixB.Pleasebeawarethatnotallcountrycodesaresupported. AfterconfiguringthecorrectoperatingmodeforyourcountryshutdownandrestarttheIP PBX: #shutdownrnow Tocheckthatthecorrectmodeisinoperationusethefollowing: PCICardCommonInstallationIssues NovavoxLimited20072008 Page16of36

#dmesg|more Theoutput(usingtheUKoperatingmodeasanexample)shouldinclude: Module0:InstalledAUTOFXO(UKmode) Module1:InstalledAUTOFXO(UKmode) Module2:InstalledAUTOFXS/DPO Module3:InstalledAUTOFXS/DPO ThisoutputisforanOpenVoxA400P22with2FXSandFXOmodules,theoutputwillvary dependingonthemodulesinstalled. 5.2.3 BalancingtheHybrid

SomeOpenSourcetelephonycardssuchastheOpenVoxanaloguecardrangesoldby Novavoxhaveaprogrammabledigitalhybridfornearendechoreduction.Fxotuneisatool usedtoautoconfigurethePSTNlineimpedancesettingsforcardsthathaveaprogrammable digitalhybrid.Beforeusingthefxotunetool,firstofallensurethattheFXOportsare connectedtothePSTNandthenstopAsterisk(otherwisefxotuneconsidersthelinesas busy): #amportalstop/CLI>stopnow Nextstartthefxotunetool: #fxotunei5 Thenumber5isadialleddigitusedtobreakdialtoneontheline,anynumberthatwillbreak dialtoneonthelinemaybeused.TheioptioninstructsfxotunetotestthePSTNline impedanceforeachconnectedPSTNline(maytakeupto10minsperline)andsetthe correspondingparametersinthefxotune.conffile(normallylocatedin/etc/).Oncecomplete, applythecalibrationsettingsdefinedinthefxotune.conffileusing: #fxotunes BeforefinallyrestartingAsterisk: #amportalstart/#asterisk EverytimeanewPSTNtrunklineisaddedorchangedfxotunei5shouldberun. ThelatestZapteldriverversionsincludethecommandfxotunesintheZaptelinitscript (usuallylocatedin/etc/init.d/)toautomaticallyloadthefxotunecalibrationsettingswhenthe systemisreloaded.IfyouareusinganolderTrixboxversionlike2.2thenthefxotunes commandis includedin/etc/rc.d/rc.localscript. TocheckwhetherornotthefxotuneicommandisalreadyincludedinoneofyourIPPBX scriptsopenuptherelevantscriptsusingatexteditorlikenanoandsearchthetextfor fxotune.Ifthecommandisnotincludedthenadd/usr/sbin/fxotunestothe /etc/rc.d/rc.localscripttoensurethatthefxotunecalibrationsettingsareautomatically reloadedfollowingareboot. 5.2.4 Adjustingthereceive/transmitgain

OneofthefactorsthatcanhaveanimpactonechoisthesettingofcorrectRX/TXaudiogain valuesforyourtelephonelineinthe/etc/asterisk/zapata.conffile.Unfortunatelythereisno suchthingasastandardRX/TXgainsettingthatwillworkforallinstallationsasevery installationisdifferentduetodifferencesintelephonelinequality,impendence,linelength, PCICardCommonInstallationIssues NovavoxLimited20072008 Page17of36

etc.However,Asteriskprovidesausefultoolcalledztmonitortohelpsettheappropriate RX/TXgainvalues.Usingthecommand: #ztmonitorv Willprovideyouwiththefollowingoutput: VisualAudioLevels. Usezapata.conffiletoadjustthegainsifneeded. (#=AudioLevel*=MaxAudioHit) <(RX<(TX ##################* ##################* TousetheztmonitortoolmakeatelephonecallandobservetheRX/TXlevelswhilstyouare speaking.TheRX/TXbarsshouldbothideallybeabout50%,thepeaksshouldnotbetoo highortoolow. Ifthebarsaretoohigh/lowthenyoucanadjusttheRX/TXgainsettingsinthezapata.conffile: rxgain=0.0 txgain=0.0 TheTX/RXvaluesthatcanbeconfiguredrangefrom100to100(100%to100%of capacity).However,itisgenerallyrecommendednottoputthevaluestomorethan11to+11 andinsomecaseanythingoutsideofthe5to+5rangemaycauseaudioissues. Duringacall,ifyouneedtoadjusttheRX/TXsettings,makethechangestothezapata.conf fileandsaveit,thenswitchtotheAsteriskCLIandtypethefollowing: CLI>modulereloadchan_zap.so Thiswillreloadthezapmodulewithouthangingupthecall.Afterconfiguringthecorrect RX/TXvaluesandhangingupthecallstopandrestartAsterisktoensurethenewsettings takeeffect. #amportalstop/CLI>stopnow #amportalstart/#asterisk TheRX/TXgainswillvarydependingonthelocationofthecalled/callingparty.Therefore,itis advisablewhenusingztmonitortocalldifferentnumbersindifferentlocationstoachievethe optimalsettings. 5.2.5 InbuildingCabling/Splitters

Amongstotherthings,poorqualityinbuildingcabling,longcablespans,splitterscancreate echoduetobouncebackcausedbyimpedancevariations.Ifyouthinkthequalityofthein buildingcabling/splitterscouldbeacauseofecho,thentryconnectingtheportontheIPPBX PSTNlinecarddirectlytotheexchangeNTEboxusingagoodqualitymodemcable.Ifthat fixestheissuethenfollowthecablingrouteandcarryoutsectionteststotryandlocatethe sourceoftheecho. 5.2.6 IPPBXVoiceSwitchingDelay

Asstatedinsection4,themostimportantfunctionofanIPPBXsystemistoswitch/move digitalsoundsamplesfromoneport/protocoltotheotheratveryconstantrate.Ifthesound samplesaredelayedastheytraversetheIPPBXthenthiscancauseecho.Thedelay introducedbyanIPPBXmaybeduetospeechencoding,digitalprocessing,orboth. PCICardCommonInstallationIssues NovavoxLimited20072008 Page18of36

IfitissuspectedthattheIPPBXitselfcouldbethecauseoftheechothefirststepshouldbe tocheckforandresolveanyIRQissuesusingthemethodsdescribedinSection4. IftheredoesnotappeartobeanIRQissue,thenthegeneralperformanceoftheIPPBX shouldbeassessed.SysteminformationprovidedbyanIPPBXGUI(e.g.TheSystemStatus screenintheTrixboxGUI)canprovidehelpfulinformationonsystemperformance,i.e.things likememoryusage,networkusageandfilesystemcapacity.Commandlinetoolsthatare usefulinclude: #vmstatProvidesinformationonCPU/memoryusageaswellsystemI/Oinformation #uptime CPUloadinformationbasedon5,10,15minuteaverages #psaux Staticsnapshotoverviewofsystemprocesses #top Dynamicoverviewofsystemprocessesupdatedevery10seconds SolvingIPPBXserverperformanceissuesisoutsidethescopeofthisdocument.However, thecommandslistedaboveshouldactasagoodstartingpointtohelpdetermineifthereisa performanceissueandwhatthecausemaybetoallowasolutiontobefound,e.g. install extramemoryorremoveunnecessaryapplications/processes. 5.2.7 EchoCancellation

Background Thesuggestionsaboveareallintendedtohelpstoptheechobeingcreatedinthefirstplace. Ifthesedonotworkthenthesolutionistouseechocancellationtoremoveechofromthe voicecommunication.Echocancellationfirstofallrequiresrecognizingtheoriginally transmittedsignalthatafteradelayreappearsinthetransmittedorreceivedsignal.To recognisetheechoreturnlevel(ERL)needstobelowerthantheoutputsignallevelbya certainamountinorderforittointerpretthesignalasecho.Oncetheechocanceller recognisestheechoitcanberemovedbysubtractingitfromthetransmittedorreceived signal. Echocancellationcanbeimplementedinhardwareusingadedicateddigitalsignalprocessor (DSP),orinsoftware.Itisoftenassumedthathardwarebasedechocancellationissuperior tosoftwarebasedechocancellation.However,ahardwarebasedechocancellerisjustan echocancellationalgorithmimplementedinfirmwareonaDSPchip.Thereisnoinherent reasonwhythesamealgorithmcouldntworkequallyaswellinsoftwareonaCPU.Saying that,softwarebasedechocancellationdoeshaveanimpactonCPUusageanditsuseisnot feasibleforlargenumbersofchannels,e.g.multipleE1/T1s. Oneofthefactorsthatdetermineshowmuchprocessingresourcesasoftwarebasedecho cancellerrequiresisthetailcircuitdelay.Thetailcircuitencompasseseverythingfromthe OpenSourcetelephonycardPSTNportallthewaydowntotheterminatingphone.Tailcircuit delayisthetimeperiodbetweenthepointatwhichtheoriginalaudiosignalexiststheecho cancellerandthetimeatwhichitreturnsasecho.Theechocancellerneedstokeeparecord oftheaudioithassentforatimeperiodequaltothetailcircuitdelaytodetermineifthesame audiohascomeback.Tokeeparecordoftheaudioittakesdigitalsoundsamplesatset intervalscalledtaps. TheZaptel/Asteriskechocancellerstakedigitalsamplesatarateof8,000persecond,which meanstheintervalbetweeneachtapis0.125ms.ThedefaultnumberoftapsinAsteriskis 128,whichwillhandleechopathsofupto16msandis usuallyadequateformostecho issues.Thenumberoftapsisalwaysconfiguredasapoweroftwo,i.e.32,64,128,or256. Thelowestnumberoftapsaspossibleshouldbeusedwhilestilladequatelycancellingthe echoasitreducesthecomputingloadandmemoryrequirementontheIPPBX.Also,the trainingtimeisshorterandthecancellerwilladaptfaster. Zapata.confEchoConfiguration PCICardCommonInstallationIssues NovavoxLimited20072008

Page19of36

AnexampleZapata.confconfiguration(usuallylocatedin/etc/asterisk/) forenablingecho cancellationisprovidedbelow: echocancel=yes echocancelwhenbridged=no echotraining=400 echocancel Thisparameterdisables[no]orenables[yes]echocancellation.Itisrecommendedtoleaveit enabledevenoftheredoesntappeartobeanechoissueunlessthereisareasonnotto,e.g. lackofCPUresource.The[yes]settingsetsthenumberoftapsto128,butanintegercanbe usedinsteadtochangethenumberoftapsto16,32,64,128,or256. echocancelwhenbridged Thisparametersenables[yes]ordisables[no]echocancellationwhenTDMcallsarebridged. GenerallyitsnotnecessaryoradvisabletoenableechocancellationsforbridgedTDMcalls butitcanbeenabledifrequired. echotraining TheechotrainingoptioninAsteriskisamechanismforimprovingtheconvergencetimeofthe echocanceller.Transmittedvoiceisdisabledforashorttimeperiodduringringinganda spikeofsoundistransmittedtomeasurethedifferenceinthereceivedechoandtransmitted signaldirectlyinsteadoflearningititerativelyovermanysamples.Theechotrainingoption eliminatesmostoftheechoatthebeginningofthecallinthemajorityofcases.Validsettings forechotrainingare102000millsecondswhichspecifiesthedelaybeforetraining. Pleasenote:echotrainingisnotsupportedbytheOpenSourceLineEchoCanceller (OSLEC)andmustbecommentedoutotherwiseitwillcausethechanneltobesilent.OSLEC isinstalledbydefaultinTrixboxversions2.4andupwardsandoffersbetterechocancellation performancethanthezaptelechocancellers. RemovingEcho Theechocancelandechotrainingoptionsmayneedtobefinetunedinordertogetridofecho completely.Differentparametersshouldbeusedonaniterativetrialanderrorbasisuntilthe optimumechocancelandechotrainingsettingsaredeterminedforanIPPBXsystem. Itisadvisabletostartwithanechocancelsettingof32andaechotrainingsettingof100. Incrementtheechotraininginstepsof100butdonotexceedanechotrainingsettingof1200. Asteriskmustberestartedeachtimeoneoftheparametersismodifiedinorderforthe changestotakeeffect.Ifechoisstillpresentafterreachinganechotrainingsettingof1200, incrementtheechocanceloptiontothenextsetting(64)andrepeattheprocessuntiltheecho iscompletelygone. Tospeeduptheprocedureyoucanincreasethesettingsusinglargerintervals(e.g.increase theechotrainingdelayby400eachtime)andcanevenstartatthehighestsettingsandwork backiftheechoisextremelybad(e.g.256taps,1200millsiceondstraining). ChangingtheEchoCanceller Ifthereisstillechopresentafterfollowingtheproceduredescribedabovethenitispossibleto tryusingadifferentechocanceller.OneoptionistotrytheOSLECechocanceller, instructionsoninstallingtheOSLECechocancellercanbefoundhere: http://www.rowetel.com/ucasterisk/oslec.html#install PCICardCommonInstallationIssues NovavoxLimited20072008 Page20of36

AnotheroptionistotryadifferentZaptelechocanceller.InolderZaptelversionsthedefault echocancellerisECHO_CAN_KB1.AnewerechocancellerisECHO_CAN_MG2,whichis thedefaultfornewerZaptelversions.Italsopossibletousethe AGGRESSIVE_SUPPRESSORinconjunctionwithECHO_CAN_MG2foraggressiveresidual echosuppression. Tochangethedefaultechocancelleryouneedtoopenupthezconfig.h file(locatedin /user/src/zaptelor/user/src/zaptel/kernel)usingatexteditorlikenanoandcommentin/outthe requiredechocanceller.Forexample,ifyourdefaultechocancellerwasECHO_CAN_KB1 andyouwantedtochangetoECHO_CAN_MG2withAGGRESSIVE_SUPPRESSORyou wouldneedtoedityourzconfig.hfilesoitshows: /* *Pickyourechocanceller:MARK2,MARK3,STEVE,orSTEVE2:) * */ /*#defineECHO_CAN_STEVE*/ /*#defineECHO_CAN_STEVE2*/ /*#defineECHO_CAN_KB1*/ /*Thisisthenewlatestandgreatest*/ #defineECHO_CAN_MG2 . *Uncommentforaggressiveresidualechosuppressionunder *MARK2,KB1,andMG2echocanceler */ #defineAGGRESSIVE_SUPPRESSOR AfterchangingthefilesaveitandthenrecompileAsterisk.Instructionsondownloadingand compilingtheZaptelsourcecodeitcanbefoundinAppendixD. OctWareSoftEcho Analternativetospendingtimetweakingzapata.confsettingschangingrx/txgainsistosimply installOctWareSoftEcho.TheSoftEchoalgorithmisautotuningmeaningthatnoadjustments arenecessarymakingintegrationquickandsimple.SoftEchoprovidescarriergradevoice qualityforAsteriskIPPBXvoicechannels,keyfeaturesinclude: Excellentdoubletalkhandling Fastconvergence Highqualitybackgroundnoisehandling Longechotailupto128ms Performanceandvoicequalitystatistics Autotuningtransparentalgorithm Dialtoneanddigittransparency G.1682004compliant

LeveragingOctasic'ssoundprocessingexpertisebasedonyearsofexperienceintrunkside aswellaslocalsidenetworkechocancellation,OctWarehavedevelopedasoftwarebased echocancellingalgorithmcalledSoftEcho.Withsupportforupto16voicechannels,SoftEcho isacosteffectivewayforAsteriskIPPBXintegratorstooffercarriergradevoicequality. SoftEchoeffectivelyeliminatescustomers'supportcallsaboutunsatisfactoryvoicequality. SoftEchocanbeusedwithanyOpenSourcetelephonycardsincludinganaloguecardslike theX100PSEanddigitalcardsliketheOpenVoxB100P. OctWareSoftEcholicencesareavailabledirectlyfromNovavox: http://www.novavox.co.uk/products/software/softecho.html PCICardCommonInstallationIssues NovavoxLimited20072008 Page21of36

6 FarendDisconnect
6.1 ProblemDescription
Farenddisconnectisthetermusedtodescribethesituationwhenthefarendhangsup duringatelephonecall,i.e.theremoteendfromtheperspectiveoftheIPPBX.Ifalocaluser isonthephonewhenthefarenddisconnectstheuserwillknowthecallhasendedandwill hangupthephoneatlocalend.However,eventhoughthelocaluserhangsuptheIPPBX maynotreleasethePSTNlineifitthinksthatthefarendisstillconnected.Also,ifsomeone isleavingavoicemailmessagethentheIPPBXneedstoknowwhenthefarendhashungup otherwiseitwillrecordsilenceordial/busytone. ThemethodbywhichtheIPPBXlearnsthatthefarendhasdisconnectedisknownas disconnectsupervisionsignalling.Themostreliableformofdisconnectsupervisioniswhere thelocalexchangedropsbattery/voltagemomentarilyonthephonelinetoindicatetothe phone/PBXthattheotherendofthepartyhasdisconnectedthecall,i.e.toprovidehangup notification.This voltagedropisknownasCPC(CallingPartyControl)orDisconnectClear Time(DCT)intheUK.Thistypeofdisconnecthasvariousnamesindifferentcountries includingforwarddisconnect,batteryremoval,openloopdisconnectandclearforward answerreversal. Anothertypeofdisconnectsupervisionsignalusedinsomecountriesisreversepolarity,also calledreversebattery.WhenreversepolaritydisconnectsupervisionisbeingusedthePSTN providerreversesthepolarityofthebatterycurrentforbothanswersupervisionand disconnectsupervision. Theleastreliablemethodofdisconnectsupervisionistheuseofdisconnect/busytone.When thefarenddisconnectstheIPPBXreceivesadisconnect/busytonetoindicatethatthecallis disconnected. FarenddisconnectissuesarisewhenthefarenddisconnectsbuttheIPPBXdoesnot receiveormisinterpretsthedisconnectionsupervisionsignal.

6.2 Solution
Thefirstthingtocheckwhenexperiencingfarenddisconnectissuesthatthecorrect signallingtypeisconfiguredinthezaptel.conf(e.g.fxsks=1)andzapata.conf(e.g. signalling=fxs_ks)configurationfiles.Kewlstartisthepreferredsignallingprotocolfor analoguecircuitsinAsteriskandisthesignallingprotocolthatshouldbeusedintheUKand themajorityofEuropeancountries.Asummaryofthedifferentsignallingmethodsisprovided inAppendixA. IfyourPSTNproviderusesvoltage/batterydropfordisconnectsupervisionbutfarend disconnectisnotworkingthentheCPC/DCTprovidedbythePSTNprovidermaybesettoo low.ForexampleintheUKtheidealDCTis800ms,however,itmaybesetaslowas100ms andmaynotbedetectedbyyourIPPBX.TosolvethisissuecontactyourPSTNproviderand askthemtoincreasetheCPC/DCTforyou. IfyouPSTNproviderprovidesreversepolarity/batterydisconnectsupervisionthenthe followingtwolinesshouldbeincludedinthezapata.conffile: hanguponpolarityswitch=yes answeruponpolarityswitch=yes .

PCICardCommonInstallationIssues NovavoxLimited20072008

Page22of36

Forlinesthatrelyondisconnect/busytonedisconnectsupervisionthefollowinglinesshould beincludedinthezapat.conffile: busydetect=yes busycount=6 WithbusydetectenabledAsteriskwilllistenforbusysignalsontheline,ifyourPSTNprovider sendsyouabusytonefollowingfarendhangupAsteriskshoulddetectit.Itshouldbenoted thatthisoptionislessreliablethanotherhangupdetectionmethodsandassuchshouldonly beusedifitstheonlyoptionavailable.Busycountisthenumberofbusytonestodetect beforerecognisingthatthefarendhasdisconnected.Thelowerthevaluethequickerthecall willhangup,butthereisatradeofftconsiderasthis increasesthepossibilityoffalse hangups. Youcanalsotryenablingcallprogress,andsetyourprogzonetoyourcountrycode(see appendixB).Thisoptionissimilartothebusydetectoption,butwillalsolistenforaringing tone,congestiontoneandwilltrytodetectifthelinegotanswered.However,callprogressis experimental,soifyouexperiencefrequentdisconnects,youshoulddisableit.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page23of36

7 KernelPaniconReboot
7.1 ProblemDescription
SometimesafterinstallinganewOpenSourcetelephonycardyoumaygetaKernelpanic errorsimilartotheoneshownbelowwhenyoureboottheIPPBX: Code:BadEIPvalue <0>Fatalexception:panicin5seconds KernelPanicnotsyncing:Fatalexception TheissueeffectssomeIPPBXbuildsbutnotothersandisduetotheZaptelmodulesbeing unloadedbeforeAsteriskhasbeenstoppedwhenrebooting.

7.2 Solution
TosolvetheissueweneedtostopthezaptelmodulesfrombeingunloadedbeforeAsteriskis stoppedwhenrebooting.Thiscanbeachievedbycommentingoutthesectionthatunloads thedriversinthezaptelstopscriptlocatedinthe/etc/rc6.ddirectory,i.e.thedirectorythat containsthescriptsthatareexecutedwhenthesystemisrebooted. ThenameoftherelevantscriptisKxxzaptel,wherexxisanumberbetween0099(the numbercorrespondstotheorderinwhichthescriptisexecuted).InourTrixbox2.6.07test systemtherelevantscriptis/etc/rc6.d/K92zaptelandtherelevantlinesthatneedto commentedout(byplacinga#atthestartofeachline)areshownbelow(lines228233 andline238)asshownbelow: stop) #Unloaddrivers #shutdown_dynamic#FIXME:needstestfromsomeonewithdynamic spans #echon"Unloadingzaptelhardwaredrivers:" #unload_modulezaptel #RETVAL=$? #echo"." #[$RETVALeq0]&&rmf$LOCKFILE unload) #Wedon'thavezaptelhelper,solet'snotreplicatetoomuch code: #allowotherstousetheunloadcommand. #unload_modulezaptel InolderZaptelversionstherelevantlinesare115123asshownbelow: #Unloaddrivers #echo"Unloadingzaptelhardwaredrivers:" #forxin$RMODULESdo #action"Unloading${x}:"rmmod${x} #done #action"Removingzaptelmodule:"rmmodzaptel #RETVAL=$? #[$RETVALeq0]&&rmf/var/lock/subsys/zaptel Therelevantlinesinyourzaptelstopscriptmaybeslightlydifferentthesectiontolookoutfor istheonethatsaysincludes"Unloaddrivers". PCICardCommonInstallationIssues NovavoxLimited20072008 Page24of36

Ifamendingthezaptelstopscriptdoesntfixtheissuethenyouwillneedtoensurethat Asteriskisshutdownbeforerebooting,i.e. #amportalstop/CLI>stopnow #shutdownrnow ItisadvisabletoaddthecommandtostopAsterisktooneoftherebootsscriptstoensure thatAsteriskisalwaysstoppedbeforetheZaptelmodulesareunloadedwhentheIPPBX serverisrebooted.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page25of36

8 QuickReference
UsefulCommands
Command #amportalstart #amportalstop #asteriskr #cat/proc/interrupts #chkconfig #dmesg|more #fxotune #hdparm #lsmod #lspciv #modprobe #psaux #setpci #top #uptime #vmstat #ztcfgvv #ztmonitor #zttool #zttest CLI>exit CLI>reload CLI>zapshowchannels CLI>zapshowstatus CLI>stopnow Description StartAsterisk StopAsterisk ConnecttotheAstersikCLI ListsPCIbusdrivers/devicesrecognisedbytheLinuxKernelalong withtheallocatedIRQ Commandforadding/removinggstartupscriptsandmanaging whichrunleveltheyoperateat DiagnosticmessagecommandusedtolookattheKernelsboot processmessagebuffer ToolusedtoautoconfigurethePSTNlineimpedancesettingsfor cardsthathaveaprogrammabledigitalhybrid. ProgramthatinteractswithLinuxIDEdrivertoobtainandalterdisk parameters Listsinformationaboutallloadedmodules Linuxutilitythatdisplaysinformationaboutdevicesconnectedto thePCIbus,voptiondisplaysIRQallocationdetails Addsaloadablemoduletothekernel,e.g.zaptelorwcfxo Staticsnapshotoverviewofsystemprocesses UtilityforqueryingandconfiguringPCIdevices Dynamicoverviewofsystemprocessesupdatedevery10seconds CPUloadinformationbasedon5,10,15minuteaverages ProvidesinformationonCPU/memoryusageaswellsystemI/O information Reloadsthezaptel.confconfiguration,"vv"optionprovides informationonconfiguredzapchannels TooltohelpsettheappropriateRX/TXgainvalues TheZaptelTool(zttool)commandshowsthecurrentstatusofany Zaptelsupportedinterfacecards ZaptelTest(zttest)isatimingtesttodeterminetheaccuracyofthe Zapteltiming ExitfromAsteriskCLI ReloadAsterisk ShowsZapchannelsrecognisedbyAsterisk ShowsZapteldevicesrecognisedbyAsterisk StopsAsterisk

PCICardCommonInstallationIssues NovavoxLimited20072008

Page26of36

ConfigurationFileDescriptions
File /etc/inittab /etc/zaptel.conf /etc/asterisk/zapata.conf /etc/asterisk/zapataauto.conf /etc/asterisk/extensions.conf /etc/asterisk/indications.conf /etc/rc6.d/KxxZaptel Description Fileusedtoconfigurerunlevelmodes UsedbytheZapteldrivertodefinetherelevantparameters forzaptelsupportedhardwaredevices UsedbyAsterisktostoreinformationaboutZapteldevices andthefeaturessupported Automaticallygeneratedbygenzaptelconf,containsZaptel hardwareconfigurationinformationusedbyAsterisk Containsdialplaninformationintheformofinstructions calledextensions,whicharegroupedbycontexts Containsinformationaboutthesoundsthataphonesystemin aparticularcountrymakesforvariousindications Zaptelrebootlevelstopscript

PCICardCommonInstallationIssues NovavoxLimited20072008

Page27of36

9 FurtherAssistance
ThefollowingareusefullinksforIPPBXserverconfiguration: TrixboxWithoutTearshttp://dumbme.voipeye.com.au/trixbox2/trixbox2_without_tears.pdf ElastixWithoutTearshttp://www.elastixconnection.com/downloads/elastix_without_tears.pdf AsteriskInstallationGuidehttp://www.voipinfo.org/wikiAsterisk+installation+tips TrixboxInstallationGuide http://www.trixbox.org/wiki/trixboxquickinstallguide PBXinaFlashInstallationGuidehttp://pbxinaflash.net/docs/InstallPBXInAFlash1.2.pdf LinkstotheonlineforumsandwikisforassistanceinstallingAsterisk/Trixboxareprovided below: AsteriskWiki http://www.voipinfo.org/wikiAsterisk AsteriskForum http://forums.digium.com TrixboxForumhttp://www.trixbox.org/forum TrixboxWikihttp://help.trixbox.com Forproductinstallationguidesandsupportcontactinformationpleasevisitoursupportpage: www.novavox.co.uk/support Novavoxcustomersonly:Ifafterfollowingtheguidanceprovidedonthesupportpageyou areunabletoresolvetheissuethenpleasecontactusatsupport@novavox.co.uk.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page28of36

AppendixASignallingmethods
Groundstart(gs) GroundstartsignallingalsoknownasEarthStartandisnotverycommon.ThePBX/phone signalsacallbyconnectinganearthtooneofthewiresandcurrentflowsfromthePBXearth tothelocalexchangebattery.Thelocalexchangerespondsbysendingdialtonetothe PBX/phone.ThelocalexchangesignalsacalltothePBX/phonebyputtinganearthononeof thewires.ThePBX/phonedetectstheearthandlooksforringingvoltagewhichthelocal exchangesends. Loopstart(ls) Loopstartsignallingissupportedbythemajorityofanaloguephonelines.InLoopstart signallingthelocalexchangesignalsacallbysendingringingvoltagetothephone/PBX.It allowsaphonetoindicateonhook/offhook(andaPBXtoseizetheline)byputtingaloop acrossthewires.Thelocalexchangerespondsbysendingdialtonetothephone/PBX. Kewlstart(ks) Kewlstartsignallingworksinthesamewayasloopstart,butitallowsthelocalexchangeto dropbattery/voltagemomentarilyonthephonelinetoindicatetothephone/PBXthatthe otherendofthepartyhasdisconnectedthecall,i.e.toprovidehangupnotification.This voltagedropisknownasCPC(CallingPartyControl)orDisconnectClearTime(DCT)inthe UK.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page29of36

AppendixBCountrycodes/zones
Code at au be br ch cl cn cz de dk ee es fi fr gr hu il in it lt mx nl no nz pl pt ru se sg tw uk us uso ve za Country/Zone Austria Australia Belgium Brazil Switzerland Chile China CzechRepublic Germany Denmark Estonia Spain Finland France Greece Hungary Israel India Italy Lithuania Mexico Netherlands Norway NewZealand Poland Portugal Russia Sweden Singapore Taiwan UnitedKingdom/Ireland UnitedStates UnitedStatesOld Venezuela SouthAfrica

PCICardCommonInstallationIssues NovavoxLimited20072008

Page30of36

AppendixCZaptel.confconfigurationparameters
busycountBusycountisthenumberofbusytonestodetect,whenbusydetectisenabled. Thelowerthevaluethequickerthecallwillhangup,butthisincreasesthepossibilityoffalse hangups.[positiveinteger] busydetect Withthisoptionenabled,asteriskwilllistenforbusysignalsontheline,ifyour carriersendsyouabusytoneonahangup,Asteriskshoulddetectit.Itshouldbenotedthat thisoptionislessreliablethanotherhangupdetectionmethodssuchaspolarityreversaland CPC(CallingPartyControl)soshouldonlybeusedtodetecthangupsiftheothermethods arenotsupported.[yes/no] calleridCallerIDcanbesettoasreceivedoraspecificnumberifyouwanttooverrideit. Pleasenotethatasreceivedonlyappliestotrunkinterfaces.[asreceivedoraspecificnumber] callgroup,pickupgroupSupportsringgroups(a.k.a.callgroups)andpickupgroups.Ifa phoneisringinganditisamemberofagroupwhichisoneofyourpickupgroups,thenyou canansweritbypickingupusingthepickupcode.Forsimpleoffices,justmaketheseboth thesamepositiveinteger. callprogress,progzoneThisoptionissimilartothebusydetectoption,butwillalsolisten foraringingtone,congestiontoneandwilltrytodetectifthelinegotanswered.However,this featureisexperimentalandcaneasilydetectfalseanswersanderrors.Fewzonesare supported,butmaybeselectedwithprogzone[yes/no,andtwolettercountrycodefor progzone]. callreturnSupportcallreturn.[yes/no] callwaitingEnablecallwaitingonFXOlines.[yes/no] callwaitingcalleridSetswhethertoreceivecallerIDduringcallwaitingindication.[yes/no] canparkAllowcallparking.[yes/no] cidsignallingTypeofcallerIDsignallinginuse. bell=bell202(US) v23=v23(UK) dtmf=DTMF(Denmark,Sweden,&Netherlands) cidstartIdentifieswhatsignalsthestartofcallerID. ring=aringsignalsthestart polarity=polarityreversalsignalsthestart contextDefinestheinitialcontextforthechannel.Thiswillbethecontextavailabletothe channelupontheinitiationofacall.Notethatcontextsareanimportantpartofmaintaining sitesecurity.Theinitialcontextwillgoverntheavailabilityofextensionstoagivenchannel.If anextensionisplacedinadifferentcontextfromtheinitialcontext,thatextensionis unavailabletothecaller. echocancelEnableechocancellation.[yes/no,orapoweroftwofrom32to256tosetthe numberofcancellationtaps] echocancelwhenbridgedGenerally,itisnotnecessary(andinfactundesirable)toecho cancelwhenthecircuitpathisentirelyTDM.Youmay,however,reversethisbehaviourby enablingtheechocancelduringpureTDMbridging.[yes/no] PCICardCommonInstallationIssues NovavoxLimited20072008 Page31of36

echotrainingInsomecases,theechocancellerdoesn'ttrainquicklyenoughandthere isechoatthebeginningofthecall.EnablingechotrainingwillcauseAsterisktobrieflymute thechannel,sendanimpulse,andusetheimpulseresponsetopretraintheechocanceller soitcanstartoutwithamuchcloserideaoftheactualecho.[yes,no,oranumberof milliseconds(102000)todelaybeforetraining] faxdetectUponfaxdetection,routesfaxtoafaxextension.[Both,incoming,outgoing,or no.] groupAllowsanumberofchannelstobetreatedasoneforthepurposeofdialing.For dialingout,thechannelswillbecalledonafirstavailablebasis.Forthepurposeofringing stations,allchannelsinthegroupwillringatonce.Takesanintegerfrom0to63andmultiple groupscanbespecified. hanguponpolarityswitchInsomecountries,apolarityreversalisusedtosignalthe disconnectofaphoneline.Ifthisoptionisenabled,thecallwillbeconsidereddisconnected onapolarityreversal.[yes/no] hidecalleridSetswhethertohideoutgoingcallerID,defaultstono.[yes/no] immediateSpecifywhetherthechannelshouldbeansweredimmediatelyorifthesimple switchshouldprovidedialtone,readdigits,etc.[yes/no] musiconholdSelectwhichclassofmusictouseformusiconhold.Ifnotspecifiedthen thedefaultwillbeused.Themusicclassisdefinedinmusiconhold.conffile.[default,loud, random] pulsedialUsepulsedialinsteadofDTMFforFXO(FXSsignalled)devices.[yes/no] relaxdtmfIfyouhavetroublewithDTMFdetection,youcanrelaxtheDTMFdetection parameters.RelaxingthemmaymaketheDTMFdetectormorelikelytohavetalkoffwhere DTMFisdetected.[yes/no] rxgainAdjustsreceivegain.Thiscanbeusedtoraiseorlowertheincomingvolumeto compensateforhardware/linedifferences.[Positiveornegativedouble,measuredindB] sendcalleridafterSomecountrieshaveringtoneswithasetofcadenceswhichdifferfrom thedefault.Thisrequiresthecalleridtobesetwithadelay,andnotrightafterthefirstring. [Positiveinteger] threewaycallingSupportthreewaycalling.[yes/no] transferSupportflashhookcalltransfer(requiresthreewaycalling).Alsoenablescall parking(overridesthecanparkparameter).[yes/no] txgainAdjuststransmit.Thiscanbeusedtoraiseorlowertheoutgoingvolumeto compensateforhardware/linedifferences.[Positiveornegativedouble,measuredindB] usecallerid WhetherornottousecallerID.[yes/no] usedistinctiveringdetectionIndicateswhetherornottoallowdistinctiveringdetectionon FXOlines.[yes/no]

PCICardCommonInstallationIssues NovavoxLimited20072008

Page32of36

AppendixDRecompilingZaptel
Guidelines
ZaptelSoftwareVersion DetailedinstructionsareprovidedbelowforrecompilingZaptelversion1.4.10.1,whichisthe versionusedinTrixbox2.6.07.IfyouwishtorecompileadifferentZaptelversion,thenyou willneedtoensureyoucheckwhatZaptelVersioniscurrentlyrunningandmodifythe instructionstodownload/installthecorrectversion. ConfigurationFileBackups Unlesssomethinggoeswrongyourcurrentconfigurationfilesshouldnotbemodifiedwhen recompilingtheZaptelsoftware.However,itisrecommendedtobackupcurrentconfiguration filesinjustcasesomethingdoesgoeswrong,particularlyiftheIPPBXisaworkingsystem. SoftwarePackageDependencies IfyouyourIPPBXhassoftwarepackagesinstalledthataredependantonZaptel,thenthere isapossibilitythattheymaynotworkproperlyafterrecompilingtheZaptelsoftwareandthey mayneedtobereinstalled.Also,ifyouhaveinstalledanyotherpatchesormodifiedanyof theoriginalZaptelsourcecode(e.g.tosupportvendorspecifichardwaredrivers)thenyouwill needtorepeatthesamecodechangesbeforerecompilingtheZaptelcode.

Instructions
Theinstructionsbelowarebasedonusingyumforpackageupdates/installationandwgetto downloadsourcecodetarballs.However,ifpreferredalternativemethodscanbeusedsuch asusingaptormanuallydownloadingrpmstoupdate/installpackagesandusingsvnto downloadsourcecode. 1.UpdatePackages Itisrecommendedthatyouensurethatallinstalledsoftwarepackagesareuptodateusing: #yumupdatey Warning:Ifyouhavepatchedanyinstalledpackagesthenthesewillneedtobepatchedand recompiledagainafterusingyum.Asanalternative,youcanjustupdatetheZaptelpackage asthisisbeingrecompiledanyway. 2.InstallkernelSourceTree Firstofallchecktoseeifyouneedtoinstallakernelsourcetreebyrunning: #lsl/lib/modules/`unamer`/build/.config||echo"Installkernel" Iftheoutputshows"Installkernelthencheckwhatkerneltypeyouneedasshownbelow, otherwiseproceedtostep3. Checkifyouareusingasmpkernelornot: #unamer|grepqsmp&&echo"InstallSMPkernel." Iftheoutputshows"InstallSMPkernel.",thenrun: PCICardCommonInstallationIssues NovavoxLimited20072008 Page33of36

#yuminstallkernelsmpdevelkernely Otherwiserun: #yuminstallkerneldevelkernely 3.InstallC/C++CompilerPackages InstallC/C++CompilerstoCompileSourceCodeifyoudonthavetheminstalledonyour system: #yuminstallgccy #yuminstallgccc++y 4.ShutdownandRestarttheIPPBX Rebootandcheckthateverythingisstillworkingcorrectlyafterinstalling/updatingrelevant packages: #shutdownrnow DownloadZaptelSourceCode Changetousersourcecodedirectoryanddownload/unziptherequiredsoftwarepackages: #cd/usr/src 5.Download/UnzipZaptel #wgethttp://ftp.digium.com/pub/zaptel/releases/zaptel 1.4.10.1.tar.gz #tarxzvfzaptel1.4.10.1.tar.gz #lnszaptel1.4.10.1zaptel 6.MakeSourceCodeModifications AtthispointyoushouldmaketherequiredchangestotherelevantZaptelsourcecodefiles.If youarechangingthedefaultechocancellationsoftwarethenyoushouldmodifythezconfig.h fileasdescribedinSection5.2.7. 7.StopAsteriskandZaptel FirstofallstopAsterisk: #amportalstop/CLI>stopnow ThenstopZaptel: #servicezaptelstop 8.RemoveExistingZaptelmodules ThecommandsbelowarecorrectforremovingtheZaptelmoduledirectoriesinTrixbox2.6.07 (theZaptelmodulesmaybeinoneorpossiblybothdirectories). #rmr/lib/modules/`unamer`/extra/zaptel #rmr/lib/modules/`unamer`/misc

PCICardCommonInstallationIssues NovavoxLimited20072008

Page34of36

IfyouareusingadifferentTrixboxversionoranalternativeIPPBXpackagethenyouwill needtofindwheretheZaptelmodulesarecurrentlyinstalled.TofindtheZaptelmodules directoryfindthedirectorythatthewcfxo.komoduleisstored. Note:AsanalternativetodeletingtheZaptelmoduledirectoryyoucouldmakeacopyofthe directoriesandthendeletetheoldonestoprovideacontingencyplanifanythinggoeswrong. 9.CompileZaptelSourceCode CompiletheZaptelSourceCode: #cd/usr/src/zaptel #makeclean #make Youshouldreceivethefollowingmessage: **** ****Theconfigurescriptwasjustexecuted,so'make'needstobe ****restarted. **** make:***[config.status]Error1 Continuebyrunning: #make #makeinstall #makeconfig Thefollowingshouldbeincludedintheoutput: ... Ithinkthatthezaptelhardwareyouhaveonyoursystemis: pci:0000:04:06.0wcfxo 1057:5608WildcardX100P 10.ShutdownandRestarttheIPPBX #shutdownrnow

ConfigurationComplete
TheZaptelsourcecodehasbeenrecompiledandyourIPPBXisnow readytobeused.

PCICardCommonInstallationIssues NovavoxLimited20072008

Page35of36

AppendixEAcronyms

Acronym ACPI APIC BIOS BT CLI CPC CPU CTR21 DAA DCT DMA DSP ERL FCC FXO FXS GUI I/O IDE IP IPPBX IRQ JATE OSLEC PCI POTS PSTN SCSI SMP UDMA UK USB VoIP

Description AdvancedConfigurationandPowerInterface AdvancedProgrammableInterruptController BasicInput/OutputSystem BritishTelecom CommandLineInterface CallingPartyControl CentralProcessingUnit CommonTechnicalRequirementsdirective21 DirectAccessArrangement DisconnectClearTime DirectMemoryAccess DigitalSignalProcessor EchoReturnLevel FederalCommunicationsCommission ForeignExchangeOffice ForeignExchangeStation/Subscriber GraphicalUserInterface Input/Output Intelligent/IntegratedDriveElectronics InternetProtocol IPPrivateBranchExchange InterruptRequest JapanApprovalsInstituteforTelecommunicationsEquipment SourceLineEchoCanceller PeripheralComponentInterconnect PlainOldTelephonyService PublicSwitchedTelephonyNetwork SmallComputerSystemInterface SymmetricMultiProcessing UltraDMA UnitedKingdom UniversalSerialBus VoiceoverIP

PCICardCommonInstallationIssues NovavoxLimited20072008

Page36of36

Você também pode gostar