36
PCI Card Common Installation Issues Reference Number: NVXCPTBSH01 Author: Richard Spencer Last Updated: 18 May 2008 Document Status: Issue Technical Support: This guide is freely available to anyone in the Open Source Community to help solve configuration and installation issues. However, email based technical support is only available to customers that have purchased Open Source telephony equipment directly from Novavox. Updates: Due to the number of alternative Open Source IP PBX software packages available and new versions being regularly released, it is difficult to keep Open Source documentation fully up to date. If you find any out of date or inaccurate information within this document then please let us know by emailing us at [email protected] and we will update the document as soon as possible. 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 you believe you are the original source and you would like to receive acknowledgement, then please let us know and we will add the appropriate reference. Novavox Limited www.novavox.co.uk Registered in England Number: 06363978 Registered office: 2nd Floor, 145157 St John Street, London, EC1V 4PY VAT Registration Number: GB 916422731

Novavox Asterisk Card Installation Issues

Embed Size (px)

Citation preview

  • PCICardCommonInstallationIssues

    ReferenceNumber: NVXCPTBSH01Author: RichardSpencer

    LastUpdated: 18May2008DocumentStatus: Issue

    TechnicalSupport:ThisguideisfreelyavailabletoanyoneintheOpenSourceCommunitytohelpsolveconfigurationandinstallationissues.However,emailbasedtechnicalsupportisonlyavailabletocustomersthathavepurchasedOpenSourcetelephonyequipmentdirectlyfromNovavox.

    Updates:DuetothenumberofalternativeOpenSourceIPPBXsoftwarepackagesavailableandnewversionsbeingregularlyreleased,itisdifficulttokeepOpenSourcedocumentationfullyuptodate.Ifyoufindanyoutofdateor inaccurateinformationwithinthisdocumentthenpleaseletusknowbyemailingusatfeedback@novavox.co.ukandwewillupdatethedocumentassoonaspossible.

    Disclaimer: This document has been compiled based on experience resolving real worldcustomer configuration issues as well as information available within the Open Sourcecommunity. References to source material have not been included as it would make thedocument less easy to read. Also, keeping the references up to date would be very timeconsuming.However, if you discover information containedwithin this document forwhichyoubelieveyouaretheoriginalsourceandyouwouldliketoreceiveacknowledgement,thenpleaseletusknowandwewilladdtheappropriatereference.

    NovavoxLimitedwww.novavox.co.ukRegisteredinEnglandNumber:06363978

    Registeredoffice:2ndFloor,145157StJohnStreet,London,EC1V4PYVATRegistrationNumber:GB916422731

  • PCICardCommonInstallationIssues Page2of36

    NovavoxLimited20072008

    AboutNovavox

    Novavoxhelpscreatereliable,affordable,integratedcommunicationsolutionstomeettheneedsofsmallbusinessesandmediumsizedenterprises.AnofficenetworkconnectedtotheInternetservesasthebasisfortheconvergenceofdata,voice,videoandmobilecommunicationsinasecure,integratedarchitecture.Withanintegratedcommunicationssolution,companiescansaveoncostlyphonebills,integratecustomerinformation,andhelpmakeemployeesmoremobilewithoutsacrificingcommunicationfunctionality.

    Torealisethebenefitsthatintegratedcommunicationssolutionscanoffer,acompanyneedsanaffordable,reliablesolutiontailoredforthesmall/mediumofficeanddesignedforeaseofuse.NovavoxprovidesOpenSourcetelephonyequipmentspecificallydesignedforsmallbusinessesandmediumsizeenterprises.UsingOpenSourcesolutionsallowscompaniestobenefitfromprotectionagainstvendorlockinandabandonment,adramaticreductionincapitalexpenditurecostsandanendtoperuser/featurelicensingcosts.

    Novavoxisdedicatedtosupplyingreliable,affordable,featurerichOpenSourcecomputertelephonyequipmenttosupportbusinessesupgradingexistingsystemsandthosedeployingnewsystems.WorkinginpartnershipwithNovavox,smallbusinessesandmediumsizedenterprisescandeployOpenSourcecommunicationsolutionstobenefitfromimmediatereturnoninvestment(ROI)throughdramaticallyreducedcallchargesandsignificantsavingsinequipmentandinfrastructurecosts.

    ProductRange

    NovavoxsuppliesarangeofalternativeOpenSourcetelephonyproductsincluding:

    X100PSpecialEditionThebestofbreedsingleportFXOcardavailable OpenVox4portmodularanaloguePCIExpresscards OpenVox14portISDNBRIPCIcards OpenVox12portISDNPRI/E1/T1/J1PCIcards OctWareSoftEchocarriergradeechocancellationsoftwarelicences

    Forfulldetailsofouralternativeproductspleasevisitourwebsitesproductsection:

    www.novavox.co.uk/products

    ContactDetails

    ContactSales

    Ifyourequireadditionalproductinformationorresellerpricinginformation,haveaninvoice/orderquery,orwouldliketorequestaquoteforacommunicationssolutiontomeetyourcompany'[email protected].

    ContactSupport

    Forassistancewithequipmentinstallationorforhelpwithadevice/serviceissuepleasevisitourwebsitesupportsectioninthefirstinstance:

    www.novavox.co.uk/support

    Novavoxcustomersonly:Ifafterfollowingtheguidanceprovidedonthesupportpageyouareunabletoresolvetheissuethenpleasecontactusatsupport@novavox.co.uk.

  • PCICardCommonInstallationIssues Page3of36

    NovavoxLimited20072008

    Contents

    1 Introduction ................................................................................................42 CardNotDetectedbyMotherboard/Bios ...................................................52.1 ProblemDescription.................................................................................................. 52.2 Solution .................................................................................................................... 5

    3 PCIBusIRQSharingIssues......................................................................63.1 ProblemDescription.................................................................................................. 63.2 Solution .................................................................................................................... 7

    4 PCIBUSIRQMisses/Latency....................................................................84.1 ProblemDescription.................................................................................................. 84.2 Solution .................................................................................................................... 9

    5 Echo.........................................................................................................145.1 ProblemDescription................................................................................................ 145.2 Solution .................................................................................................................. 15

    6 FarendDisconnect ..................................................................................226.1 ProblemDescription................................................................................................ 226.2 Solution .................................................................................................................. 22

    7 KernelPaniconReboot ...........................................................................247.1 ProblemDescription................................................................................................ 247.2 Solution .................................................................................................................. 24

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

  • PCICardCommonInstallationIssues Page4of36

    NovavoxLimited20072008

    1 Introduction

    ThisdocumentdescribeshowtoovercomesomeofthemostcommonissuesexperiencedwheninstallingPCItelephonycardsinOpenSourceIPPBXsystems.SettingupanOpenSourceIPPBXforthefirsttimecanbeadauntingandsometimesfrustratingtask,particularlyifyouarenotfamiliarwithLinux.Thereisonlinehelpavailableintheformofforumsandwikis,andifyouencounteraproblemsomeoneelsehasprobablyhadthesameproblemandfoundasolution.However,searchingthroughtheforumsandwikisfortherelevantinformationandfindingasolutioncanbeverytimeconsuming.

    Themainobjectiveofthedocumentistohelpmakecardinstallationaseasyaspossibleandtominimisetheamountoftimerequired.Themostcommonissuesarecoveredindepthanddetailedstepbystepsolutionsareprovidedalongwithbackgroundinformationexplainingthepurposeofeachstep.TheinformationprovidedfocusesonDigiumAsteriskandTrixboxbutcanbeusedtohelpinstallanOpenSourcetelephonycardinanyZaptel/AsteriskbasedIPPBXsystemincludingAsteriskNOW,ElastixandPBXinaFlash.

    Disclaimer:Digium(www.digium.com)andAsterisk(www.asterisk.org)areregisteredtrademarksofDigium,Inc.Trixbox(www.trixbox.org)isaregisteredtrademarkofFonality,Inc.Elastix(www.elastix.org)isaregisteredofPaloSantoSolutions.NovavoxLimitedisnotaffiliatedwith,norendorsedbyanyofthecompanieslistedabove.

  • PCICardCommonInstallationIssues Page5of36

    NovavoxLimited20072008

    2 CardNotDetectedbyMotherboard/Bios

    2.1 ProblemDescription

    IfthecardyouhaveinstalleddoesnotappeartobelistedinanyshowcommandoutputsthenthefirststepistolookattheKernelsbootprocessmessagebuffer.Thebootprocessmessagebuffercanbeviewedusingthedmesg(diagnosticmessage)commandandwillshowifthecardhasbeendetectedbythemotherboard/bios:

    #dmesg|more

    Ifthecardhassuccessfullybeendetected,thedmesgoutputshouldshow:

    ...wcfxo:DAAmodeis'FCC'FoundaWildcardFXO:WildcardX100P...

    TheaboveoutputisforanX100PSEcardbutsimilaroutputshouldbereceivedforothercards,e.g.FoundaWildcardTDM:WildcardTDM400PREVE/Ffor4portOpenVoxanaloguecards.

    2.2 Solution

    Ifyoucannotfindthelines fortherelevantcardinthedmesgoutput,then:

    1. CheckthatthePCIslotsupportstherelevantstandard,mostcardsusePCI2.22. Checkthatcardhasbeeninsertedcorrectly,occasionallyithelpstopullthecard1

    2mmoutoftheslotsothatitdoesnotgorighttothebottom3. TrymovingthecardtoadifferentPCIslot4. Tryanothercard(e.g.Networkcard)inthePCIslottofindouttocheckthatitisnot

    faulty5. EnsuretheMotherboardhasthelatestBIOSinstalled

    Thecardmustbedetectedbythemotherboard/biosbeforeyoucanproceedanyfurther.IfthecardisshowninthedmesgoutputbutisstillnotlistedinsomeoftherelevantshowcommandsthentheremaybeanIRQissueasdescribedinthefollowingsection.

  • PCICardCommonInstallationIssues Page6of36

    NovavoxLimited20072008

    3 PCIBusIRQSharingIssues

    3.1 ProblemDescription

    ThePeripheralComponentInterconnect(PCI)busprovidescommunicationbetweeninput/output(I/O)devicesandacomputer'sprocessor.InordertocommunicatewiththecomputerprocessoranI/Odevicemustsignalthatitwishestousethebusbysendinganinterruptrequest(IRQ).I/OdevicesareallocatedIRQbuslines/channels(commonlyreferredtoasIRQs)toallowthemtosignalaninterrupt,whichareidentifiedbyanindex.InthecaseofOpenSourceTelephonycards,thelineisanactualcontact(finger)onthecard,anditisacorrespondingpininthesocketsonthebusconnectedbyatraceonthemotherboard.Acardsendsaninterrupttothemotherboard'sinterruptcircuitrybychangingthevoltagelevelontheinterruptrequestline.ThisvoltagechangeactsviainterruptcontrollercircuitrytointerrupttheprocessortoservicethecardneedingtheCPU'sattention.

    IftherearemoreI/OdevicesthantherearespareIRQsthentwoormoredevicescansharethesameIRQ.ForsomeI/Odevicesthisdoesnotcauseanyissues.However,theZapteldrivergenerates1000interruptsasecondforeachtelephonycardthatitcontrols.Iftheinterruptsarenothandledintimethenthiscancausesignificantissuesforaudiopassingthroughthetelephonycardsandcanevenpreventthecardsfromworkingaltogether.Forthisreason,itshouldbemadecertainthatcardsthatusetheZapteldriverliketheX100PSEhavetheirowndedicatedIRQtominimiseinterrupthandlinglatency.

    WheninstallingaPCItelephonycardinanIPPBXforthefirsttime,ormovingittoadifferentslot,youmayreceivethefollowingerrormessage:

    FailedtoinitailizeDAA,givingup...wcfxo:probeof0000:00:0c.0failedwitherror5

    Todetermineifthecardhasbeendetected,usetheLinuxutilitylspciwhichdisplaysinformationaboutdevicesconnectedtothePCIbuswiththevoptiontocheckwhatIRQhasbeenallocatedbytheKernel:

    #lspciv

    IftheX100PSEcardhasbeendetectedsomethingsimilartothefollowinglinesshouldbeincludedintheoutput:

    04:06.0Communicationcontroller:MotorolaWildcardX100PSubsystem:Unknowndeviceb100:0003

    Flags:busmaster,mediumdevsel,latency32,IRQ217I/Oportsata800Memoryatdfafe000(32bit,nonprefetchable)Capabilities:[40]PowerManagementversion2

    ThenextstepistoverifythattheX100PSEcardisrecognisedbytheLinuxKernelandthatitisusingitsallocatedIRQ.Thiscanbeachievedusingthefollowingcommand:

    #cat/proc/interrupts

    IfthecardisrecognisedandisbeinghandledcorrectlybytheZapteldriverthentheoutputshouldinclude:

    7:25680730XTPICwcfxo

  • PCICardCommonInstallationIssues Page7of36

    NovavoxLimited20072008

    TheaboveoutputisfromasystemusingastandardXTProgrammableInterruptController(XTPIC).IfasystemisusinganAdvancedProgrammableInterruptController(APIC)thentheoutputwilllooklikethisinstead:

    217:718680730IOAPIClevelwcfxo

    Inbothcases,theZapteldriverforthecardmustbeallocateditsowndedicatedIRQ.

    3.2 SolutionIfthecarddoesnthaveitsowndedicatedIRQ(listedin/proc/interrupts)then:

    1. TrymovingthecardtoadifferentPCIslot2. Checkthatcardhasbeeninsertedcorrectly,occasionallyithelpstopullthecard1

    2mmoutoftheslotsothatitdoesnotgorighttothebottom3. MakemoreIRQsavailablebydisablingallunnecessaryI/OdevicesintheBIOS,e.g.

    serialports,parallelports,USB,etc.4. SeeifyoucanassignanIRQtoaspecificPCIslotintheBIOS(mostmodernbioses

    don'tallowthisthough)5. Enable/disabletheplug'nplayOSoptionintheBIOS6. Enable/disableACPI(AdvancedConfigurationandPowerInterface)inthebiosorby

    addingacpi=nointhegrubbootloader7. Enable/disableAPIC(AdvancedProgrammableInterruptController)inthebiosorbe

    addingnoapicinthegrubbootloader8. Enable/disablehyperthreadingbyaddingnohtinthegrubbootloader9. Enable/disableSMP(SymmetricMultiProcessing)ondualcore/processIPPBXsin

    thebiosorbyselectinganonsmpKernelfromthegrubbootloader10.Enable/disabletheirqbalancedaemon

    Asstatedpreviously,OpenSourcetelephonycardsmusthavetheirowndedicatedIRQ(confirmedviacat/proc/interrupts)toavoidanyPCIinterruptrelatedissues.Itcansometimestakeawhile,butusingvariouscombinationsofthestepslistedaboveshouldeventuallyhelpprovideadedicatedIRQ.

  • PCICardCommonInstallationIssues Page8of36

    NovavoxLimited20072008

    4 PCIBUSIRQMisses/Latency

    4.1 ProblemDescription

    Asstatedintheprevioussection,theZapteldrivergenerates1000interruptsasecondforeachtelephonycardthatitcontrols.Iftheinterruptsarenothandledintimethenthiscancausesignificantissuesforaudiopassingthroughthetelephonycardsandcancauseclicks,pops,andglitches.ThemostimportantfunctionofanIPPBXsystemistoswitch/movedigitalsoundsamplesfromoneport/protocoltotheotheratveryconstantrate.Further,althoughlostaudiosamplesmaybetolerableforvoiceapplications,theymaybedetrimentaltodata/faxapplications.

    IfyouexperienceaudioissuesandhaveconfirmedthatthecardhasitsowndedicatedIRQ(viacat/proc/interrupts)thentheremaybeamissinginterruptorinterruptlatencyissue.Aspreviouslystated,theZapteldrivergenerates1000interruptsasecondforeachtelephonycardthatitcontrols.Onewaytocheckthatthecorrectnumberofinterruptsarebeingreceivedistousethefollowingcommand:

    #cat/proc/interruptssleep10cat/proc/interrupts

    Theoutputshouldbesimilartotheoutputshownbelow:

    CPU0217:1961653IOAPIClevelwcfxo...217:1971654IOAPIClevelwcfxo...

    ThiscommanddisplaysthenumberofinterruptsforeachdeviceconnectedtothePCIbus,waits10secondsandthendisplaystheinformationagain.Ifwetake1961653from1971654theresultis10001.Asthetestisnotcompletelyaccurate1001isextremelyclosetotheexpected1000(i.e.1000persecond)sowecanseethatthecorrectnumberofinterruptsarebeingreceived.

    Iftheoutputshowsthenumberofinterruptsas0oraverylownumberthenyouneedtocheckthattherelevantzaptelmodulesareloadedandthatthe/etc/zaptel.confand/etc/asterisk/zapata.conffilesareconfiguredcorrectly.

    Anotherwayoftestingifthereisanissuewithmissinginterruptsistousethecommandzztoolwhichrunsatimingtest:

    #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%Resultsafter29passesBest:100.000Worst:99.995Average:99.996918,Difference:100.003041

    Thehigherthepercentagethebetterthesoundsqualitywillbe.Iftheresultsare100%or99%thentheredefinitelyshouldntbeanymissingIRQrelatedissues.Iftheresultsare98%

  • PCICardCommonInstallationIssues Page9of36

    NovavoxLimited20072008

    thenthecardshouldworkOK,however,iftheresultsunder99.975%,thentherewillprobablybesomeaudioproblemsandthecardmaynotevenwork.

    4.2 Solution

    4.2.1 UpgradetoLinuxKernel2.6

    TheLinuxkernelisresponsibleforcontrollingdiskaccessusingkernelI/Oscheduling.TheI/Oschedulerfoundinthe2.4LinuxkernelwasdesignedtomaximizeglobalI/Othroughput.IndoingsoatradeoffwasmadewithregardstofairnesswhichmeansthatIPPBXsystemsusinga2.4kernelaremorelikelytosufferfromschedulingdelays.Inordertodecidewhichtaskshouldrunnext,theschedulerhadtolookateachtaskandmakeacomputationtodetermineeachtask'srelativeimportance.Becausethetimerequiredtocompletethealgorithmvariedwiththenumberoftasks,applicationscouldsufferfromslowscheduling.

    ThekernelI/Oschedulerembeddedinthe2.6kernelhasadvancedtheI/OcapabilitiesofLinuxsignificantly.TheschedulerinLinux2.6nolongerscansalltaskseverytime.Instead,whenataskbecomesreadytorunitissortedintopositioninaqueue.Whentheschedulerrunsitselectsthetaskatthemostfavourablepositionwithinthequeue.Thismeansthatschedulingisdoneinaconstantamountoftime,whichisidealforaudioapplicationslikeIPPBXsoftware.Whenataskisrunningitisgivenaperiodoftimeinwhichitmayusetheprocessorbeforeithastogivewaytoanotherthread.Whenitstimeperiodhasexpiredthetaskismovedtoadifferentqueueaccordingtoitspriority.ThisnewI/Oschedulerinkernel2.6isconsiderablyfasterthantheoldone,anditworksequallyaswellwhethertherearealargenumberoftasksinthequeueorjustafew.

    Thereareactually4I/Oschedulersembeddedinthe2.6kernelthatcanbeselectedatboottime,eachofwhichoffersadifferentcombinationofoptimisations.ThealternativeschedulersaretheCompletelyFairQueuingelevator(cfq),Deadlineelevator(deadline),NOOPelevator(noop),andAnticipatoryelevator(as).TheI/Oschedulersarecalledelevatoralgorithmsbecausetheyaddressaproblemsimilartothatofkeepinganelevatormovingsmoothlyinalargebuilding.Thedefaultschedulerisusuallyasorcfqdependingonthedistribution.

    InadditiontotheI/Oschedulerimprovements,thereareanumberofotherperformanceenhancingimprovementstothe2.6kernelincludingbetterdrivers/featuresetsforIDE/SCSIdrives,supportforkernelpreemption,andanimprovedthreadingmodel/library. TheLinux2.6Kernelalsoincludeanewprocessschedulerthatscalesbetterinmultiprocessor,multicoreandhyperthreadedCPUsystemsthanthe2.4kernelprocessscheduler.

    4.2.2 DisableXWindowsandFramebuffer

    XWindowsgeneratesalargenumberofinterrupts(especiallywhenusinganinputdevicesuchasamouse)thatcandelaytheprocessingoftelephonycardinterrupts.ItcanbeusefultorunXwhenconfiguringtheIPPBXsystem,butoncethesystemupandrunningitisadvisabletodisableXWindowsbychangingtherunlevel.

    AlmostallLinuxdistributionuserunlevel2/3fortextmodeandrunlevel5forGUImode.Therunlevelmodesaredefinedinthe/etc/inittabconfigurationfile.IftheIPPBXsystemiscurrentlyusingXWindowsthen:

    #cat/etc/inittab

    shouldshowthefollowinglineintheconfiguration:

    id:5:initdefault:

    TodiableXWindowsbysettingthedefaultrunlevelto3(textmode)changethelineusingatexteditor(e.g.vi,nano,etc.)to:

  • PCICardCommonInstallationIssues Page10of36

    NovavoxLimited20072008

    id:3:initdefault:

    NexttimetheIPPBXsystemisrebooteditwillbootintextonlymode.

    TheLinuxframebuffer(fbdev)usedtodisplaygraphicsonaconsolewithoutrelyingonsystemspecificlibrariesorXWindowscanalsocauseinterruptprocessingissues.Theframebuffercanbedisabledbyincludingthe"vga=normal"optioninthegrubbootloader.

    4.2.3 ChangeIDEHardDriveSettings

    HarddiskcontrollerscancauseaudioissuesiftheyconsumetoomuchPCIbusresourcesastheycancausetheOpenSourcetelephonycardtosufferfrominterruptlatency/misses.TodetermineifyourIDEharddiskiscausingissuesyouuse:

    #hdparmt/dev/[IDEDrive]

    ThehdparmtcommandcausesasubstantialamountsofI/OtobegeneratedontheIPPBXsystem.Ifaudioissuesareexperiencewhilstusinghdparmtthenthissignifiesthatthereisaharddriveissue.

    WhenusingIDEdrives,DigiumrecommendsusingDirectMemoryAccess(DMA)modewithanUltraDMA(UDMA)settingof2or3.UDMAmode2isATA33andUDMAmode3isATA44.TosettheharddrivetoUDMAmode2forexampleuse:

    #hdparmd1Xudma2c3/dev/[IDEDevice]

    Inthecommandabovetheoptiond1enablesDMAmode,Xudma2setstheIDEtransfermodetoUDMAmode2andc3enables32bitdatatransfers.ItshouldbenotedthatanychangestoharddrivesettingswillonlybeuseduntiltheIPPBXisrebooted.Therefore,toensuretheharddrivesettingsremainwhentheIPPBXisrebootedthehdparmcommandneedstobeincludedinoneoftheIPPBXstartupscripts.

    4.2.4 AssignIRQstoSpecificProcessors

    Dualcore/processorIPPBXsystemsrunningaSymmetricMultiProcessing(SMP)kernelallowIRQstobeboundtosingleormultipleCPUs.ItisadvantageoustobindtheX100PSEcardIRQtoaseparateprocessorusedforotherIRQs,particularlyIRQsallocatedtothinglikeIDEdrives.UsingaseparateCPUfortheX100PSEcardreducesinterruptlatencyandalsoimprovescachecoherencywhichreducescachemisses.

    BeforebindingtheX100PSEcardIRQtoaspecificprocessorfirstofalltheirqbalancedaemonshouldbedisabledotherwiseitwilloverridethebinding.Thiscanbeachievedusingthefollowingcommands:

    #servicestopirqbalance#chkconfigirqbalancelevel345off

    TobindtheIRQstoaparticularprocessorfirstofallcheckwhichIRQhasbeenassignedtoeachdeviceusing:

    #cat/proc/interrupts

    CPU00:29421608IOAPICedgetimer1:39IOAPICedgei80428:3IOAPICedgertc9:0IOAPIClevelacpi

    14: 287820IOAPICedgeide0

  • PCICardCommonInstallationIssues Page11of36

    NovavoxLimited20072008

    205:12333IOAPICleveleth0209:8001IOAPIClevelide1217: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)hasbeenassignedtoprocessor1,whilstallotherrelevantIRQshavebeenassignedtoprocessor2.

    OncetheIRQbindingconfigurationhasbeencompleted,eachoftheechocommandsusedshouldbeaddedtothe/etc/rc.d/rc.localfiletoensurethattheIRQbindingswillremainwhentheIPBPXserverreboots,i.e.

    #cat/etc/rc.d/rc.local

    Shouldinclude:

    echo1>/proc/irq/217/smp_affinity#wcfxoecho2>/proc/irq/14/smp_affinity#ide0echo2>/proc/irq/205/smp_affinity#eth0echo2>/proc/irq/209/smp_affinity#ide1

    Pleasenote:IfPCIBusdevicesareremovedoraddedtothesystemthentheIRQassignedmaychange.Thereforethestepsaboveshouldberepeatedafterremoving/addingPCIBusdevicestoensuretheIRQsremainassignedtothemostappropriateprocessor.

    4.2.5 ChangeIRQPriorities

    IftheIPPBXCPUgetstwointerruptsatthesametime,itwillanswertheminorderofprioritybasedontheIRQofthedevicerequestingtheinterrupt.Thereforeonewaytoreduceinterruptlatency/missesistouseanIRQwithahigherpriority.

    IRQsareprioritizedandservicedinpriorityorderbytheCPUasdeterminedbythecontroller. WhenastandardXTProgrammableInterruptController(XTPIC)isbeingusedIRQs8through15haveahigherprioritythanIRQs3through7.TheIRQpriorityorderisshownbelowwithprioritydecreasingfromlefttoright(0hasthehighestpriority,7thelowest):

    [0128910111213141534567]

    ItmaybepossibletoassignacardanIRQwithahigherprioritybymovingittoadifferentslotorbytryingsomeoftheothersuggestionsforchangingIRQassignmentslistedinSection3.2.

    IfanAdvancedProgrammableInterruptController(APIC)isbeingusedtheninterruptpriorityisn'trelatedwiththepin,butthevectorofthepin.Howthevectorofapinisallocatedisquiterandom.UsuallythedevicedriverthatcommunicateswiththePCIcontrollerfirstwillgetalowerpriorityvector.Therefore,whichvectorgetsallocatedtoadevicedependsonhowmanydevicedrivershavealreadycontactedthePCIcontroller.Thereisnomethodavailableforreserving/settingvectorsforadevice/IRQandnowayofcheckingwhatvectorhasbeenassignedtowhatIRQ.ThereforeifIAPICisbeinguseditisnotpossibletotryandassignacardwithahigherpriority.

  • PCICardCommonInstallationIssues Page12of36

    NovavoxLimited20072008

    4.2.6 ChangeIRQLatencyTimerSettings

    EvenifyoumanagetoassignanIRQwithahigherprioritytoyourcard,alowerpriorityinterruptcanstillblockhigherpriorityinterruptsifittakesovertheprocessorforseveralmillisecondsanddisablesallotherinterruptsduringthattime.Anotherwaytotryandreduceinterruptlatency/missesistochangethedefaultIRQlatencytimers.Interruptlatencyisthetimebetweenthegenerationofaninterruptbyadeviceandtheservicingofthedevicewhichgeneratedtheinterrupt.Thereisusuallyatradeoffbetweeninterruptlatency,throughput,andprocessorutilization.

    PCIbuslatencytimerscanrangefrom0to248,thelowerthefigurethequickerthedevicewillgiveupthebus.Ifadevicehasasettingof0,thenitwillimmediatelygiveupthebusifanotherdeviceneedstotransmit.Ifadevicehasasettingof248,itwillcontinuetousethebusforalongerperiodoftimebeforestoppingwhilsttheotherdevicewaitsforitsturn.ItistheroleofthedevicedrivertosetthecorrectPCIbuslatencytimervalueforthePCIdeviceandmostofthetimethedefaultsettingsworkwell.

    UsinglowPCIbuslatencytimersettingsresultsindevicesquicklygivingupthebusifanotherdeviceneedstotransmitdata.Theadvantageofthisapproachisthatitresultsinamuchlowerdatatransmitlatency,sincenodeviceisgoingtoholdontothebusforanextendedperiodoftimecausingotherdevicestowait.However,thisalsoreducestheeffectivePCIbusbecauselargedataburstsbecomemuchlessfrequentandrapidchangesinbuscontrolincreasesoverhead.ConfiguringthemajorityofdeviceswithhighPCIbuslatencytimersettingsincreasesinterruptlatency,butalsoincreasethroughput.Aseachdevicegetstoburstlargeamountsofdataacrossthebuswithoutinterruption,thePCIbusisusedmoreefficientlyandthePCIdevicescantransmitmoredata.

    Ingeneral,thebestapproachtoreducinginterruptlatencyistoassignahigherPCIbuslatencytimertotheOpenSourcetelephonycardandassignalowerPCIbustimertotheotherPCIbusdevices.ThishelpstoensurethattheotherPCIbusdevicesgiveupthePCIbuswhentheOpenSourcecardneedsit.

    However,itshouldbenotedthatifanIPPBXisbeingusedtoprovidemultipleservicesthatrequirelargeamountofdatatobesent/processed,e.g.file/webserver,firewall,etc.thenloweringthePCIbustimerforthingsliketheIDEdrivemayactuallydecreaseperformance.Insuchcases,CPUutilisationmayincreasesignificantlyduetheprocessornothavingenoughtimetosendthevolumeofdatarequiredandduetothefrequencyofPCIbuscontrolchanges.Therefore,insomecasesitmaybemorebeneficialtoactuallyincreasethePCIlatencyofsomeoftheotherdevicesinordertoallowthemtoburstrelativelylargeamountsofdataacrossthebusinonego.EachsystemisdifferentandthereforeitisacaseoftrialanderrorinfindingtheoptimumPCIbuslatencysettings.

    BeforechangingthePCIBuslatencytimersettings firstofallweneedtofindoutthespecifiedbus,slotandfunctioninformationforeachPCIbusdevicewewanttochangethelatencyfor.Thisinformationisprovidedinthe[[]:][][.[]] formatnexttoeachPCIdevicewhenissuingthelcpcivcommand.Forexample:

    #lspciv

    00:0f.0IDEinterface:VIATechnologies,Inc.Unknowndevice5337(rev80)(progif8f[MasterSecPSecOPriPPriO])

    Subsystem:FoxconnInternational,Inc.Unknowndevice0c87Flags:busmaster,mediumdevsel,latency32,IRQ11Capabilities:[c0]PowerManagementversion2

    04:04.0Ethernetcontroller:RealtekSemiconductorCo.,Ltd.RTL8139/8139C/8139C+(rev10)

    Subsystem:FoxconnInternational,Inc.Unknowndevice0c87

  • PCICardCommonInstallationIssues Page13of36

    NovavoxLimited20072008

    Flags:busmaster,mediumdevsel,latency32,IRQ209I/Oportsat9c00[size=256]Memoryatdfaff000(32bit,nonprefetchable)[size=256]Capabilities:[50]PowerManagementversion2

    04:06.0Communicationcontroller:MotorolaWildcardX100PSubsystem:EfarMicrosystemsUnknowndevice0001Flags:busmaster,mediumdevsel,latency32,IRQ217I/Oportsat9800[size=256]Memoryatdfafe000(32bit,nonprefetchable)[size=4K]Capabilities:[40]PowerManagementversion2

    Aftermakinganoteoftherelevantbus,slotandfunctiondetailsforeachdevicethePCIlatencytimersvaluescanbechangedusingthefollowingcommands:

    #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(inthiscaseanX100PSE)hasbeenincreasedtothemaximumof248(F8inhex),whilstthePCIlatencytimersfortheotherPCIdeviceshavebeenreducedto8.

    AfterthePCIlatencytimershavebeenconfiguredusingthecommandsabove,eachofthesetpcicommandsusedshouldbeaddedtothe/etc/rc.d/rc.localfiletoensurethatthePCIlatencytimerswillremainwhentheIPBPXserverreboots,i.e.

    #cat/etc/rc.d/rc.local

    Shouldinclude:

    setpcivs04:06.0LATENCY_TIMER=f8#wcfxosetpcivs00:0f.0LATENCY_TIMER=8#ide0setpcivs04:04.0LATENCY_TIMER=8#eth0setpcivs00:0f.0LATENCY_TIMER=8#ide0

    Pleasenote:IfPCIBusdevicesareremovedoraddedtothesystemthentherelevantbus,slotandfunctiondetailsmaychange.Thereforethestepsaboveshouldberepeatedafterremoving/addingPCIBusdevicestoensurethePCIlatencytimervaluesremainoptimal.

  • PCICardCommonInstallationIssues Page14of36

    NovavoxLimited20072008

    5 Echo

    5.1 ProblemDescription

    Echoisthetermusedtodescribetheexperienceofhearingyourownvoicebackduringatelephonecall.TherearetwomainsourcesofechoinIPPBXsystems:

    AcousticechoGenerallycausedbyfeedbackfromthetelephonehandset Lineecho Dependantontheimpedancecharacteristicsofthelinetotheexchange

    Thetwomainfactorsthatdeterminehowseriousechoisarethetimeperiodafterwhichyouheartheechoandtheloudnessoftheecho.Iftheechoisfairlyquiteandthereareonlyafewmillisecondsofdelaythentheechomaybequitebearable.However,ifthedelayisafewhundredmillisecondsandtheechoisquiteloudthenitcanbeextremelyannoyingandevenrenderthevoiceserviceunusable.

    5.1.1 AcousticEcho

    Acousticechoisusuallycausedbyvoicetravellingoutoftheearpieceorspeakerbackintothemouthpieceormicrophone,althoughitcanalsobecausedbysoundbouncingoffthewallsofaroom.Acousticechoisonlyusuallyanissuewhenusinglowqualityorincompatibleheadsets,orwhenusingaspeakerphone.However,itcanalsooccurwhenusingatelephonehandsetifthemicrophoneissensitiveandthevolumeofthehandsetspeakerisquiteloud.WhensufferingfromacousticechoboththelocalandremotepartieshearechowhenspeakingandechoispresentwhencallinganotherextensionconnectedtothesameIPPBX.Acousticechovariesinstrengthanddelaydependingonthechangingacousticenvironmentoftheechosource,e.g.movingamicrophonefurtherawayfromaheadset.

    5.1.2 LineEcho

    LineechoiscommoninPSTNnetworksandiscausedbyimpedancemismatches.Lineechoisapropertyofthelineconnectionandremainsmostlyconstantthroughoutthecall. WhenmakingacalloverthePSTN,thesignalpathbetweentwotelephonesrequiresamplificationusingafourwirecircuit.Fourwirecircuitsarenotextendedtocustomerpremisesduetocost,insteadthefourwirecircuitsarecoupledtotwowirecircuitsusingadevicecalledahybrid.Thehybridinthetelephoneprovidersexchangecouplestheanaloguesignalfromthefourwirecircuit(whereincomingandoutgoingsignalsareseparated)tothetwowirecircuitwheretheincomingandoutgoingsignalsarecombined.

    Assignalspassfromthefourwiretothetwowireportionofthenetwork,theenergyinthefourwiresectionisreflectedback,creatinganechoofthesignal.Theseverityoftheechodependsonhowwelltheimpedanceismatchedbetweenbothsidesofthehybrid.Theimpedanceofthetwowirecircuitcanvarysignificantlydependingonfactorsincludingthelinesetupintheexchangeequipment,thedistancebetweentheexchangeandtheIPPBX,theelectricalcharacteristicsofthewire,etc.Theactualamountofsignalthatisreflectedbackdependsonhowwellthebalancecircuitofthehybridmatchesthetwowireline.

    LineechoisntanissuewhenusingastandardanaloguePOTStelephoneasthereflectedvoiceisheardbackatthesametimeasyouarespeaking.Ifthedelayisunder5msitmergeswiththesidetone,whichisthesoundofyourownvoiceinyourearpieceandbecomesunnoticeable.However,whenusingatelephoneconnectedtoanIPPBXthevoiceisdelayedslightlyduetothespeechencodinganddigitalprocessing,whichresultsinecho.Thehybriddeviceintheprovidersexchangeissupposedtosubtractthecorrectproportionofthesignaltransmittedinordertoeliminatetheechofromthelocalloopbackportionofthecircuit.Unfortunatelythoughpoorlydesignedhybriddevicesareoftenusedanditsverycommonforimpedancesettingstobeimproperlybalanced.

  • PCICardCommonInstallationIssues Page15of36

    NovavoxLimited20072008

    Itshouldbenotedthatitispossibleforsomecalls madeusingaPSTNlinetosufferfromechoproblemswhilstothercallsmadeoverthesamelineremainechofree.Forexample,longdistancecallsover600kmareroutinelyechocancelledateachendandmobilephonecallstothePSTNarealsoechocancelledsothesetypesofcallwillnotsufferfromechoissues.

    Inadditiontoechocausedbyhybridbalancingissuesintheexchange,poorqualityinbuildingcablingandsplitterscanalsogenerateechoduetobouncebackcausedbyimpedancevariations.

    5.2 Solution

    5.2.1 CheckforAcousticEcho

    Whensolvingechoissuesthefirststepistomakesurethatthesourceoftheechoisnotacousticechobeingcausedbyatelephonehandset/softphone.Methodstodeterminewhetherornottheissueisduetoacousticechoare:

    Doestheremotepartyhearechoorjustthelocalparty?Ifitsbothpartiestheechomustbeacousticecho.

    TrymakinganinternalcallbetweenextensionsconnectedtothesameIPPBXoracalloveraSIPtrunk,iftheechoisstillpresentit mustbeacousticecho.

    Holdyourhandoverthemouthpiece/microphoneduringacalltoseeiftheechoisstillpresent.

    Ifitisacousticechothereareanumberofrelativelysimplesolutionsavailable:

    Tryturningdownthevolumeonthehandset/speakerphone,mostacousticechoproblemscanbegreatlyreducedbysimplyturningthevolumedown.

    Trymovingthespeakerphonetoaroomthatislesslikelytocreateecho,e.g.acarpetedroomwithsoftfurniturethatcanabsorbthesoundratherthanreflectitback.

    Tryusingadifferenthandset/headset/speakerphone.

    5.2.2 ChecktheZaptelModuleOperatingMode

    IftheechocanonlybeheardwhenmakingcallsusingaPSTNlinethentheechomustbelineecho.Theprimaryobjectindealingwithlineechoistotryandpreventtheechofromoccurringinthefirstplace.AllOpenSourcetelephonycardssoldbyNovavoxhavetuneableparametersthataffecttheoperatingcharacteristicsandhaveanimpactonvoicequalityandecho.Someoftheparametersarecountrydependant,andthereforethezapteldrivermoduleforthecardneedstoknowwhichcountryparametertouse.

    Tosetthecorrectoperatingmodetheappropriateoptionneedstobeaddedtothe/etc/modprobe.conffile.

    Note:DebianbasedLinuxdistributionslikeUbuntudonothavea/etc/modprobe.conffile.Insteadmodulescanbeloaded/unloadedbycreatingaconfigurationfilewiththerelevantoptionsandstoringitinthe/etc/modprobe.d/directory.Forexample,youcouldcreateafilecalled modprobe.confin/etc/modprobe.d/andaddthelinesdescribedabove.Aftercreatingthefilerunupdatemodulestomergethechangeswiththesystemmodulesconfiguration.

    TheoptionsareOpenSourcetelephonycardspecific,twoexamplesareprovidedbelow:

    X100PSEcards

    ThedefaultoperatingmodefortheZaptelwcfxodriverisFCC/USlinestandards.TochangetheoperatingmodetoCTR21tosupportEuropeanlinestandardsaddthefollowinglinestomodprobe.conf:

  • PCICardCommonInstallationIssues Page16of36

    NovavoxLimited20072008

    optionswcfxoopermode=1installwcfxo/sbin/modprobeignoreinstallwcfxo&&/sbin/ztcfg

    ThenshutdownandrestarttheIPPBX:

    #shutdownrnow

    Tocheckthatthecorrectmodeisinoperationusethefollowing:

    #dmesg|more

    Theoutputshouldinclude:

    ...wcfxo:DAAmodeis'CTR21'FoundaWildcardFXO:WildcardX100P...

    ThisconfirmsthatthecardisrunninginEuropeanCTR21mode.

    Pleasenote:TheZaptelwcfxodriveronlysupportsCTR21modewith600ACtermination,whichmayormaynotbethecorrectsettingdependingonthecountryandthephonesysteminuse.Forexample,intheUKBTPSTNlinesusecompleximpedance,whereasPSTNlinesfromsomecablecompaniesmayuse600impedance.Also,theSiliconlabsSi3014/Si3034DAAchipusedontheX100PSpecialEdition(SE)soldbyNovavoxsupportsgloballinestandards.However,theSi3012/Si3035DAAchipusedintheoriginalDigiumX100PcardandlowcostX100PclonecardsonlysupportsFCC/JATElinestandards.Therefore,unlessyouhaveanauthenticX100PSEcarditisunlikelythatyourX100PcardwillsupportEuropeanCTR21mode.

    Tosupportgloballinestandardswehaveputtogetherasetupguidethatusesapatchtoprovideadditionaloperationalmodestosupportlinestandardforallcountries.IfyourcountryisnotsupportedbythedefaultFCCmodeorCTR21600impedancemodethenusetheinstructionsinthefollowingguidetoconfiguretheappropriatesettingsforyourcountry:

    NovavoxX100PSEGlobalLineStandardsSetupGuide

    OpenVoxA400Pcards

    ThedefaultoperatingmodefortheZaptelwctdmdriverisFCCUSlinestandards.Tochangetheoperatingmodetosupportthelinestandardsforadifferentcountryaddthefollowinglinestomodprobe.conf:

    ...optionswctdmopermode=installwctdm/sbin/modprobeignoreinstallwctdm&&/sbin/ztcfg...

    Forexample,thecountrycodefortheUKisUK.AlistofcountrycodesforothercountriesisprovidedinAppendixB.Pleasebeawarethatnotallcountrycodesaresupported.

    AfterconfiguringthecorrectoperatingmodeforyourcountryshutdownandrestarttheIPPBX:

    #shutdownrnow

    Tocheckthatthecorrectmodeisinoperationusethefollowing:

  • PCICardCommonInstallationIssues Page17of36

    NovavoxLimited20072008

    #dmesg|more

    Theoutput(usingtheUKoperatingmodeasanexample)shouldinclude:

    Module0:InstalledAUTOFXO(UKmode)Module1:InstalledAUTOFXO(UKmode)Module2:InstalledAUTOFXS/DPOModule3:InstalledAUTOFXS/DPO

    ThisoutputisforanOpenVoxA400P22with2FXSandFXOmodules,theoutputwillvarydependingonthemodulesinstalled.

    5.2.3 BalancingtheHybrid

    SomeOpenSourcetelephonycardssuchastheOpenVoxanaloguecardrangesoldbyNovavoxhaveaprogrammabledigitalhybridfornearendechoreduction.FxotuneisatoolusedtoautoconfigurethePSTNlineimpedancesettingsforcardsthathaveaprogrammabledigitalhybrid.Beforeusingthefxotunetool,firstofallensurethattheFXOportsareconnectedtothePSTNandthenstopAsterisk(otherwisefxotuneconsidersthelinesasbusy):

    #amportalstop/CLI>stopnow

    Nextstartthefxotunetool:

    #fxotunei5

    Thenumber5isadialleddigitusedtobreakdialtoneontheline,anynumberthatwillbreakdialtoneonthelinemaybeused.TheioptioninstructsfxotunetotestthePSTNlineimpedanceforeachconnectedPSTNline(maytakeupto10minsperline)andsetthecorrespondingparametersinthefxotune.conffile(normallylocatedin/etc/).Oncecomplete,applythecalibrationsettingsdefinedinthefxotune.conffileusing:

    #fxotunes

    BeforefinallyrestartingAsterisk:

    #amportalstart/#asterisk

    EverytimeanewPSTNtrunklineisaddedorchangedfxotunei5shouldberun.

    ThelatestZapteldriverversionsincludethecommandfxotunesintheZaptelinitscript(usuallylocatedin/etc/init.d/)toautomaticallyloadthefxotunecalibrationsettingswhenthesystemisreloaded.IfyouareusinganolderTrixboxversionlike2.2thenthefxotunescommandis includedin/etc/rc.d/rc.localscript.

    TocheckwhetherornotthefxotuneicommandisalreadyincludedinoneofyourIPPBXscriptsopenuptherelevantscriptsusingatexteditorlikenanoandsearchthetextforfxotune.Ifthecommandisnotincludedthenadd/usr/sbin/fxotunestothe/etc/rc.d/rc.localscripttoensurethatthefxotunecalibrationsettingsareautomaticallyreloadedfollowingareboot.

    5.2.4 Adjustingthereceive/transmitgain

    OneofthefactorsthatcanhaveanimpactonechoisthesettingofcorrectRX/TXaudiogainvaluesforyourtelephonelineinthe/etc/asterisk/zapata.conffile.UnfortunatelythereisnosuchthingasastandardRX/TXgainsettingthatwillworkforallinstallationsaseveryinstallationisdifferentduetodifferencesintelephonelinequality,impendence,linelength,

  • PCICardCommonInstallationIssues Page18of36

    NovavoxLimited20072008

    etc.However,AsteriskprovidesausefultoolcalledztmonitortohelpsettheappropriateRX/TXgainvalues.Usingthecommand:

    #ztmonitorv

    Willprovideyouwiththefollowingoutput:

    VisualAudioLevels.Usezapata.conffiletoadjustthegainsifneeded.

    (#=AudioLevel*=MaxAudioHit)stopnow#amportalstart/#asterisk

    TheRX/TXgainswillvarydependingonthelocationofthecalled/callingparty.Therefore,itisadvisablewhenusingztmonitortocalldifferentnumbersindifferentlocationstoachievetheoptimalsettings.

    5.2.5 InbuildingCabling/Splitters

    Amongstotherthings,poorqualityinbuildingcabling,longcablespans,splitterscancreateechoduetobouncebackcausedbyimpedancevariations.Ifyouthinkthequalityoftheinbuildingcabling/splitterscouldbeacauseofecho,thentryconnectingtheportontheIPPBXPSTNlinecarddirectlytotheexchangeNTEboxusingagoodqualitymodemcable.Ifthatfixestheissuethenfollowthecablingrouteandcarryoutsectionteststotryandlocatethesourceoftheecho.

    5.2.6 IPPBXVoiceSwitchingDelay

    Asstatedinsection4,themostimportantfunctionofanIPPBXsystemistoswitch/movedigitalsoundsamplesfromoneport/protocoltotheotheratveryconstantrate.IfthesoundsamplesaredelayedastheytraversetheIPPBXthenthiscancauseecho.ThedelayintroducedbyanIPPBXmaybeduetospeechencoding,digitalprocessing,orboth.

  • PCICardCommonInstallationIssues Page19of36

    NovavoxLimited20072008

    IfitissuspectedthattheIPPBXitselfcouldbethecauseoftheechothefirststepshouldbetocheckforandresolveanyIRQissuesusingthemethodsdescribedinSection4.

    IftheredoesnotappeartobeanIRQissue,thenthegeneralperformanceoftheIPPBXshouldbeassessed.SysteminformationprovidedbyanIPPBXGUI(e.g.TheSystemStatusscreenintheTrixboxGUI)canprovidehelpfulinformationonsystemperformance,i.e.thingslikememoryusage,networkusageandfilesystemcapacity.Commandlinetoolsthatareusefulinclude:

    #vmstatProvidesinformationonCPU/memoryusageaswellsystemI/Oinformation#uptime CPUloadinformationbasedon5,10,15minuteaverages#psaux Staticsnapshotoverviewofsystemprocesses#top Dynamicoverviewofsystemprocessesupdatedevery10seconds

    SolvingIPPBXserverperformanceissuesisoutsidethescopeofthisdocument.However,thecommandslistedaboveshouldactasagoodstartingpointtohelpdetermineifthereisaperformanceissueandwhatthecausemaybetoallowasolutiontobefound,e.g. installextramemoryorremoveunnecessaryapplications/processes.

    5.2.7 EchoCancellation

    Background

    Thesuggestionsaboveareallintendedtohelpstoptheechobeingcreatedinthefirstplace.Ifthesedonotworkthenthesolutionistouseechocancellationtoremoveechofromthevoicecommunication.Echocancellationfirstofallrequiresrecognizingtheoriginallytransmittedsignalthatafteradelayreappearsinthetransmittedorreceivedsignal.Torecognisetheechoreturnlevel(ERL)needstobelowerthantheoutputsignallevelbyacertainamountinorderforittointerpretthesignalasecho.Oncetheechocancellerrecognisestheechoitcanberemovedbysubtractingitfromthetransmittedorreceivedsignal.

    Echocancellationcanbeimplementedinhardwareusingadedicateddigitalsignalprocessor(DSP),orinsoftware.Itisoftenassumedthathardwarebasedechocancellationissuperiortosoftwarebasedechocancellation.However,ahardwarebasedechocancellerisjustanechocancellationalgorithmimplementedinfirmwareonaDSPchip.ThereisnoinherentreasonwhythesamealgorithmcouldntworkequallyaswellinsoftwareonaCPU.Sayingthat,softwarebasedechocancellationdoeshaveanimpactonCPUusageanditsuseisnotfeasibleforlargenumbersofchannels,e.g.multipleE1/T1s.

    Oneofthefactorsthatdetermineshowmuchprocessingresourcesasoftwarebasedechocancellerrequiresisthetailcircuitdelay.ThetailcircuitencompasseseverythingfromtheOpenSourcetelephonycardPSTNportallthewaydowntotheterminatingphone.Tailcircuitdelayisthetimeperiodbetweenthepointatwhichtheoriginalaudiosignalexiststheechocancellerandthetimeatwhichitreturnsasecho.Theechocancellerneedstokeeparecordoftheaudioithassentforatimeperiodequaltothetailcircuitdelaytodetermineifthesameaudiohascomeback.Tokeeparecordoftheaudioittakesdigitalsoundsamplesatsetintervalscalledtaps.

    TheZaptel/Asteriskechocancellerstakedigitalsamplesatarateof8,000persecond,whichmeanstheintervalbetweeneachtapis0.125ms.ThedefaultnumberoftapsinAsteriskis128,whichwillhandleechopathsofupto16msandis usuallyadequateformostechoissues.Thenumberoftapsisalwaysconfiguredasapoweroftwo,i.e.32,64,128,or256.ThelowestnumberoftapsaspossibleshouldbeusedwhilestilladequatelycancellingtheechoasitreducesthecomputingloadandmemoryrequirementontheIPPBX.Also,thetrainingtimeisshorterandthecancellerwilladaptfaster.

    Zapata.confEchoConfiguration

  • PCICardCommonInstallationIssues Page20of36

    NovavoxLimited20072008

    AnexampleZapata.confconfiguration(usuallylocatedin/etc/asterisk/) forenablingechocancellationisprovidedbelow:

    echocancel=yesechocancelwhenbridged=noechotraining=400

    echocancel

    Thisparameterdisables[no]orenables[yes]echocancellation.Itisrecommendedtoleaveitenabledevenoftheredoesntappeartobeanechoissueunlessthereisareasonnotto,e.g.lackofCPUresource.The[yes]settingsetsthenumberoftapsto128,butanintegercanbeusedinsteadtochangethenumberoftapsto16,32,64,128,or256.

    echocancelwhenbridged

    Thisparametersenables[yes]ordisables[no]echocancellationwhenTDMcallsarebridged.GenerallyitsnotnecessaryoradvisabletoenableechocancellationsforbridgedTDMcallsbutitcanbeenabledifrequired.

    echotraining

    TheechotrainingoptioninAsteriskisamechanismforimprovingtheconvergencetimeoftheechocanceller.Transmittedvoiceisdisabledforashorttimeperiodduringringingandaspikeofsoundistransmittedtomeasurethedifferenceinthereceivedechoandtransmittedsignaldirectlyinsteadoflearningititerativelyovermanysamples.Theechotrainingoptioneliminatesmostoftheechoatthebeginningofthecallinthemajorityofcases.Validsettingsforechotrainingare102000millsecondswhichspecifiesthedelaybeforetraining.

    Pleasenote:echotrainingisnotsupportedbytheOpenSourceLineEchoCanceller(OSLEC)andmustbecommentedoutotherwiseitwillcausethechanneltobesilent.OSLECisinstalledbydefaultinTrixboxversions2.4andupwardsandoffersbetterechocancellationperformancethanthezaptelechocancellers.

    RemovingEcho

    Theechocancelandechotrainingoptionsmayneedtobefinetunedinordertogetridofechocompletely.DifferentparametersshouldbeusedonaniterativetrialanderrorbasisuntiltheoptimumechocancelandechotrainingsettingsaredeterminedforanIPPBXsystem.

    Itisadvisabletostartwithanechocancelsettingof32andaechotrainingsettingof100.Incrementtheechotraininginstepsof100butdonotexceedanechotrainingsettingof1200.Asteriskmustberestartedeachtimeoneoftheparametersismodifiedinorderforthechangestotakeeffect.Ifechoisstillpresentafterreachinganechotrainingsettingof1200,incrementtheechocanceloptiontothenextsetting(64)andrepeattheprocessuntiltheechoiscompletelygone.

    Tospeeduptheprocedureyoucanincreasethesettingsusinglargerintervals(e.g.increasetheechotrainingdelayby400eachtime)andcanevenstartatthehighestsettingsandworkbackiftheechoisextremelybad(e.g.256taps,1200millsiceondstraining).

    ChangingtheEchoCanceller

    Ifthereisstillechopresentafterfollowingtheproceduredescribedabovethenitispossibletotryusingadifferentechocanceller.OneoptionistotrytheOSLECechocanceller,instructionsoninstallingtheOSLECechocancellercanbefoundhere:

    http://www.rowetel.com/ucasterisk/oslec.html#install

  • PCICardCommonInstallationIssues Page21of36

    NovavoxLimited20072008

    AnotheroptionistotryadifferentZaptelechocanceller.InolderZaptelversionsthedefaultechocancellerisECHO_CAN_KB1.AnewerechocancellerisECHO_CAN_MG2,whichisthedefaultfornewerZaptelversions.ItalsopossibletousetheAGGRESSIVE_SUPPRESSORinconjunctionwithECHO_CAN_MG2foraggressiveresidualechosuppression.

    Tochangethedefaultechocancelleryouneedtoopenupthezconfig.h file(locatedin/user/src/zaptelor/user/src/zaptel/kernel)usingatexteditorlikenanoandcommentin/outtherequiredechocanceller.Forexample,ifyourdefaultechocancellerwasECHO_CAN_KB1andyouwantedtochangetoECHO_CAN_MG2withAGGRESSIVE_SUPPRESSORyouwouldneedtoedityourzconfig.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.InstructionsondownloadingandcompilingtheZaptelsourcecodeitcanbefoundinAppendixD.

    OctWareSoftEcho

    Analternativetospendingtimetweakingzapata.confsettingschangingrx/txgainsistosimplyinstallOctWareSoftEcho.TheSoftEchoalgorithmisautotuningmeaningthatnoadjustmentsarenecessarymakingintegrationquickandsimple.SoftEchoprovidescarriergradevoicequalityforAsteriskIPPBXvoicechannels,keyfeaturesinclude:

    Excellentdoubletalkhandling Fastconvergence Highqualitybackgroundnoisehandling Longechotailupto128ms Performanceandvoicequalitystatistics Autotuningtransparentalgorithm Dialtoneanddigittransparency G.1682004compliant

    LeveragingOctasic'ssoundprocessingexpertisebasedonyearsofexperienceintrunksideaswellaslocalsidenetworkechocancellation,OctWarehavedevelopedasoftwarebasedechocancellingalgorithmcalledSoftEcho.Withsupportforupto16voicechannels,SoftEchoisacosteffectivewayforAsteriskIPPBXintegratorstooffercarriergradevoicequality.SoftEchoeffectivelyeliminatescustomers'supportcallsaboutunsatisfactoryvoicequality.SoftEchocanbeusedwithanyOpenSourcetelephonycardsincludinganaloguecardsliketheX100PSEanddigitalcardsliketheOpenVoxB100P.

    OctWareSoftEcholicencesareavailabledirectlyfromNovavox:

    http://www.novavox.co.uk/products/software/softecho.html

  • PCICardCommonInstallationIssues Page22of36

    NovavoxLimited20072008

    6 FarendDisconnect

    6.1 ProblemDescription

    Farenddisconnectisthetermusedtodescribethesituationwhenthefarendhangsupduringatelephonecall,i.e.theremoteendfromtheperspectiveoftheIPPBX.Ifalocaluserisonthephonewhenthefarenddisconnectstheuserwillknowthecallhasendedandwillhangupthephoneatlocalend.However,eventhoughthelocaluserhangsuptheIPPBXmaynotreleasethePSTNlineifitthinksthatthefarendisstillconnected.Also,ifsomeoneisleavingavoicemailmessagethentheIPPBXneedstoknowwhenthefarendhashungupotherwiseitwillrecordsilenceordial/busytone.

    ThemethodbywhichtheIPPBXlearnsthatthefarendhasdisconnectedisknownasdisconnectsupervisionsignalling.Themostreliableformofdisconnectsupervisioniswherethelocalexchangedropsbattery/voltagemomentarilyonthephonelinetoindicatetothephone/PBXthattheotherendofthepartyhasdisconnectedthecall,i.e.toprovidehangupnotification.This voltagedropisknownasCPC(CallingPartyControl)orDisconnectClearTime(DCT)intheUK.Thistypeofdisconnecthasvariousnamesindifferentcountriesincludingforwarddisconnect,batteryremoval,openloopdisconnectandclearforwardanswerreversal.

    Anothertypeofdisconnectsupervisionsignalusedinsomecountriesisreversepolarity,alsocalledreversebattery.WhenreversepolaritydisconnectsupervisionisbeingusedthePSTNproviderreversesthepolarityofthebatterycurrentforbothanswersupervisionanddisconnectsupervision.

    Theleastreliablemethodofdisconnectsupervisionistheuseofdisconnect/busytone.WhenthefarenddisconnectstheIPPBXreceivesadisconnect/busytonetoindicatethatthecallisdisconnected.

    FarenddisconnectissuesarisewhenthefarenddisconnectsbuttheIPPBXdoesnotreceiveormisinterpretsthedisconnectionsupervisionsignal.

    6.2 Solution

    Thefirstthingtocheckwhenexperiencingfarenddisconnectissuesthatthecorrectsignallingtypeisconfiguredinthezaptel.conf(e.g.fxsks=1)andzapata.conf(e.g.signalling=fxs_ks)configurationfiles.KewlstartisthepreferredsignallingprotocolforanaloguecircuitsinAsteriskandisthesignallingprotocolthatshouldbeusedintheUKandthemajorityofEuropeancountries.AsummaryofthedifferentsignallingmethodsisprovidedinAppendixA.

    IfyourPSTNproviderusesvoltage/batterydropfordisconnectsupervisionbutfarenddisconnectisnotworkingthentheCPC/DCTprovidedbythePSTNprovidermaybesettoolow.ForexampleintheUKtheidealDCTis800ms,however,itmaybesetaslowas100msandmaynotbedetectedbyyourIPPBX.TosolvethisissuecontactyourPSTNproviderandaskthemtoincreasetheCPC/DCTforyou.

    IfyouPSTNproviderprovidesreversepolarity/batterydisconnectsupervisionthenthefollowingtwolinesshouldbeincludedinthezapata.conffile:

    hanguponpolarityswitch=yesansweruponpolarityswitch=yes.

  • PCICardCommonInstallationIssues Page23of36

    NovavoxLimited20072008

    Forlinesthatrelyondisconnect/busytonedisconnectsupervisionthefollowinglinesshouldbeincludedinthezapat.conffile:

    busydetect=yesbusycount=6

    WithbusydetectenabledAsteriskwilllistenforbusysignalsontheline,ifyourPSTNprovidersendsyouabusytonefollowingfarendhangupAsteriskshoulddetectit.Itshouldbenotedthatthisoptionislessreliablethanotherhangupdetectionmethodsandassuchshouldonlybeusedifitstheonlyoptionavailable.Busycountisthenumberofbusytonestodetectbeforerecognisingthatthefarendhasdisconnected.Thelowerthevaluethequickerthecallwillhangup,butthereisatradeofftconsiderasthis increasesthepossibilityoffalsehangups.

    Youcanalsotryenablingcallprogress,andsetyourprogzonetoyourcountrycode(seeappendixB).Thisoptionissimilartothebusydetectoption,butwillalsolistenforaringingtone,congestiontoneandwilltrytodetectifthelinegotanswered.However,callprogressisexperimental,soifyouexperiencefrequentdisconnects,youshoulddisableit.

  • PCICardCommonInstallationIssues Page24of36

    NovavoxLimited20072008

    7 KernelPaniconReboot

    7.1 ProblemDescription

    SometimesafterinstallinganewOpenSourcetelephonycardyoumaygetaKernelpanicerrorsimilartotheoneshownbelowwhenyoureboottheIPPBX:

    Code:BadEIPvalueFatalexception:panicin5secondsKernelPanicnotsyncing:Fatalexception

    TheissueeffectssomeIPPBXbuildsbutnotothersandisduetotheZaptelmodulesbeingunloadedbeforeAsteriskhasbeenstoppedwhenrebooting.

    7.2 SolutionTosolvetheissueweneedtostopthezaptelmodulesfrombeingunloadedbeforeAsteriskisstoppedwhenrebooting.Thiscanbeachievedbycommentingoutthesectionthatunloadsthedriversinthezaptelstopscriptlocatedinthe/etc/rc6.ddirectory,i.e.thedirectorythatcontainsthescriptsthatareexecutedwhenthesystemisrebooted.

    ThenameoftherelevantscriptisKxxzaptel,wherexxisanumberbetween0099(thenumbercorrespondstotheorderinwhichthescriptisexecuted).InourTrixbox2.6.07testsystemtherelevantscriptis/etc/rc6.d/K92zaptelandtherelevantlinesthatneedtocommentedout(byplacinga#atthestartofeachline)areshownbelow(lines228233andline238)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

    Therelevantlinesinyourzaptelstopscriptmaybeslightlydifferentthesectiontolookoutforistheonethatsaysincludes"Unloaddrivers".

  • PCICardCommonInstallationIssues Page25of36

    NovavoxLimited20072008

    IfamendingthezaptelstopscriptdoesntfixtheissuethenyouwillneedtoensurethatAsteriskisshutdownbeforerebooting,i.e.

    #amportalstop/CLI>stopnow#shutdownrnow

    ItisadvisabletoaddthecommandtostopAsterisktooneoftherebootsscriptstoensurethatAsteriskisalwaysstoppedbeforetheZaptelmodulesareunloadedwhentheIPPBXserverisrebooted.

  • PCICardCommonInstallationIssues Page26of36

    NovavoxLimited20072008

    8 QuickReference

    UsefulCommands

    Command Description#amportalstart StartAsterisk#amportalstop StopAsterisk#asteriskr ConnecttotheAstersikCLI

    #cat/proc/interrupts ListsPCIbusdrivers/devicesrecognisedbytheLinuxKernelalongwiththeallocatedIRQ

    #chkconfig Commandforadding/removinggstartupscriptsandmanagingwhichrunleveltheyoperateat

    #dmesg|more DiagnosticmessagecommandusedtolookattheKernelsbootprocessmessagebuffer

    #fxotune ToolusedtoautoconfigurethePSTNlineimpedancesettingsforcardsthathaveaprogrammabledigitalhybrid.

    #hdparm ProgramthatinteractswithLinuxIDEdrivertoobtainandalterdiskparameters

    #lsmod Listsinformationaboutallloadedmodules

    #lspciv LinuxutilitythatdisplaysinformationaboutdevicesconnectedtothePCIbus,voptiondisplaysIRQallocationdetails#modprobe Addsaloadablemoduletothekernel,e.g.zaptelorwcfxo#psaux Staticsnapshotoverviewofsystemprocesses#setpci UtilityforqueryingandconfiguringPCIdevices#top Dynamicoverviewofsystemprocessesupdatedevery10seconds#uptime CPUloadinformationbasedon5,10,15minuteaverages

    #vmstat ProvidesinformationonCPU/memoryusageaswellsystemI/Oinformation

    #ztcfgvv Reloadsthezaptel.confconfiguration,"vv"optionprovidesinformationonconfiguredzapchannels#ztmonitor TooltohelpsettheappropriateRX/TXgainvalues

    #zttool TheZaptelTool(zttool)commandshowsthecurrentstatusofanyZaptelsupportedinterfacecards

    #zttest ZaptelTest(zttest)isatimingtesttodeterminetheaccuracyoftheZapteltimingCLI>exit ExitfromAsteriskCLICLI>reload ReloadAsteriskCLI>zapshowchannels ShowsZapchannelsrecognisedbyAsteriskCLI>zapshowstatus ShowsZapteldevicesrecognisedbyAsteriskCLI>stopnow StopsAsterisk

  • PCICardCommonInstallationIssues Page27of36

    NovavoxLimited20072008

    ConfigurationFileDescriptions

    File Description

    /etc/inittab Fileusedtoconfigurerunlevelmodes

    /etc/zaptel.conf UsedbytheZapteldrivertodefinetherelevantparametersforzaptelsupportedhardwaredevices

    /etc/asterisk/zapata.conf UsedbyAsterisktostoreinformationaboutZapteldevicesandthefeaturessupported

    /etc/asterisk/zapataauto.conf Automaticallygeneratedbygenzaptelconf,containsZaptelhardwareconfigurationinformationusedbyAsterisk

    /etc/asterisk/extensions.conf Containsdialplaninformationintheformofinstructionscalledextensions,whicharegroupedbycontexts

    /etc/asterisk/indications.conf Containsinformationaboutthesoundsthataphonesysteminaparticularcountrymakesforvariousindications

    /etc/rc6.d/KxxZaptel Zaptelrebootlevelstopscript

  • PCICardCommonInstallationIssues Page28of36

    NovavoxLimited20072008

    9 FurtherAssistance

    ThefollowingareusefullinksforIPPBXserverconfiguration:

    TrixboxWithoutTearshttp://dumbme.voipeye.com.au/trixbox2/trixbox2_without_tears.pdfElastixWithoutTearshttp://www.elastixconnection.com/downloads/elastix_without_tears.pdfAsteriskInstallationGuidehttp://www.voipinfo.org/wikiAsterisk+installation+tipsTrixboxInstallationGuide http://www.trixbox.org/wiki/trixboxquickinstallguidePBXinaFlashInstallationGuidehttp://pbxinaflash.net/docs/InstallPBXInAFlash1.2.pdf

    LinkstotheonlineforumsandwikisforassistanceinstallingAsterisk/Trixboxareprovidedbelow:

    AsteriskWiki http://www.voipinfo.org/wikiAsteriskAsteriskForum http://forums.digium.comTrixboxForumhttp://www.trixbox.org/forumTrixboxWikihttp://help.trixbox.com

    Forproductinstallationguidesandsupportcontactinformationpleasevisitoursupportpage:

    www.novavox.co.uk/support

    Novavoxcustomersonly:Ifafterfollowingtheguidanceprovidedonthesupportpageyouareunabletoresolvetheissuethenpleasecontactusatsupport@novavox.co.uk.

  • PCICardCommonInstallationIssues Page29of36

    NovavoxLimited20072008

    AppendixASignallingmethods

    Groundstart(gs)

    GroundstartsignallingalsoknownasEarthStartandisnotverycommon.ThePBX/phonesignalsacallbyconnectinganearthtooneofthewiresandcurrentflowsfromthePBXearthtothelocalexchangebattery.ThelocalexchangerespondsbysendingdialtonetothePBX/phone.ThelocalexchangesignalsacalltothePBX/phonebyputtinganearthononeofthewires.ThePBX/phonedetectstheearthandlooksforringingvoltagewhichthelocalexchangesends.

    Loopstart(ls)

    Loopstartsignallingissupportedbythemajorityofanaloguephonelines.InLoopstartsignallingthelocalexchangesignalsacallbysendingringingvoltagetothephone/PBX.Itallowsaphonetoindicateonhook/offhook(andaPBXtoseizetheline)byputtingaloopacrossthewires.Thelocalexchangerespondsbysendingdialtonetothephone/PBX.

    Kewlstart(ks)

    Kewlstartsignallingworksinthesamewayasloopstart,butitallowsthelocalexchangetodropbattery/voltagemomentarilyonthephonelinetoindicatetothephone/PBXthattheotherendofthepartyhasdisconnectedthecall,i.e.toprovidehangupnotification.ThisvoltagedropisknownasCPC(CallingPartyControl)orDisconnectClearTime(DCT)intheUK.

  • PCICardCommonInstallationIssues Page30of36

    NovavoxLimited20072008

    AppendixBCountrycodes/zones

    Code Country/Zoneat Austriaau Australiabe Belgiumbr Brazilch Switzerlandcl Chilecn Chinacz CzechRepublicde Germanydk Denmarkee Estoniaes Spainfi Finlandfr Francegr Greecehu Hungaryil Israelin Indiait Italylt Lithuaniamx Mexiconl Netherlandsno Norwaynz NewZealandpl Polandpt Portugalru Russiase Swedensg Singaporetw Taiwanuk UnitedKingdom/Irelandus UnitedStatesuso UnitedStatesOldve Venezuelaza SouthAfrica

  • PCICardCommonInstallationIssues Page31of36

    NovavoxLimited20072008

    AppendixCZaptel.confconfigurationparameters

    busycountBusycountisthenumberofbusytonestodetect,whenbusydetectisenabled.Thelowerthevaluethequickerthecallwillhangup,butthisincreasesthepossibilityoffalsehangups.[positiveinteger]

    busydetectWiththisoptionenabled,asteriskwilllistenforbusysignalsontheline,ifyourcarriersendsyouabusytoneonahangup,Asteriskshoulddetectit.ItshouldbenotedthatthisoptionislessreliablethanotherhangupdetectionmethodssuchaspolarityreversalandCPC(CallingPartyControl)soshouldonlybeusedtodetecthangupsiftheothermethodsarenotsupported.[yes/no]

    calleridCallerIDcanbesettoasreceivedoraspecificnumberifyouwanttooverrideit.Pleasenotethatasreceivedonlyappliestotrunkinterfaces.[asreceivedoraspecificnumber]

    callgroup,pickupgroupSupportsringgroups(a.k.a.callgroups)andpickupgroups.Ifaphoneisringinganditisamemberofagroupwhichisoneofyourpickupgroups,thenyoucanansweritbypickingupusingthepickupcode.Forsimpleoffices,justmaketheseboththesamepositiveinteger.

    callprogress,progzoneThisoptionissimilartothebusydetectoption,butwillalsolistenforaringingtone,congestiontoneandwilltrytodetectifthelinegotanswered.However,thisfeatureisexperimentalandcaneasilydetectfalseanswersanderrors.Fewzonesaresupported,butmaybeselectedwithprogzone[yes/no,andtwolettercountrycodeforprogzone].

    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=aringsignalsthestartpolarity=polarityreversalsignalsthestart

    contextDefinestheinitialcontextforthechannel.Thiswillbethecontextavailabletothechannelupontheinitiationofacall.Notethatcontextsareanimportantpartofmaintainingsitesecurity.Theinitialcontextwillgoverntheavailabilityofextensionstoagivenchannel.Ifanextensionisplacedinadifferentcontextfromtheinitialcontext,thatextensionisunavailabletothecaller.

    echocancelEnableechocancellation.[yes/no,orapoweroftwofrom32to256tosetthenumberofcancellationtaps]

    echocancelwhenbridgedGenerally,itisnotnecessary(andinfactundesirable)toechocancelwhenthecircuitpathisentirelyTDM.Youmay,however,reversethisbehaviourbyenablingtheechocancelduringpureTDMbridging.[yes/no]

  • PCICardCommonInstallationIssues Page32of36

    NovavoxLimited20072008

    echotrainingInsomecases,theechocancellerdoesn'ttrainquicklyenoughandthereisechoatthebeginningofthecall.EnablingechotrainingwillcauseAsterisktobrieflymutethechannel,sendanimpulse,andusetheimpulseresponsetopretraintheechocancellersoitcanstartoutwithamuchcloserideaoftheactualecho.[yes,no,oranumberofmilliseconds(102000)todelaybeforetraining]

    faxdetectUponfaxdetection,routesfaxtoafaxextension.[Both,incoming,outgoing,orno.]

    groupAllowsanumberofchannelstobetreatedasoneforthepurposeofdialing.Fordialingout,thechannelswillbecalledonafirstavailablebasis.Forthepurposeofringingstations,allchannelsinthegroupwillringatonce.Takesanintegerfrom0to63andmultiplegroupscanbespecified.

    hanguponpolarityswitchInsomecountries,apolarityreversalisusedtosignalthedisconnectofaphoneline.Ifthisoptionisenabled,thecallwillbeconsidereddisconnectedonapolarityreversal.[yes/no]

    hidecalleridSetswhethertohideoutgoingcallerID,defaultstono.[yes/no]

    immediateSpecifywhetherthechannelshouldbeansweredimmediatelyorifthesimpleswitchshouldprovidedialtone,readdigits,etc.[yes/no]

    musiconholdSelectwhichclassofmusictouseformusiconhold.Ifnotspecifiedthenthedefaultwillbeused.Themusicclassisdefinedinmusiconhold.conffile.[default,loud,random]

    pulsedialUsepulsedialinsteadofDTMFforFXO(FXSsignalled)devices.[yes/no]

    relaxdtmfIfyouhavetroublewithDTMFdetection,youcanrelaxtheDTMFdetectionparameters.RelaxingthemmaymaketheDTMFdetectormorelikelytohavetalkoffwhereDTMFisdetected.[yes/no]

    rxgainAdjustsreceivegain.Thiscanbeusedtoraiseorlowertheincomingvolumetocompensateforhardware/linedifferences.[Positiveornegativedouble,measuredindB]

    sendcalleridafterSomecountrieshaveringtoneswithasetofcadenceswhichdifferfromthedefault.Thisrequiresthecalleridtobesetwithadelay,andnotrightafterthefirstring.[Positiveinteger]

    threewaycallingSupportthreewaycalling.[yes/no]

    transferSupportflashhookcalltransfer(requiresthreewaycalling).Alsoenablescallparking(overridesthecanparkparameter).[yes/no]

    txgainAdjuststransmit.Thiscanbeusedtoraiseorlowertheoutgoingvolumetocompensateforhardware/linedifferences.[Positiveornegativedouble,measuredindB]

    usecalleridWhetherornottousecallerID.[yes/no]

    usedistinctiveringdetectionIndicateswhetherornottoallowdistinctiveringdetectiononFXOlines.[yes/no]

  • PCICardCommonInstallationIssues Page33of36

    NovavoxLimited20072008

    AppendixDRecompilingZaptel

    Guidelines

    ZaptelSoftwareVersion

    DetailedinstructionsareprovidedbelowforrecompilingZaptelversion1.4.10.1,whichistheversionusedinTrixbox2.6.07.IfyouwishtorecompileadifferentZaptelversion,thenyouwillneedtoensureyoucheckwhatZaptelVersioniscurrentlyrunningandmodifytheinstructionstodownload/installthecorrectversion.

    ConfigurationFileBackups

    UnlesssomethinggoeswrongyourcurrentconfigurationfilesshouldnotbemodifiedwhenrecompilingtheZaptelsoftware.However,itisrecommendedtobackupcurrentconfigurationfilesinjustcasesomethingdoesgoeswrong,particularlyiftheIPPBXisaworkingsystem.

    SoftwarePackageDependencies

    IfyouyourIPPBXhassoftwarepackagesinstalledthataredependantonZaptel,thenthereisapossibilitythattheymaynotworkproperlyafterrecompilingtheZaptelsoftwareandtheymayneedtobereinstalled.Also,ifyouhaveinstalledanyotherpatchesormodifiedanyoftheoriginalZaptelsourcecode(e.g.tosupportvendorspecifichardwaredrivers)thenyouwillneedtorepeatthesamecodechangesbeforerecompilingtheZaptelcode.

    Instructions

    Theinstructionsbelowarebasedonusingyumforpackageupdates/installationandwgettodownloadsourcecodetarballs.However,ifpreferredalternativemethodscanbeusedsuchasusingaptormanuallydownloadingrpmstoupdate/installpackagesandusingsvntodownloadsourcecode.

    1.UpdatePackages

    Itisrecommendedthatyouensurethatallinstalledsoftwarepackagesareuptodateusing:

    #yumupdatey

    Warning:Ifyouhavepatchedanyinstalledpackagesthenthesewillneedtobepatchedandrecompiledagainafterusingyum.Asanalternative,youcanjustupdatetheZaptelpackageasthisisbeingrecompiledanyway.

    2.InstallkernelSourceTree

    Firstofallchecktoseeifyouneedtoinstallakernelsourcetreebyrunning:

    #lsl/lib/modules/`unamer`/build/.config||echo"Installkernel"

    Iftheoutputshows"Installkernelthencheckwhatkerneltypeyouneedasshownbelow,otherwiseproceedtostep3.

    Checkifyouareusingasmpkernelornot:

    #unamer|grepqsmp&&echo"InstallSMPkernel."

    Iftheoutputshows"InstallSMPkernel.",thenrun:

  • PCICardCommonInstallationIssues Page34of36

    NovavoxLimited20072008

    #yuminstallkernelsmpdevelkernely

    Otherwiserun:

    #yuminstallkerneldevelkernely

    3.InstallC/C++CompilerPackages

    InstallC/C++CompilerstoCompileSourceCodeifyoudonthavetheminstalledonyoursystem:

    #yuminstallgccy#yuminstallgccc++y

    4.ShutdownandRestarttheIPPBX

    Rebootandcheckthateverythingisstillworkingcorrectlyafterinstalling/updatingrelevantpackages:

    #shutdownrnow

    DownloadZaptelSourceCode

    Changetousersourcecodedirectoryanddownload/unziptherequiredsoftwarepackages:

    #cd/usr/src

    5.Download/UnzipZaptel

    #wgethttp://ftp.digium.com/pub/zaptel/releases/zaptel1.4.10.1.tar.gz#tarxzvfzaptel1.4.10.1.tar.gz#lnszaptel1.4.10.1zaptel

    6.MakeSourceCodeModifications

    AtthispointyoushouldmaketherequiredchangestotherelevantZaptelsourcecodefiles.Ifyouarechangingthedefaultechocancellationsoftwarethenyoushouldmodifythezconfig.hfileasdescribedinSection5.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 Page35of36

    NovavoxLimited20072008

    IfyouareusingadifferentTrixboxversionoranalternativeIPPBXpackagethenyouwillneedtofindwheretheZaptelmodulesarecurrentlyinstalled.TofindtheZaptelmodulesdirectoryfindthedirectorythatthewcfxo.komoduleisstored.

    Note:AsanalternativetodeletingtheZaptelmoduledirectoryyoucouldmakeacopyofthedirectoriesandthendeletetheoldonestoprovideacontingencyplanifanythinggoeswrong.

    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

    ConfigurationCompleteTheZaptelsourcecodehasbeenrecompiledandyourIPPBXisnowreadytobeused.

  • PCICardCommonInstallationIssues Page36of36

    NovavoxLimited20072008

    AppendixEAcronyms

    Acronym DescriptionACPI AdvancedConfigurationandPowerInterfaceAPIC AdvancedProgrammableInterruptControllerBIOS BasicInput/OutputSystemBT BritishTelecomCLI CommandLineInterfaceCPC CallingPartyControlCPU CentralProcessingUnitCTR21 CommonTechnicalRequirementsdirective21DAA DirectAccessArrangementDCT DisconnectClearTimeDMA DirectMemoryAccessDSP DigitalSignalProcessorERL EchoReturnLevelFCC FederalCommunicationsCommissionFXO ForeignExchangeOfficeFXS ForeignExchangeStation/SubscriberGUI GraphicalUserInterfaceI/O Input/OutputIDE Intelligent/IntegratedDriveElectronicsIP InternetProtocolIPPBX IPPrivateBranchExchangeIRQ InterruptRequestJATE JapanApprovalsInstituteforTelecommunicationsEquipmentOSLEC SourceLineEchoCancellerPCI PeripheralComponentInterconnectPOTS PlainOldTelephonyServicePSTN PublicSwitchedTelephonyNetworkSCSI SmallComputerSystemInterfaceSMP SymmetricMultiProcessingUDMA UltraDMAUK UnitedKingdomUSB UniversalSerialBusVoIP VoiceoverIP