Introduction to Telephony Application Development Using Asterisk, Asterisk Java, and SIP

Size: px
Start display at page:

Download "Introduction to Telephony Application Development Using Asterisk, Asterisk Java, and SIP"

Transcription

1 Page1of56 IntroductiontoTelephonyApplicationDevelopmentUsing Asterisk,Asterisk Java,andSIP bycokordarakaanggajananuraga PutuSutawijaya GerakBagaiBadai(StormlikeMovements)

2 Page2of56 Irackedmyminds,nogemstobefound,foranimpressiveopeningline... So,outoffrustrationIwrite... Frankly,Ihavenoideafortheopeningparagraphsofthisbooklet.AllIhaveisasetofconcepts/ideas roamingtheemptyspaceinmyhead...well,i'lljustletthemalloutnow. Raka'sMindMap Thisbookletisaboutallofthemandnoneoftheminparticular(huh?).Imean,ittouchesthesubjects drawnabovetovariouslevelsofdetail.somearementionedbriefly,andsomegetquiteanextensive coverage(foranintroduction).iuseaprogramthatiwroteasavehicle[res.1],andi'llstartmy explanationfromtheobjectives(therequirementsoftheprogram).itreflectsmylearningstylethat usuallystartswith what?tellme,followedby how?showme,andendsupin why?theories please. Withoutfurtherado:InthisarticleI'mgoingtointroduceyoutotechniques,libraries,andtoolsfor developingtelephonyservices.we'lluseallopensourcestuffshere(cool,huh!?),likeasterisk, Asterisk JavaLibrary,Ethereal,SIPp,andNISTJAINSIPlibrary. Audience Well,Icanthinkofatleast2groupsofpeople.First:thosewho'veneverbeenintouchwithtelephony andctistuffs.iwasinthatgroup.butonceigotmyhandsonasterisk,anopensourcepbx,igot excited.itwaslike: Wow,kewl,Icandostuffswiththisthing...quiteeasily!.Ihopeafterreadingthis article,they'llfindtelephonyapplicationdevelopmentinteresting,andwouldliketogiveitatry. Thesecondgroupis:thosewho'vebeeninthisdomainforsometime,haveheardofthewordAsterisk andsipbuzzingaroundthem,butnotquitesurewhereandhowtostartmakingsomethingoutofthem. Ihopethisarticlecanbesomekindofaguidemap. Istartedfromzero,Ithink.IstudiedtheSIPspecification[Ref.5],somerelevantbooks,installedand playedaroundwithasteriskandrelatedstuffs,scrolledthroughlotsofpacketscapturedusingethereal, etc.ienjoyedtheprocess,anditworkedquitewellforme.atleastithinknowi'msufficientlyoriented formyfurtherendeavor.i'dliketosharethatapproachwithyouthroughthisarticle. Bytheway:ifyou'relookingforthetableofcontents,it'sattheendofthisbooklet.

3 Page3of56 AllYouNeedIs... love...,andseveralsoftwares!here'sthelistofthingsthatyouneedtohaveinyourcomputer: Asterisk,thatwillserveasourbackend.Amongotherthings,itswitchesincomingcallstoregistered extensions.inthisoccasion,we'regoingtomonitortheeventshappeninginanasterisksothatwe knowwhenacallisstartedandended. Youwouldn'tfinddetailedinformationabouthowtoinstall,run,andadministeranAsteriskboxhere. Referencessuchas[Ref.2]and[Ref.6]dothatjobalotbetter.However,Iwillgiveyouanexplanation justenoughtoquicklysetupyourasteriskboxandconfiguringitinordertomakeourprogramworks. Asterisk Java,aprogramminglibrarythatwe'llusetointeractwithAsteriskfromtheprogramthat we'regoingtodevelopwithjava.thekindofinteractionspossibleare: a) ListeningtoeventssentbyAsterisk. Asterisksendalleventshappeninginittoalltheregisteredlisteners.It'sasocketbased communication.ourprogramwillopenasocket,throughwhichitregistersitselftoasterisk (viaamanagerinterface)sothateventsgeneratedbyasteriskwillarriveonthatsocket. b) SendingactionstoAsteriskthroughtheconnectionbetweenourprogramandthemanager interface.we'llreceivearesponseforanactionthatwesendtoasterisk. c) SendingcommandstoAsteriskthroughthesocalled agichannel.we'llgetareplyfora commandthatwesendtoasterisk. Sidenote.Thedistinctionbetweencommandandactionisnotyetclearforme.Iguessactionismore general,inthesensethatwecansendanactiontoasteriskanytime.ontheotherhand,wesend commandthroughanagichannel,that'sonlyavailableinthecontextofanexecutionofanagiscript. ExecutionofanAGIscript,inturn,istriggeredbyacallmadethroughtheAsteriskbox.So,Iguess, thescopeofacommandislimitedtoaparticularcall. SIPp.ItisaprogramthatwecanusetogenerateSIPsignalingtraffic.Typicallyitisusedtostress testasip basedtelecommunicationsystem.inourcase,weneedtomakesurethatourprogram performscorrectlyinamore or lessrealisticsituation(callscominginandoutsimultaneously). Therefore,weuseSIPptosimulatemultiplecalls. Ethereal,anopensourceGUInetworkprotocolanalyzer.Itletsyouinteractivelybrowsepacketdata fromalivenetworkorfromapreviouslysavedcapturefile.asitoldyouearlier,iwalkedmywayfrom thebottomupinunderstandingthesestuffs.hmm...,well,notexactly.ofcourse,firstireadsome referencesabouthowthingswork(forexample:communicationbetweensipendpoints),thenimoved ontoapidocumentationstogetsomepracticalinsights.butmaybebecausei'maskeptic,ifeltthe needtoreallyseewhat'sbeingexchangedthroughthewire,thesequence,etc.forthatreason,iopened myethereal,startsniffing,andtrytoconfirmwhati'veread. Inourprogram,particularlywhenevercreationofconferenceroomisdetected,weneedtosneakina dummyparticipantintothatroomforareasonthatwillbeexplainedlater.thatdummyparticipant

4 Page4of56 basicallyisasoftwareagentthatdialsintotheconference,andstaysthereuntileverybodyelseleave theroom.i'vedecidedtoimplementtheestablishment(andtear down)ofthecallsessionbetweenthat softwareagentandasteriskusingsip. Sidenote.Actuallywehaveatleast2choicesofcallsignallingprotocolwithanAsteriskbox:IAX2 andsip.ichoosesipfortworeasons: AtthetimeofwritingtherewasnoIAXprogramminglibraryinJava,atleastnottheopensourced one.inthisoccasionilimitthechoiceonlytoopensourcesoftwaresandlibraries. Thepurposeofthisarticleistogivethereaderssomekindofbirdviewovertheworldoftelephony applicationdevelopment,usingemergingopenstandardsandopensourcesoftwares.we'renotgoing forthedepthrightnow,butinsteadforthebreadth.followingthe moreismore principle,ibringon SIPtothetable.Thetalkabout whichoneismoresuitableforparticularcase,siporiax? isbetter leftforanotherarticle,iguess. SIPisinterestingandpromising,Icantellyou.Ifyoucheckbigtelecommunicationvendors'websites, you'llfindthattheyallhavesiprelatedstuffsintheirproductline(beitsoftwareorhardware).a scoopofknowledgeonsipmightbebeneficialforyoutoplayinthatmarket. WeneedJAIN SIP.ItisaJava standardinterfacetosipsignalingstack(whateverthatmeans:).from practicalpointofview,ourjavaprogramconstructs,sends,receives,andreadssipmessagesusing classesandinterfacesspecifiedinjain SIP.There'sanopensourceimplementationofJAIN SIP specificationfromnationalinstituteofstandardandtesting[res.7]. DoesJAIN SIPvaguelyremindyouofJDBC...?Exactly!

5 Page5of56 MissionBriefing First,let'sdefineanobjective.WewanttocreatesomethinglikeinFig.1.Let'scallitCallWatcher. Fig.1.CallWatcher'smainwindow singlepartycalls Theapplicationhas3panels: SinglePartyCalls CallswhichareanswereddirectlybyAsteriskshouldshowupinthispanel(Fig.1).For example:inourdialplan,wespecifythatcallscomingintoextension600willbeansweredby anasterisk'sbuilt inivrthatsimplyechoeswhateverthecallerissaying.thatcallshould showupinthesinglepartycallspanel. TwoPartiesCalls Callswhichareterminatedatanotheruseragent1(UA)outsideofAsteriskshouldshowupin thispanel(fig.2).forexample:wehaveconfiguredinourdialplanthatincomingcallto extension101mustbeswitchedtoagent#01.thatcallshouldshowupinthetwopartiescalls panels.inthispanel,theidofthecaller thatcouldbehertelephonenumber isshowninthe CallerIDcolumn.ThedialedextensionisshownintheCalledIDcolumn. Fig.2.CallWatcher'smainwindow twopartiescalls ConferenceCalls: Conferencecallswillshowupinthispanel(Fig.3).Thenumberofparticipantsinthe conferenceisshownintheparticipantscolumn.forexample:wehaveconfiguredthatthose whodialstheextension5400willbejoinedtoconferenceroom#400. Aconferenceroomwiththatnumberwillbeautomaticallycreatedincasenosuchroom currentlyexists.asaresult,weshouldseeanewentry(row)isaddedtotheconferencecalls 1 Somethingthatoriginatescalls/whereacallisterminated.A(SIP)phoneisanexampleofuseragent.

6 Page6of56 panel.otherwise(iftheroomexists),thevalueofparticipantcolumninthecorresponding entryinthepanelshouldbeincrementedbyone.similarly,wheneversomeoneleavesa conferencethethevalueofparticipantcolumnshouldbedecrementedbyone. Fig.3.CallWatcher'smainwindow conferencecalls OnallthepanelsthereisacolumnnamedState.Thatcolumnsshowsthestateofthecall.Acallcanbe inanyofthisstate: IDLE:initialstate CONNECTING:whenAsteriskisabletolocatetheotherparty towhichthecallshouldbe connected,inthecaseoftwopartiescall andisintheprocessofconnectingbothparties. ACTIVE:whenthecallisactive(involvedpartiesaretalkingtoeachother). INVALID:whenthecallhasbeentorn down.inthecaseofconferencecall,itisinvalidwhen everyone(includingthedummyparticipant)haslefttheconferenceroom.theconferenceroom isalsoautomaticallydisposed. Additionaly,userofCallWatchercanperformanactiononanactivecall.Shedoesthatbyselectingan activecall,andclickthebuttonthatrepresentstheactionshewantstoexecute.asyoucanseeinfig.1 throughfig.3,therearetwopossibleactions: Drop:thiswillterminatetheselectedcall.Inthecaseofconferencecall,everyoneintheroom willbekickedoutfirst. Monitor:thiswillinstructAsterisktorecordtheselectedcall. InthecaseofSinglePartycall,it'sclearthatwe'reinterestedinwhatthecallersaidandheard. Sowe'lltapinthechannelbetweenthecallerandtheAsteriskbox. InthecaseofTwoPartiescall,we'reinterestedinwhateitherthecallerorthecalleesaidand heard.there'snodifference,butyouhavetopickone(ipickthecaller). InthecaseofConferencecall,we'reinterestedinwhatthedummyparticipant heard.why? Becausethedummyparticipantwasthereduringthewholeconferencesession.Other participantsmightleftandrejoined,thusmissedsomepartsofthediscussion.that'snotthe casewiththedummyparticipant.forthatreasonwe'lltapinthechannelbetweenthedummy participantandtheasteriskbox. Well,that'sit.Quiterougharequirement.Wearegoingtorefineourrequirementsaswemoveonwith thedesignand further withtheimplementation.

7 Page7of56 TheDesign...,aStaticView Thefirststepindesigningasystem,particularlysystemdevelopedinanobject orientedway,is understandingthedomain.thisinvolvesidentifyingtheconceptswithinthedomain,howthey're relatedtoeachother,andhowtheyworktogethertoaccomplishasetofobjectives.theoutcomeofthat processissomethingcalleddomainmodel. Agoodplacetostartisanexistingstandard,likeJTAPI(JavaTelephonyAPI).Iadoptedseveral conceptsthatilearnedfromjtapi[res.6].overviewofthedesignisshowninfig.4.pleasekeepin mind,we'renotimplementingjtapihere(it'snoteasy).themodelthatipresenthereworksinour specificsituation,butmightnotworkinother/moregeneralsituations.itissomethingsimpleenough tounderstand,implement,andexplain...,butstillconceptuallycorrect(oratleastmakesenoughsense). Fig.4.Classdiagram Let'sstartwiththecentralconcept: Call.Itrepresentsatelephonecall,theinformationflowing betweentheserviceproviderandthecallparticipants2.theinformationflowbetweenacallparticipant andtheproviderthroughanlogicalconduitthatwecall Channel.Eachparticipantisrepresentedby itsaddress;wecallit CallEndpointinourmodel. Anotherveryimportantconceptinourmodelisthe Provider.It'sanabstractionoftelephonyservice providersoftware.let'stakealookatsomeofthethingsthatwecandowithaprovider: 2 DefinitionisborrowedfromoneofJTAPIWhitepapers(TheJavaTelephonyAPI AnOverview).

8 Page8of56 drop(callcall); monitor(callcall); Abstractioneffectivelymeansthattheonewhousesitdoesn'treallyknow(norcare)howthose operationsarecarriedout.allsheneedstoknowistheeffectoftheoperation,whichinthecaseof droppingacall(forexample)is:alltheparticipantswillbedisconnectedfromthecallandthecallwill becomeinvalid.wesimplydelegatethatdirtyjobtoourunderlyingtelephonysystem...,asterisk. Sidenote.PleasenoticethatinourmodelProviderisaninterface,notaclass.There'sactuallya concreteclass notshowninthediagram thatimplementsprovider.itsnameis AsteriskProvider. ItcontainsthelogicsofcommunicatingwithAsterisk. EventhoughwehavenootherimplementationofProvider,andneitherdowehaveanyplantocreate anotherimplementationofprovider(thattalkswithpbxotherthanasterisk),stillit'sagoodideato keepthatproviderinterface.iresistthetempation(oraharrasmentfromafriendofmine)toconvert ProviderintoaclassandmoveallthelogicsfromAsteriskProviderintoProvider(andconsequently purgeasteriskprovider). ThegeneralrulethatIapplyis:anabstractionofanexternalsystem suchasasterisk shouldbe interface ified.iteasesthetestingbecausethenwecandosomekindofscenariobasedtestings,even withouttheexistenceofthatexternalsystem.thisinterfacebasedprogramminggetsalongverywell withtestdrivendevelopment(particularlyusingmockobjectapproach). Foracomparison,takealookatthefollowingdiagramthatIstolefromJTAPIWhitepaper[Ref.1]. TheChannelinourmodelismoreorlessequivalentto ConnectioninJTAPI'smodel.The CallEndpointinourmodelisarippedoffversionof AddressinJTAPI'smodel. Fig.5.JTAPI'scallmodel

9 Page9of56 Let'sgobacktothetelephoneCall.Wehave3typesofcall3: SinglePartyCall TwoPartiesCall ConferenceCall SinglePartyCall SinglePartyCallisacallwithonlyoneparticipant(thusonechannel).Ithappenswhensomeonecalls anextensioninasteriskwhichisconfiguredtoswitchthecalltoanasterisk'sbuilt inivr.thereisa flowofinformationonlybetweenthecallerandtheasterisk.theclass SinglePartyCallinourmodel representsthisconcept. Fig.6.AsteriskCLI singlepartycall WhenIcalledtheextension600 mappedtoechoapplication thelogthatiobservedonasterisk's CommandLineInterface(CLI)wasliketheoneshowninFig.6.Thatlogconfirmedmethatthereare indeedcaseswhenacallhasonlyonechannel. TwoPartiesCall TwoPartiesCallisacallwithtwoparticipants twochannels justlikeanormalphonecallthatmost ofuswouldexpect:).theclass TwoPartiesCallinourmodelstandsforthisconcept. Inourasteriskdialplan,acalltocertainnumberswillbeswitchedtoanotherpartyoutsideofAsterisk. Forexampleifsomeonecallstheextension101,shewillbeconnectedtosomeonenamed Agent1.In thatcasetheparticipantsofthecallare:mrs.janedoe(thecaller)andagent1.takealookatfig.7 (sothatyou'reconvinced:): Fig.7.AsteriskCLI twopartiescall 3 Warning:theyarepurelyproductofmyimagination.YouwillnotfindtheminJTAPIspecification.

10 Page10of56 ConferenceCall ConferenceCallisacallthatcanhavemorethantwoparticipants(thereforemorethantwochannels). Theclass ConferenceCallinourmodelcorrespondstothisconcept. Asteriskhasabuilt inapplicationforconferencing.itsnameismeetme.there'saslightdifference betweenasterisk'smodelandours(regardingconference).takealookatfig.8. Fig.8.AsteriskCLI conferencecall LookslikeinAsterisk'smodelaconferenceisnotareallycall.It'smorelikeacollectionofsingleparty callswhicharedestinedtoanextensionwhichisconfiguredtoswitchthecalltoaparticularconference room,wheretheinformationfromthecallersaremixedandthendistributedtoeveryparticipants. IdecidednottofollowAsterisk'smodel.IwantedtobeasconsistentaspossiblewiththemodelthatI learnedinjtapi.noneofthesubtypesofjavax.telephony.callinjtapihasasetofcallsasits property.instead,aninstanceofjavax.telephony.callhasasetofinstancesof javax.telephony.connection.therefore,inourmodel ConferenceCallismodeledtohaveasetof instancesofchannel.

11 Page11of56 TheDesign...,theDynamics Let'sstartwithasimplequestion: WhocreatesinstancesofCalls?.Let'ssee...acallisactuallya conceptwithinthetelephonysystem.imean,acallisestablishedinthetelephonysystem.takealook againatfig.6tofig.8.it'sunderstandableifsomeonesays Ah,currentlythereare5callsgoingon intheasteriskbox afterseeingthereportintheasteriskclithatresultedfromanexecutionof showchannels command. InourmodelthetelephonysystemisrepresentedbyaninstanceofProvider.Thereforeitmakessense toassigntheresponsibilityofinstantiatingcallstoprovider.currentlythere'snomechanismthatlets usersofourprogramtoinstructprovidertocreateacall(callcreationisnoton demand).instead,calls arecreatedautomaticallywithintheprovideronnotificationsreceivedfromtheunderlyingtelephony system. InstanceofProviderisastatefulobject itholdsinstancesofcall.becauseofmemoryusage consideration,wedecidedtomaketheproviderholdsonlytheactivecalls.werefertothosecallsas attachedcalls4.togetthelistofcallsattachedtoaprovidersimplyinvokethemethod getattachedcalls()onit. Aboycried: but...,ialsowanttobenotifiedwhenacalliscreated,and atthesametime obtain thereferencetothatinstanceofcall. Soweinventedaninterfacenamed ProviderListenertocalmthatboy.Ithas2methods: callattached(callcall) calldetached(callcall) Accordingly,weaddmethodsintoProvidertoregisterandunregisteralistenertoit.Thosemethods are: addlistener(providerlistenerlistener) removelistener(providerlistenerlistener) Inourprogramtheclassthatcontrolstheuserinterfaces net.raka.agiexp.gui.main implements ProviderListener.WheneveranewinstanceofCallisattachedtotheproviderthatitlistensto,anew row thatshowsinformationaboutthecall willbeaddedtothetableintheappropriatepanel (dependingontheconcretetypeofthecall). Callconstructionisamulti stepsprocess.it'snotliketheasterisksimplynotifiesourjavaapplication oncewheneveranewcalliscreatedwithintheasterisk,andpassesalongalltheinformationneededto createaninstanceofcallinourjavaprogram.thelibrarythatwe'reusingtocommunicatewith Asterisk Asterisk Java worksatthelowerlevel.whatthelibrarypassestoourjavaapplicationare notificationsabouttheeventsthattakeplaceintheasterisk,intheformofinstancesof ManagerEvent. 4 Whenacallbecomesinvaliditwillbedetachedfromtheprovidertowhichitwaspreviouslyattached.

12 Page12of56 Evensomethingassimpleascallingtheextension600 thatismappedtotheechoapplication will triggerasequenceofmanagereventsasshowninfig.8.looselyspeaking,thatsequenceofevents buildsupthesinglepartycall. Fig.8.Managereventsgeneratedwhen600isdialed ANewChannelEvent likethefirsteventinfig.8 givesanindicationtoourapplicationthatsomeone /somethingisconnectingtotheasterisk.butatthatpointwecannotfigureoutifitisasingleparty call,twopartiescall,orconferencecall.moreinformationisneeded,thatisthevalueofthenextevents inthesequence.onlywhenthesequenceofeventsturnouttobeliketheoneinfig.8,forexample,we canconcludethatanewsinglepartycallhasbeencreated. Analysisofsequenceofmanagereventswillbediscussedthoroughlyintheimplementationsection. Thepointhereis:weneedsomethingthatkeepstrackoftheevents,andinstantiatesaCallatan appropriatepointintime.inourmodelthat something is CallConstruction.Youcanthinkofan instanceofcallconstructionasafinitestatemachine.youfeedmanagereventstoit,sequentially.ifit acceptstheevent(forprocessing)thenitwillswitchitsstate,dependingonthetypeandtheproperties

13 Page13of56 oftheevent.whenitarrivestoaspecificstate letscallit callinstantiationstate itwillinstantiate thecorrecttypecall. So,wehaveamanagereventbeingpassedaround.Firstoff,amanagereventisraisedbyAsterisk.Then ittravelsthroughatcpsockettoasteriskproviderthatactsas ManagerEventHandler5thathasonly onemethod,namely handleevent(managereventevent).seearrow#1infig.9. Fig.9.Callconstruction AsteriskProviderwillfirstiteratethroughtheattachedcalls,toseeifanyofthemwould accept the managerevent.itdoesthatbycallingthe process(managereventevent)oneachinstanceofcall(see arrow#2).themethodwillreturntrueifthecallacceptstheevent,orfalseotherwise. AninstanceofCallalsokeepstrackofManagerEventsinordertobeabletodecideifitshouldupdate itsstate.ofcoursenotalleventspassedintoitwillbeacceptedbythecall.acalldetermines acceptabilityofaneventbasedonitscurrentstateandthepreviouseventsthatithasaccepted. IfnoneofthecallsaccepttheeventthenAsteriskProviderwilliteratethroughtheliving CallConstructions.Again,itcallsamethodnamed process(managereventevent)oneachinstanceof CallConstruction(seearrow#3).IfnoneofthemacceptstheeventthenAsteriskProviderwillinspect thetypeoftheevent.ifitisa NewChannelEventandthestateofthechannelis Ring,thenanew instanceofcallconstructionwillbecreatedandaddedtothelistoflivingcallconstructions. Otherwise ifthere'sacallconstructionthatacceptstheevent andtheeventcausesthe CallConstructiontomoveontothe callinstantiationstate,anewinstanceofcallwillbecreatedand attachedtotheasteriskprovider(seearrow#4).then,thecallconstructionwillberemovedfromthe listoflivingcallconstructions. Anotherconceptneedsexplainingisthejavainterface CallListener.Acallwillnotifyitslistenersof interestingeventsthathappeninit.calllistenerhasthefollowingmethod,amongothers: statechanged(intoldstate,callcall) Theclassthatcontrolstheuserinterfacesinourprogram net.raka.agiexp.gui.main alsoimplements CallListener,sothatitcanupdatethedisplayonthetableofcalls(eachtimeanyofthecallsthatit keepstrackofchangesitsstate). 5 AninterfacedefinedintheAsterisk JavalibrarythathandleseventsreceivedfromanAsteriskserver.

14 Page14of56 SettingUptheEnvironment Let'ssetupourplaygroundbeforejumpingintothefunpartthatiscoding...,startingwiththe installationofasterisk.oh,diditellyouthatweneedtoworkonlinuxos?i'musingopensuse10at home,butasteriskcanrunin(m)anyflavoroflinux. Asterisk Theinstallationiseasy.Onceyouhaveitdownloadedfromhttp:// followingsteps: 1. Unpackthatfile(i.e.:tarxzvfasterisk tar.gz) 2. Gotothedirectorywhereyouunpackedthefile 3. Typeinthecommandline:make 4. Thentype:makeinstall Nowwecanmoveontotheconfigurationstage.Asteriskwilllookforitsconfigurationfilesunderthe directory/etc/asterisk/.therearemorethanadozenofconfigurationfiles(mucho),eachofthem controlsparticularaspectofanasteriskserver.ifyou'relazy(likeme),youwouldn'twanttowrite thosefilesfromthescratch.rather,you'dsimplytypemakesampleinthecommandline.thatwill copysampleconfigurationfilesto/etc/asterisk. Amongthoseconfigurationfiles,wewillbeconcernedwithonlyfourofthem: sip.conf extensions.conf manager.conf meetme.conf Andlet'sstartwithsip.conf... sip.conf Amongotherthings,herewedefinethelocallyconnectedSIPphones,whichcanbeofanyofthese types:user,peer,andfriend. ForaUAthatcanonlyplacecallstoAsteriskwesetthetypetouser.TheUAwillbeasked authenticateitselfeverytimeitplacesacall.theauthenticationusernameandthepassword sentbytheua(inresponsetothechallenge)willbematchedagainstthenameoftheentryand thepasswordspecifiedforthatentry,respectively. FortheUAthatAsteriskcanplacecallsto inadditiontoreceivingcallsfrom wesetthetype topeer.thatuaiskindoftrustedbyasterisk,meaningthatitwillnotbeaskedfor authentication(password)whenplacingacall. However,fortheUAtobeabletoreceivecalls,Asteriskneedstoknowitslocation.Registration bytheua isawayofnotifyingasteriskaboutitslocation.onlythenasteriskwillaskfor authenticationusernameandpassword.

15 Page15of56 Thelasttype,friend,isuser+peerinone. MostofthetimeIsetthelocallyconnectedphonestofriend,though.However,toletpeopleinthe officetoplaceorreceiveacalltooutsidepartiesthroughanothersipserver(e.g.:freeworlddialup), wedefineanentryoftypepeer. Let'sexperimentalittle.First,copyandpastethefollowinglinestotheendofyoursip.conf. [johndoe] type=user host=dynamic canreinvite=no [goldenboy] type=peer host=dynamic canreinvite=no (And...?)Let'sreadaboutextensions.confbeforerunninganything:). extensions.conf ThisfilecontainsthedialplanofanAsteriskbox.It'satextfilewherewe inasimplestscenario specifiessomethinglike ifthecallerdials103thenswitchthecalltojeniffertheceo'sassistant.the book[ref.2]succintlydescribesitas:...theheartofanyasterisksystem,asitdefineshowasteriskhandlesinboundandoutbound calls.inanutshell,itconsistsofalistofinstructionsorstepsthatasteriskwillfollow. Dialplanarebrokenintosectionscalledcontext,whichisanamedgroupofextensions.Someofthe contextsdefinedinthesampleextensions.confare:international,longdistance,local,default,and demo.nowlet'stakealookagainatsip.conf.youshouldfind,inthegeneralsection,somethinglikein Fig.10: Fig.10.Aportionofsip.conf Thehighlitedlinesaysthat:thecallswhichcomethroughtheSIPchannel,fromacaller/userwhose contextisunknown/undefined,willbeputinthecontextnameddefault.thedefaultcontextinthe sampleextension.confisdefinedthefollowingway: Fig.11.Thedefaultcontextinthesampleextensions.conf Ok,itleadsustoanothercontextnameddemo(grr...).Thereareseveralextensionsdefinedinthedemo

16 Page16of56 context,withtheextension600beingoneofthem(seefig.12). Fig.12.Theextension600definedinthedemocontext Theuserjohndoedoesn'thaveitscontextdefined(insip.conf).Thereforethecallfromjohndoewillbe placedindefaultcontext.furthermoreiftheextensioncalledbyjohndoeis600,thenitwillbe(1) greetedwiththeplaybackofanaudiofilenameddemo echotest,then(2)handledbyanapplication namedecho(thatsimplyechoesbackwhateverthecallersays),and(3)greetedagainwiththeplayback ofanaudiofilenameddemo echodone.let'sproveit,bymakingacall. Yourfirstcall First,starttheAsteriskbytypingasteriskinthecommandline,followedbytypingasterisk vvvvvvvvvvrtogetintotheasteriskcli(sothatwecanseewhat'sgoingon).toexitfromthecli withoutkillingasterisk'sprocess typeexitinthecli.tostoptheasterisktypestopnow. Next,let'sconfigureyoursoftphone.Thereareatleast2freeSIPsoftphonesthatrunsonLinux: KPhone(opensource)andXten Xlite.Onthisoccasionwe'lluseKphone.WiththeKphone,first,you needtoconfiguretheidentitythatitwillusewhenplacingacall.followthestepsdisplayedinfig.13. Youhavetosetthe HostPartofSIPURL totheipaddressofyourasteriskbox. Step1 Step2 Fig.13.KPhoneidentityconfiguration

17 Page17of56 Onceyou'redonewithstep2,clicktheOKbutton,thenyouwillhavetorestartyourKphone(exitand rerun).toplaceacall,typethesipurlofthedestination inthe Kphoneaddressbar(seeFig.14),followedbyhittingtheEnterkey6.Whenyou'repromptedfor Fig.14.KPhone Yoursecondcall Nowlet'strythefollowingscenario: ifsomeone(suchasjohndoe)callstheextension666,hewillbe transferredtogoldenboy....thefirstthingyou'llhavetodoisregisteringtheextension666tothe defaultcontext.copythefollowinglines... exten=>666,1,dial(sip/goldenboy) exten=>666,n,hangup...andpastethemintoextensions.conf,insidethedefinitionofdefaultcontext,suchthatyour extensions.conflookslikefig.15. Fig.15.Definitionofdefaultcontext,afterthemodification NowyouhavetorunanotherinstanceofKphoneforthepeergoldenboy.Ifyouhavemorethanone machine,you'relucky,youjusthavetorepeattheidentityconfigurationstepsexplainedaboveonthe othermachine,specifyinggoldenboyastheauthenticationusername.otherwiseyou'llhavetodotwo things: 1. Createanotherlinuxuseronyourmachine,openanewinstanceofKonsole,loginasthatnew userfromthatconsole,andrunkphonefromtheconsole.followthestepsexemplifiedinfig ChangethehostpartoftheSIPURLtotheIPaddressyourAsteriskbox.

18 Page18of56 Fig.16.RunninganotherinstanceofKphone(asusernemo) 2. DoalittletrickwiththeKphonebecausebydefaultKPhonewilltrytohaveanexclusiveaccess tothesoundcardduringaphonecall.thetrickbasicallyisconfiguringatleastoneofthe instancesofkphonetousenulldevice(/dev/null).followthestepsexemplifiedinfig.17. Step1 Step2 Fig.17.ConfiguringKPhonetouse/dev/null Inourscenario,thisinstanceofKPhoneisgoingtoreceiveacall.Thereforeithastoregisteritselfto theasterisk.let'sregisterthephoneunderthenamegoldenboy.followthestepsshowninfig.18.

19 Page19of56 Step1 Step2 Fig.18.Registeringgoldenboy Toverifyif(locationof)thephonehasbeenregisteredintheAsterisk,gotoAsteriskCLIandtypesip showpeers.fromtheexampleoutputofthecommand seefig.19 wecantellthatthephoneis locatedonthemachine andisboundtoport5062. Fig.19.Verifyingregistrationofsippeer Atlast,youcanmakeyoursecondcallnow.FromthefirstinstanceofKphone(johndoe),dial installationandconfigurationofasterisk.ihopeyoudidn'trunintoanytroubles.next,let'sgetdirty withthecodes!

20 Page20of56 Implementation Beforeanythingelse,Isuggestthatyoudownloadthesourcecodeofyourapplicationfrom[Res.1]. ThenyouimporttheprojectintoyourEclipseworkspaceandtrytoresolvethelibrarydependency issuesbyyourself.here'showtheprojectstructurelooksonmyeclipse: Fig.20.Eclipsescreenshot(...ateaser;) Let'sbeginourjourneyfromtheconstructoroftheMainclass.TherearethreethingsthatMaindoes whenitsbeinginstantiated,theyare:bopeningaconnectiontotheasteriskbox,cregisteringitself totheasteriskproviderasoneofitslisteners,anddregisteringasteriskproviderasthehandlerof managereventsreceivedfromtheasteriskbox(throughtheconnectionestablishedinstep.1).please takealookatfig.21toseethecorrespondinglinesofcode. Fig.21.SnippetfromconstructorofMainclass

21 Page21of56 Nowlet'sseehow,roughly,thedisplay(userinterface)isupdatedtoshowtheinformationaboutthe newcalleverytimeanewcallisestablishedintheasteriskbox.youmusthaveunderstoodthatwhena callisestablishedintheasteriskbox,acorrespondinginstanceofcallwillbeattachedtothe AsteriskProvider7.Beingoneofthelistenersoftheprovider,Mainwillreceiveanotificationofthat event(b). Fig.22.SnippetfromconstructorofMainclass Theproviderpassinthecalltothelisteners(whendoingthenotification).Main,inthiscase,will inspecttheconcretetypeoftheinstanceofcallthatitreceivesinthenotification.dependingonthe concretetype,mainwilladdthecalltoanyofthefollowingliststhatitmaintains:singlepartycalls, twopartiescalls,orconferencecalls(c).thelinesofcodeinmainthatcorrespondstothisstepis showninfig.23. Fig.23.ImplementationofcallAttachedinMainclass TheMainclasspushesthenotificationfurthertoaninstanceof PresentationModelbycallingthe callattached(...)methodonthatpresentationmodel(d).presentationmodelrepresentsthestateand behaviorofthepresentationindependentlyoftheguicontrolsusedintheuserinterface.forexample, insteadofhavingthelogicsthatdecidewhetherornotthemonitorbuttoninthepanelwhichshows singlepartycallsshouldbeenabled,mixedwiththecodesthatdefinethingslikedimensionandlaying 7 WhichisthereasonwhyIdrawaprojectionlightfromtheAsteriskboxtotheAsteriskProvider toindicatethatthe AsteriskProviderisrepresentationoftheAsteriskboxintheworldofourprogram.

22 Page22of56 outoftheguicontrols,wekeepthemintwoseparateclasses: DefinitionsofGUIcontrolsgotoaclassnamed AgiExp. ThelogicsmentionedpreviouslygotoPresentationModel. Theideaisthatthepresentationmodelcanbeusedwithvariouspresentationtechnologies(beitSwing, web,orothers).ofcourse,thenwehavetoprovideabindingbetweenthepresentationmodelandthe userinterfacethatliesontopofit,somehow.formoreaboutpresentationmodel,goto[ref.3]. Ourpresentationmodelpushesthenotificationevenfurther,toitslisteners(thatareinstancesof PresentationModel.Listener),withAgiExpbeingoneofthem(E).Inresponse,AgiExpwillaskthe appropriatetabletorefreshitselftoreflectthelatestcontentofthecorrespondinglistofcallspulledout fromthepresentationmodel(f).thefollowingfigureshowsthesectionofcodesinagiexpfrom wheretherequestforarefreshissent. Fig.24.ThedefinitionofmethodcallAttachedinAgiExp. Respondingtotherequest,thetablewillfirstaskitsmodelforthenumberofrowsthatshouldbe displayed(seepointb infig.25).then,foreachcolumnintherowitwillagainaskitsmodelforthe valuetobedisplayed(c)8. 8 ThisisatypicalwayofimplementingaTableModel.Iassumethatyou'requitefamiliarwithSwingprogramming.

23 Page23of56 Fig.25.AsectionofcodesinAgiExp.SinglePartyCallsTableModel Sothatwashow anewrowisaddedtothetable.nowi'mgoingtoexplainthe howanentry ina table isupdated.whenyouruntheprogram(later),youwillobservethatthestateofthecall changesoverthetime,untilfinallyitendsupininvalidstate.thefollowingisascientific explanationforthatphenomena. TakealookagainatFig.23,theretheMainregistersitselfasalistenertoan(new)instanceofCall passedtoit.beinga CallListener,themainclassimplementsthefollowingmethods: voidstatechanged(intoldstate,callcall) voidchanneladded(conferencecallconferencecall,channelchannel) voidchannelremoved(conferencecallconferencecall,channelchannel) Everytimethestateofthecallchanges,forexample,thecallwillnotifyitslistenersbyinvokingthe method statechanged(...)oneachoneofthem.thefollowingfigureshowshowmainreactstothe changesofstateofacall: Fig.26.ThedefinitionofmethodstateChangedinMain

24 Page24of56 [Finally...]We'reabouttogothroughanotherinterestingpartofourjourney,interactingwithAsterisk thatis.i'mgoingtoshowyou,first,howtoreceiveandhandlemanagereventsthatcomethrougha managerconnection.i'llputitinitsownsection,forit'squiteextensive.so,please,bearwithme. Receivingandhandlingmanagerevents AnyobjectthatwantstoreceivemanagereventsfromAsteriskhastosatisfythefollowing requirements: Implementsajavainterfacenamed ManagerEventHandler,whichispartoftheAsterisk Java librarythatwe'reusing.theasteriskproviderclassdoesit. Beregisteredtothemanagerconnectionasoneofitshandlers.Amanagerconnectionisan instanceof ManagerConnection alsopartofasterisk Javalibrary thatrepresentsa (network)connectiontotheasteriskbox.themainclassdoesitfortheasteriskprovider,by invokingthemethod addeventhandler(...)onthemanagerconnection(seefig.21pointd). TheonlymethoddeclaredinManagerEventHandleris handleevent(managereventevent).the followingfigureshowshowitisimplementedinasteriskprovider.isuggestthatyoualsotakealook backatfig.9,you'llnoticethatthelinesofcodeinfig.27istheotherformofthediagraminfig.9. Youcancomparethempoint by arrow,e.g.:pointb infig.27correspondstoarrow#1infig.9. Fig.27.ThedefinitionofmethodstateChangedinMain BynowyoumightbewonderinghowdoIknowthataNewChannelEventina Ring stateindicatesa newcall.myanswer: fromanalysisofsequenceofmanagerevents.here,i'llshowyou...

25 Page25of56 Analysisofsequenceofmanagerevents Thewayforanexternalprogramtoknowwhat'sgoingoninAsteriskisbymonitoringitthrough managerinterface.well,actually,managerinterfaceservestwopurposes:(1)monitoringand(2) controllingasteriskfromexternalprograms.we'llfocusonthemonitoringpartinthissection. There'snothingfancyhere;Asterisksimplysendsmanagereventstoeveryexternalprogramthathasa managerconnectiontoit.themanagereventsreceivedareorderedintime.however,aneventisnot necessarilyrelatedtotheothereventthatcamebeforeit.therefore,theprogramneedssomekindofa statemachinetosortoutandmakesenseoftheevents. ForeverydistincteventinAsteriskthere'sauniquetypeofmanagerevent(sorry).Thefollowingfigure listsallthetypesofmanagerevent.inourprogramwe'regoingtodealonlywithasmallsubsetofit, namely ChannelEvent(andallitssubtypes), LinkageEvent,and MeetMeEvent. Fig.28.ThetypehierarchyofclassManagerEvent IhavecreatedasimpleprogramthatconnectstotheAsteriskmanagerinterface,anddumpsallthe eventsitreceivestothescreen.thenameoftheprogramis EventDumper.Beforeyoucanrunitwe needtomakesurethatmanagerinterfaceisenabledinasteriskandcreateamanageraccountin Asterisk. Wedothatbymodifyingthefile/etc/asterisk/manager.conf.Gotothegeneralsectionandsetthe enabledpropertytoyes.itisalsoagoodideatouncommentthedisplayconnectproperties(sothatyou canconfirmifyourprogramreallyisconnected).youshouldcomeupwithsomethinglikeinfig.29. Fig.29.Generalsectioninmanager.conf Toaddamanageraccount,addthefollowinglinestotheendofthefile.RemembertochangetheIP

26 Page26of56 address intheexamplebelow totheipaddressofthemachinewhereyou'regoingto connectfrom(i.e.:theipaddressofthemachinewhereourprogramwillberanon). [agiexp] secret=password deny= / permit= / read=system,call,log,verbose,command,agent,user,action write=system,call,log,verbose,command,agent,user,action Herearethestepsforobtainingsequenceofmanagereventsgeneratedbyacall: StartorrestartAsterisk(itwouldn'tpickupthechangeyou'vemadetothemanager.confunless yourestartit). RunEventDumperfromyourEclipseasjavaapplication.Theprogramrequiresthatyoupass threeargumentstoit:(1)theipaddressoftheasteriskbox,(2)theusernameofthemanager accountfortheconnection,and(3)thepasswordofthemanageraccount.youshouldsee somethinglikebelowintheoutputconsoleoftheeventdumperapplication: Thenstartthekphone,thistimelet'sauthenticateasuserjohndoe.First,let'sfindoutmanager showninfig.30.

27 Page27of56 Fig.30.Managereventsgeneratedforasinglepartycall Let'snotjumpintoanyconclusionsoquickly.Weyethavetoseetheeventsgeneratedbyatwo partiescall.trymakingacallfromjohndoetogoldenboy.alltheeventsgeneratedareshown infig.31. Fig.31.Managereventsgeneratedforasinglepartycall Trybothexperiments makingasinglepartyandtwopartiescall severaltimes,justtobesure.from thoselogsonethingyoucanquicklyspotis:theyallstartwithnewchanneleventwhosestateisring. That'showcametotheconclusionthattheAsteriskProvidershouldknowthatwhenthateventcamein, anewcallshouldbeconstructed(i.e.anewcallconstructionshouldbecommenced)9.therefore,we havethelinesofcodeasisshowninfig.32inasteriskprovider. 9 I'mnotshowingyoutheeventsfromaconferencecall.Toonoisy.But,believeme,it'sthesame.Crescentmyheart.

28 Page28of56 Fig.32.Managereventsgeneratedforasinglepartycall WheninstantiatedtheCallConstructionwillgodirectlytoitsfirststate,thatiswaitingfor NewExtenEventtocomein.TheFig.33showsthestatediagramofacallconstruction.Tobemore exact,it'slimitedtotheareawithinthegreenborder.theeventsarerelatedtoeachotherbytheir uniqueid,withtheuniqueidofthenewchanneleventasthebasis.inotherwords,aparticularinstance ofcallconstructionwillonlyprocesseventswhoseuniqueidmatchesthebasis. Fig.33.Statediagramofacallconstruction

29 Page29of56 Rightafteritreachesanyofthe creation states(theoneswithredborder),thecallconstructionwill godirectlytoitsfinalstate.fromthatpointonitnolongerexpectsforevents(becausesubsequent relatedeventswillbehandledbythecallitjustcreated).thereforeitwillremoveitselffromthelistof livingcallconstructionsmaintainedbytheasteriskprovider.thelinesofcodethatcorrespondtofig. 33isshowninFig.34(they'rewithintheprocessEvent(...)methoddefinedinclassCallConstruction). Fig.34.ImplementationofprocessEvent(...)inCallConstruction YoumightbeaskingrightnowhowdoIdecided,forexample,toinstantiateaSinglePartyCallwhenan instanceofnewstateeventwhosestateisupandapplicationisnotmeetmeisreceived.well,firstly, I'vemadecomparisonsbetweenvariouscallscenarios.SoIjustknow(believeitlikeyoubelievein god10 ha!).second:it'sbecauseatthatmomenttheprogramwillalreadyhavealltheinformationit needstoinstantiateasinglepartycall. 10 Ifyoudon'tbelieveingod,you'relostdude.Ihavenotimetoconvinceyouanddoasalvationforyou.Hehehe...

30 Page30of56 Ok,nomorequestions.Let'sseehowacallhandlesmanagereventspassedtoit.We'llstartwithsingle partycall.thefollowingfigureshowsthestatediagramofasinglepartycall. Fig.35.StateDiagramofsinglepartycall And...Fig.36belowshowshowatwopartiescallhandlesmanagereventspassedtoit. Fig.36.StateDiagramoftwopartiescall Onethingincommonbetweenthewayasinglepartyandtwopartiescallfiltertheevents(suchthat only relevant eventscouldaffectitsstate)isthattheycheckthenameofthechanneloftheevent by calling getchannel()ontheevent andcompareitwiththeidofthedescriptorofthechannelofthe call(phew!). ThefollowingfigureshowsthejavacoderepresentationofFig.36.It'sthecodewithinthemethod processevent(...)intheclasstwopartiescall.togetaverygoodgraspoftheconceptsandmechanics,i

31 Page31of56 encourageyoutoplaywiththedebuggerandexperimentwithvariousscenariossuchaswhere(1) goldenboydoesn'tregistertoasterisk,(2)johndoehangsupthecallbeforegoldenboypicksupthecall, and(3)goldenboyrejectsthecall. Fig.37.SourcecoderepresentationofFig.36

32 Page32of56 Testing(#1) Nowlet'stryrunningourprogram(yay!).We'llfirstdofunctionaltestingmanually.Automatictesting willbeexplainedlater.herearethestepsyoushouldfollow: 1. MakesurethatAsteriskisrunning...,withthemanagerinterfaceenabled. 2. Runthemainclassofourprogram,namelynet.raka.agiexp.gui.Main.Youcandothatdirectly fromeclipse.don'tforgettopassinthefollowingprogramarguments: 1. TheIPaddressoftheAsteriskbox. 2. Theaccountnameinmanagerinterface(e.g.:agiexp). 3. Thepasswordoftheaccountinmanagerinterface(e.g.:password) 4. TheportnumberwhereAsterisk'sSIPserviceisboundto(bydefaultit's5060.Checkthe valueofpropertynamedbindportinthegeneralsectionin/etc/asterisk/sip.conf). 5. TheIPaddressofthemachinewhereyou'rerunningthisprogram.Don'tuse or localhost,useactualipnumber.thisvalueisusedbyconferencecallmonitor,whichi'll explainlater. 6. Theportnumberwheretheconferencecallmonitorwillbeboundtoo.Useanyportwhich isnotoccupied(e.g.:7000).thisvalueisalsousedbyconferencecallmonitor. 3. Makethecalls: 1. Trycalling600fromjohndoe,andwatchthetableinthetabnamed SinglePartyCalls in ourprogram. 2. Trycallinggoldenboyfromjohndoe(dial666).Watchthetableinthetab TwoParties Calls.ExperimentwiththescenariosImentionedpreviously.

33 Page33of56 Howwasit?Ihopeyouweresatisfied.Didyounoticethatwhenyouclickedontherowthatdisplaysan activecall,thetwobuttonsatthebottomrightcornerofthepanelbecameactive? ClickingtheDropbutton,thecallwillbe,well,dropped(allthepartiesconnectedtothecall willbekickedout,andattheendthecallwillbecomeinvalid). YoucanclicktheMonitorbuttontorecordtheconversationwithinthecall.Ispecifiedinthe codethatthefilewillbesavedin/var/recordings. Umm...,you'veguessedit.We'renowgettingtotheotheruseofAsteriskmanagerinterface,for controlling.solet'sgetbacktocode(wehavemuchtolearn).

34 Page34of56 ImplementationAgain(ControllingAsterisk) TheactionhandlerofthosebuttonsaredefinedintheclassAgiExp.Theclickingonthedropbutton,for example,willendupinthe drop(callcall)methoddeclaredinprovider.thefollowingdiagram showsthepaththattheclickingwillgothroughtoreachthedrop(...)methodinprovider. Fig.38.Memberscalling'drop(Call)' inworkspace Sonowlet'stakealookattheimplementationofthedrop(...)methodinAsteriskProvider. Fig.39.Memberscalling'drop(Call)' inworkspace So...controllingAsteriskfromexternalprogramisassimpleassendingoutaninstanceof ManagerActionthroughthemanagerconnection.Inthecaseofdroppingacall,wesendaninstanceof HangupAction.Forrecordingacall,wesendaninstanceof MonitorAction.Thefollowingfigure displaysallthestandardmanageractions.butitdoesn'tmeanallofthemcanbeused.thenumberof actionsavailablearedeterminedbythemodulespresentlyloadedintheasterisk.

35 Page35of56 Fig.40.Memberscalling'drop(Call)' inworkspace Inmostcases,maybe,thestandardactionsprovidedbyAsterisk Javasufficetogetyourjobdone.But, incaseyourfancyrequirementrequires(ugh)youtosendanactionthat'snotinthelistabove,youcan haveyourcustomactionbymakingaclassthatextends AbstractManagerAction.Ofcourse,onthe Asteriskside,theremustalsobeamoduleloadedthatcanhandleyourcustomaction. (What'stheguidelineforimplementingacustomaction otherthanextending AbstractManagerAction?) Notmuch.Iseethataninstanceofmanageractionthatwethrowintothemanagerconnectionissent throughthewireasaplaintext,inaverysimpleformat...,key valuepairs.thefollowingiswhatigot frometherealwhentheprogramsentamonitoraction: action:monitor actionid:421988_3# file:/var/recordings/ channel:sip/johndoe d54a mix:true format:wav Thattextisconstructedoutofthepropertiesoftheaction.Youcanverifythisinformationbytakinga lookatthesourcecodeofmonitoraction.theclasshasthefollowingmethods:getaction(), getactionid(),getfile(),getchannel(),getmix(),andgetformat().ifyou'restillunconvinced whatan infidel thencheckouttheimplementationofthemethod buildaction(...)inclass ActionBuilderImpl(partofAsterisk Java). Conclusion:ifyouhaveathirdpartymodulethatprovidesexternallyaccessibleextrafunctionalities installedinyourasterisk,andyouwanttobeabletoaccessthemfromyourjavaprogram,thenaskfor thedocumentationthatexplainsthekey valuepairsaccepted/requiredbythosefunctionalities.then, onthejavaside,youonlyhavetomakesurethatyourcustommanageraction(s)hastheappropriate getters(forallthekeysspecifiedinthedocumentation) JustfollowtheJavaBeanconventionforthenamingofthegetters.

36 Page36of56 ImplementationReturns(ConferenceCall) Conferencecallisthefinalpieceinourprogram.Iputitthelast,separatedfromtheexplanationabout thetwoothercalls,because(1)thereareotherconfigurationthingstodoinordertomakeitwork(a tinyhassle!),and(2)thereareothernewconceptsandtechniquesthati'dliketointroduce. Zaptelinstallation Tomaketheconferencefeature usingmeetme availableonyourasterisk,youhavetodoseveral things.firstofall,meetmerequiresatimingdeviceinordertooperate(asteriskwon tevencompileit ifnotimingdeviceisfound).alldigiumpcihardwareprovidesa1 khztiminginterface.ifyoulack thepcihardwarerequiredtoprovidetiming,theztdummydrivercanbeusedasatimingdevice12.so..., youneedtoinstallzapteldriversonyourlinux.here'saquickinstruction: 1. Downloadzaptel 1.2.x.tar.gzfromAsterisk'swebsite[Res.2],andunpackit. 2. Iassumethatyoudon'thaveDigiumPCIhardware.So,youneedtohaveztdummycompiled too.editthethemakefile(ofzaptel),andlookforthefollowingsection(andremovethehash thatprecedesztdummy): MODULES:=zapteltor2torisawcusbwcfxowctdmwctdm24xxp\ ztdynamicztd ethwct1xxpwct4xxpwcte11xppciradio\ ztd loc#ztdummy *)IfyourLinuxuseskernel2.6.x,youdon'thavetodothis. 3. Finallydothe:(1)makeclean,(2)make,(3)makeinstall,and(4)makeconfig. 4. Re compileandre installasterisk. That'sallthereistoit.Well,notreally.Atleastnotinmycase.Idon'tknowwhatiswrongwithmy Linux(orzaptelinstallation),IhavetodothefollowingritualbeforestartingAsterisk: Fig.41.Mysillyritual Meetmeconfiguration TheconfigurationoptionsfortheMeetMeconferencingsystemarefoundin/etc/asterisk/meetme.conf. Insidetheconfigurationfile,youdefineconferenceroomsandoptionalnumericpasswords(ifa passwordisdefinedhere,callerwillberequiredtoenterapasswordforenteringtheconferenceroom). Todefineaconferenceroom(withnumber400,andwithoutpassword),simplyaddthefollowingline totheendofmeetme.conf: 12 Again,Icopied and pastedseveralsentencesfrom[ref.2] Chapter3,onCompilingZaptel.

37 Page37of56 conf=>400 Now,tosupportsuch requirement as: ifthecallerdialsthenumber5xxx,thensheshouldbejoined toconferenceroom#xxx,wehavetoaddthefollowinglinesintheextension.conf(puttheminthe sectionfordefaultcontext): exten=>_5xxx,1,meetme(${exten:1},i) exten=>_5xxx,n,hangup Thereyouhaveyourconferencingsystemsetup.Re startasterisk,followedbymakingacall(from johndoe)tothenumber5400andonceyou'reconnectedtotheconferenceroom,justfollowthe instructiononthephone(afterthetoneblablabla...)13.well,iguessaconferencewouldn'tbeveryfun withonlyonepersonintheroom.so,trymakingacallfromotherua(e.g.:goldenboy)to Observe!YoucanstartwithcheckingAsterisk'sstatusfromtheCLI(seeFig.42). Fig.42.Checkingchannels&meetmestatus Backtoourprogram Thelogicofcreationofaconferencecallgoeslikethis(thisistoclarifythediagraminFig.33): Incomingcallstoaconferenceroomgothroughthesamestatetransitions,thatis:waitingfor NewExtenEvent waitingfornewstateevent waitingformeetmejoinevent creationof conferencecall. However,onlythefirstcallshouldcausethecreationofaninstanceofConferenceCall(B).As longasthefirstcallhasn'tlefttheconferenceroom,thesubsequentcallsshouldbeadded asa newchannel totheinstanceofconferencecallcreatedpreviously(c). ThelogicabovetranslatestothefollowingjavacodesintheclassCallConstruction: 13 Youneedtoinstallapackagenamedasterisk soundtobeabletoheartheinstruction.asterisk soundissimplya collectionofaudiofiles. 14 It'sbettertocarryonthisexperimentinalocalareanetworkwithseveralcomputers(sothatyoucanreallyplaywith sound remember?thesoundcardexclusiveaccessproblem).butifyou'reonlyinterestedinthesignalling,it'soktorun allthephonesinasinglecomputer.

38 Page38of56 Fig.43.Conferencecallcreationlogic Well,therewasnothingnewintheaboveexplanation(justareiterationofprocessingofmanager events).thetwonewinterestingthingsthatipromisedareintegrationusingasteriskgateway Interface(AGI)andprogrammingwithSIPstacklibrary.Let'sbeginwithAGI.

39 Page39of56 LeMayeur PortraitofNiPolok Sorryfortheinterruption,butIhavetogivesomewordsofcautiontoyou.It'saboutthestatemachine. Idon'twantto(mis)leadyoutothinkthatthestatemachineinthisprogramisreusable(canbeusedin allkindsofsituationinvolvingdetectionofcreationanddestructionofacallinasterisk). Iwouldsaythatastatemachineishighlyrelated(coupled?)tothedialplan.Evenalittlemodification tothedialplanmightrenderthestatemachineuseless.forexample,ifyouusedafunctionotherthan DialtomakeanoutboundcallfromyourAsterisk,thenyouwouldnotseethetwopartiescallshowup intheuserinterface.it'sbecauseourstatemachineassumesthatthelifecyleofatwopartiescallbegins whenanewextenevent whoseapplicationpropertyissettodial isreceived(seeagainfig.34,blue shadedarea). So,Ithink,indevelopingatelephonyapplication(usingtheapproachsimilartotheoneweusehere) firstyouhavetounderstandtherequirementsforthedialplan.thenyouhaveitsstructurewelldefined, sothatyouknowallthepossiblesequenceofevents.finallyyoudesignyourstatemachinebasedon that.

40 Page40of56 AsteriskGatewayInterface(AGI) TheAsteriskGatewayInterface,orAGI,providesastandardinterfacebywhichexternalprogramsmay controltheasteriskdialplan. Youmusthaverealizedthatthe language weuseinthe/etc/asterisk/extensions.conftocraftthe dialplanisverysimple(andlimited).itsupportsbranchinginaverylimitedway,throughtheuseof dialplanfunctionsnamedgotoif.itdoesn'tevenseemtosupportlooping.wecandosimplestring patternmatching,though,likewedidwiththeextensiontoaccessaconference(_5xxx). Clearlyother additional waysofcontrollingadialplanisrequired...,withotherlanguageswhichare morecapable(andmorepopular).that'sthecaseforagi;it'swhatcgiistowebservertoasterisk. YoucanprogramanAGIinlanguagessuchasC,python,Java,andmaybesomeothers. TheAGIscriptcanbedeployedinthesamemachineastheAsterisk(asisthecommoncasewithCor python basedagiscript),oronaremotemachine(inwhichcase,thecommunicationisconducted betweenasteriskandtheagiserverthathoststhescriptthroughasocket,usingfastagiprotocol). Inourprogramwetakethelaterapproach,andtheprogramminglanguagethatweusetocreatethe scriptisjava.thelibraryasterisk JavacomeswithclassesthatallowustorunanAGIserverin embededmode(inadditiontoastandaloneagiserverprogram).nowlet'stakealookhowwecallour remotelydeployedagiscriptfromtheasterisk.replacethefollowinglinesofcode(thatyouput earlier)fromextensions.conf: exten=>_5xxx,1,meetme(${exten:1},i) exten=>_5xxx,n,hangup...with... exten=>_5xxx,1,agi(agi:// /conferencemonitor?roomid=${exten:1}) exten=>_5xxx,n,meetme(${exten:1},i) exten=>_5xxx,n,hangup Basedontheconfigurationabove,whenacallenterstheextension5XXX,arequestwillbesenttoan AGIserverrunningonthemachine toexecuteascriptwhichismappedtoanidentifier conferencemonitor.aparameternamedroomid,whosevalueissettoxxx,willbepassedalongthe request.onsuccessfulreturnfromtheexecutionofthescript,thenextlineinthedialplanwillbe executed. TohaveacustomAGIserver,youhavetocreateaclassthatextends DefaultAGIServer.Furthermore, theinstanceofthatservermusthaveitsmappingstrategyset.amappingstrategydetermineswhich instanceof AGIScripthastobecalledtoserviceagiven AGIRequest. Wesetthemappingstrategybycalling setmappingstrategy(...)onthatinstanceofagiserver15.in ourcase,weassignaninstanceof ConfMonitorMappingStrategytoourserver,thatreturnsan instanceof ConferenceMonitorScriptfortherequestsmadetoconferenceMonitor. 15 ThemappingforstandaloneAGIserverisspecifiedinapropertiesfilenamedagiserver.conf.

41 Page41of56 Fig.44.SourcecodeofConfMonitorAgiServer Ourserverislaunchedduringtheinitializationofourprogram.Wedothatbystartinganewthread fromtherun()methodinourmainclass thatinstantiatesandruntheserver(seefig.45). Fig.45.StartingembededAGIserver AnAGIscript,inourjavaprogram,isaninstanceofaclassthatextends BaseAGIScript.Theclass hastoimplementstheservice(...)method.thefollowingfigureshowstheimplementationofthe service(...)methodinconferencemonitorscript.

42 Page42of56 Fig.46.Theservice(...)methodofConferenceMonitorScript Ourscriptsimplydelegatesthecalltoaninstanceof ConferenceMonitor,askingittomonitora conferencewiththegivenroomid. Whyalltheseintricacies(withthescript,conferencemonitoring,andall)? Well,withthescript,basicallywewanttointerceptcallstoaconferenceroom,suchthatwecansneak inadummy(silent)participanttotheroom(ifwehaven'talreadydoneso).sneakinginthatdummy participantisthetaskthatweassigntoconferencemonitor.howdoesitaccomplishthetask?it'sthe topicforthenextsection...

43 Page43of56 ASipofSIP Firstofall...,whatisSIP?It'sanend to end,client serversignallingprotocol.signallingintelephone systemisthekeymechanismbywhichtelephonecallsaresetupandterminated.manyvalueadded servicesinatelephonesystemaremadepossiblebyhavingprogramsthatminglewiththesignalling process.examplesofvalueaddedservicesare:pbxfeatures,groupcalling,clicktoconnect,andmany kindsofintelligentnetwork(in)16services. SignallingonSIPiscarriedthroughIPnetwork(thereforeit'saVoIPprotocol).Itisspecifiedinan RFCnumbered3261.Thekindsofentityinthenetworkthatcandealwithsignallingmessagesare17: UserAgent(userapplication),thatcanbefurtherclassifiedinto3types: UAClient(originatescalls) UAServer(listenforincomingcalls) B2B(back to back)ua SIPProxyServer:relayscallsignalling,i.e.actsasbothclientandserver. SIPRedirectServer:redirectscallerstootherservers. SIPRegistrar:acceptsregistrationrequestsfromusers. OnethingfromSIPthatattractsmemostisthefactthatitusesplaintextforthemessagesusedinthe signalling.theformatisalsosimple,attribute value pair(that'slooksverymuchlikehttp messages).so,aslongasyouunderstandtheprotocolspecification,andknowhowtoparseand constructthosemessagesinyourprogram,you'regoodtogo18.thesipentitiesmentionedaboveare basically(sip)messageprocessors,thatbehaveinsuchwaythattheyconformtoaspecification.the followingfigureshowsanexampleofsipmessage. Fig.47.AnexampleofSIPmessage 16 Intelligentnetworkisacollecionofserversandotherresourcesusedtocontrolcallsetupandtoprovidemediaservices suchasannouncements,voic ,etc. 17 Here dealwith meanssending,accepting,modifying,orpassing/redirecting. 18 Well,maybeintheharshrealityit'snotthatsimple.

44 Page44of56 Inourprogram,weimplementaverysimpleUAclient.Tohelpuswiththeconstructionandparsingof SIPmessages(amongotherthings19)weuseNIST SIPthatisanopensourceimplementationofa specificationnamedjainsipissuedbyjavacommunityprocess. ThisUAclientrepresentsadummyparticipantthatweputinaconferenceroom.Foreachactive conferencewehaveadistinctinstanceofuaclient.asaclient,theonlythingsitdoesare:(1)making acalltotheconferenceroom,and(2)disconnectingitselffromtheconferenceroomwhenthe conferenceends.thedetailsofthoseoperationsareencapsulatedinaclassnamed NoteTaker,that hasthefollowingmethods: joinconference(stringroomid) leaveconference() InstantiationofNoteTakerandinvocationofitsjoinConference(...)methodtakeplaceinsidethe executionofthe monitorconference(...)methodofconferencemonitor(seefig.47). Fig.48.ImplementationofmonitorConference(...)inConferenceMonitor YoucansaythatConferenceMonitorisallears,becauseitimplementssomanylistenerinterfaces: SipListener20,ProviderListener,andCallListener. AsaSIPlistener,itprocessesresponseeventsitreceivesfromtheSIPpeer21,insidethe processresponse(...)method(whereithasthechancetosendthesipackmessage,thatmarks thecompletionofacallsetup,backtothepeer). Asaproviderlistener,itregistersitselfaslistenertoaconferencecallwheneveritreceivesa notificationthata(conference)callhasbeenattachedtotheprovider. Asacalllistener,itlistenstothedynamicofaconferencecall.Insidethe channelremoved(...)method,ithasthechancetocheckthenumberofremainingparticipantsin theroom,andaskthenotetakertodisconnectitselffromtheroomifthenumberis1(seefig. 49). 19 Ifyou'rearegexpguru,forexample,youmightthinkyoudon'tneedlibraryjustfortextprocessing.However,thereare somemorehighlevelconceptsabovesipmessages,suchasdialogandtransaction.ifyou'dliketoworkwiththem, easily,you'dwanttousespecializedlibrarylikejain SIP. 20 AninterfacedefinedinJAIN SIP. 21 TheotherSIPentitythatitcommunicateswith,whichinourcaseistheAsteriskbox.

45 Page45of56 Fig.48.ImplementationofmonitorConference(...)inConferenceMonitor Wegettotheimportantquestionsnow:(1)whatmessagesareexchangedduringcallsetupandtear down,(2)howdoweconstruct/parsethem,and(3)howdowesendthem.let'sbeginwiththe messages.thefollowingfigureshowsthesignallingofanormalcaseofsessionsetupandteardown. Fig.49.Setupandteardownofacallsession InSIPparlance,makingacallis sendinganinvitation (tothecallee).thecallerdoesthatbysending asiprequestwhosemethodnameissettoinvite(pointbinfig.50).theanswererwillsendthe responsetothelocationdestinationspecifiedinthefirstviafieldintherequest,whichinourexample itisport5062onmachinewithip (pointc). ThelocationspecifiedintheViafieldisnotnecesarillythesameasthelocationofthecaller.It's possiblethattherequesthastravelledthroughproxy(s)beforeitreachedthedestination(whereeach proxyinthesignallingpathinsertedaviafieldbeforethefirstviafieldfoundintherequest).however, wecanalwaystelltheultimatedestinationfortheresponsefromthevaluespecifiedinthecontactfield intherequest(pointd).

46 Page46of56 TheINVITErequestcontainsasessiondescriptionthatindicatesthedesiredcommunicationmeans (audio,video,etc),parametersofthosemeans(suchascodectypes),andaddressaddressesfor receivingmediamediafromthepartywhowillanswerthecall.inourexample,thesenderspecifies thatitsupportscodecspcma,ilbc,gsm,andpcmu.italsospecifiesthatit'swaitingforthemedia onport1032(pointe). TheOKresponsefromtheanswereralsocontainsasessiondescription.inourexampleitsaysthatit supportsgsm,pcmu,andpcma,andisreceivingmediaonport16454(pointf). Fig.50.ExampleSIPmessages What'stheroleofAsteriskinaSIPcall?Theansweris:itcanbeeitheraback to backuseragent(b2b UA)oraSIPproxy.AsaB2BUAitstaysinthemediapathofthecall(whichmeans,therewillbe2 mediaconnectionsinthecall:(1)betweencallerandasterisk,and(2)betweenasteriskandthe answerer).asasipproxy,therewillbedirectmediaconnectionsbetweenthecallerandtheanswerer. (seefig.51).

47 Page47of56 Asteriskasproxy Asteriskasback to backagent Fig.51.AsteriskinaaSIPcall AsteriskwillactasaproxyifboththecallerandtheanswerersupportsRe INVITE,whichisa mechanismofmodifyingthesessiondescriptionduringthecall.foruathatweregisterinsip.conf,we cansetitsre invitabilitybysettingthecanreinvitepropertytono.inourprogramwehavethemallset tono.thereasonisbecauseweuseasterisk'sbuilt inmonitorapplicationforrecordingthecall.that applicationrequiresthatasteriskbeinthemediapath. AnothervalidreasonforoperatingAsteriskasB2BUAistofreeusfromworryingtoomuchabout compatibilityissues(esp.regardingcodecsupports)betweentheuasinvolvedinthecall,because Asteriskwillironouttheincompatibility(ifany)byperformingtranscoding. I'mnotgoingtoexplainhowtouseJAIN SIPAPIindetail.Isuggestthatyoutakealookatthe implementationofjoinconference()andleaveconference()methodinnotetakeranddecipherthecode byyourself.hints: FrominsidethejoinConference()wesendtheINVITE FrominsidetheprocessResponse()wesendtheACK(whenappropriate). FrominsidetheleaveConference()wesendtheBYE. Abitmoreconfigurationsfortheconference... First,weneedtoregisteraUAtotheAsterisk,thatcanonlymakescallstoit.Thisisforthenotetaker. So,first,copyandpastethefollowinglinestotheendofyoursip.conf. [notetaker] type=friend host= port=7000 canreinvite=no context=notetaker WesetthehosttoaspecificIPaddressinsteadofdynamic.Theport,too,issettoaspecificnumber. ThereasonisbecausewewanttokeeptheimplementationofNoteTakerverysimple(wedon'twantto implementregistrationstepinourcode).therefore,it'simportantthatwerunourprogramona

48 Page48of56 machinewhoseipaddressmatchesthehostwespecifyhere,andwemustalsotellourprogram throughexecutionparameters tobindthenotetakertotheportwespecifyhere(7000). Wealsospecifythatcallsfromnotetakerbeputinaseparatecontextnamednotetaker.Thisistomake surethatcallsfromnotetaker thatshouldbedirectedtowardaconferenceroom willnotbeconfused withcallsfromotheruas(thatmightgotosomewhereelse).i'llexplain,butfirstcopyandpastethe followinglinestotheendofextensions.conf. [notetaker] exten=>_xxx,1,meetme(${exten},i) exten=>_xxx,n,hangup Rememberthatintheextensions.conf,forcallsthatentertheextension5XXX,wedropthefirstnumber fromtheextension(5)andpasstherestit(xxx)totheconferencemonitorscriptasaparameternamed roomid?...right,youdorememberit:).well,thenotetakerwillsendaninviterequestto Now,let'ssupposewedidn'tputthetwolinesabove anythingexcept[notetaker] inaseparate contextthatisexclusiveforcallsfromuanotetaker.andalso,supposethatwehadaconferenceroom withnumber666(registerdinmeetme.conf).then(bummer!)thecallfromnotetakerwoulddirectedto goldenboy(assumingthatwealsohavedefinedextension666forgoldenboyinthesamecontext). That'sallfortheSIP. Let'smoveontothelastsection(yay!)...,stresstestingwithSIPp.

49 Page49of56 StressTestingwithSIPp SIPpisan(opensource)performancetestingtoolforSIPprotocol.WeuseittosimulatemultipleUAs makingacallatthesametime.youmusthaverealizedthatacallsession(1)startswiththesendingof aninvitation(oracceptinginvitation),(2)isterminatedwithteardown(sending/recevingabye),and (3)anythingthathappeninbetween.Together,theymakeacallscenario. WithSIPp,wespecifythescenarioinanXMLfilethatcontainstheSIPrequeststobesent,andthe expectedresponses.they'reprocessedindocumentorder fromtoptothebottomofthedocument whenthescenarioisbeingplayed.inthefile,asiprequestisenclosedwithina<recv>tag,whilea <resp>tagcontainsinformationaboutanexpectedresponse.formoreinformationaboutthecontent ofascenariofile,pleaseconsultsippdocumentation[ref.4]. Inourexperimentwehavetwoscenariofiles.Oneofthemrepresentsthescenariofromthestandpoint ofthecaller22,andtheotheronerepresentsthescenarioofthesamecallfromthestandpointofthe answerer23. Sidenote.HowdoIknowwhattowriteinthescenariofiles?Theanswer:copy and paste(andabitof editing)fromsiptrafficofarealcall,madefromsipphonethatiknowworks(e.g.:kphoneand Xlite),capturedusingEthereal. Forexample:IknowthatAsteriskSIPservicewasboundtoport5060,andKPhonewasboundto anotherport(let'ssay5062).whatididwasacopy and pasteofsipmessagesoriginatingfromport 5062andgoingport5060intocaller.xml,andviceversafortheanswerer.xml. Easy,eh?Believeme,Etherealisa(network)programmerbestfriend:).Here'sanicescreenshotofit: 22 Thefilenamedcaller.xmlunderconf/intheprojectdirectory. 23 Thefilenamedanswerer.xml.

50 Page50of56 Inordertomakethingssimplerforthetesting,weneedtolifttherequirementforthecallerto authenticate.wedothatbydeleting/commentingoutthesecretlineintheuseragentconfiguration parametersinsip.conf(seefig.52). Fig.52.Commentoutthesecretline Theotherthingweneedtodoisdroppingtherequirementfortheuseragentswhichareassignedto receivecallstoregister24.thisisdonebychangingthehostpropertyoftheuseragentfromdynamicto anipnumber,andbyspecifyingaportnumberinthesip.conf.and,justlikethecaller,wealsodrop therequirementfortheanswerertoauthenticate.seefig.53. Fig.53.Changetostaticregistration Nowyou'reset!Ihavepreparedtwoscriptfiles:caller.shandanswerer.sh.Thefollowingfigureshows thecontentofcaller.sh. Fig.54.Thecontentofcaller.sh Accordingtothescript:theinstanceofSIPpwillplaythescenariospecifiedincaller.xml(B).The maximumnumberofcallsthatthesippinstancewillgenerateis5(c),andeachuseragentassociated withacallwillbeboundtoarandomlyselecteddistinctport(d).thesiprequestwillbesenttosip servicerunningonport5060inmachine ,whichinourcaseistheasterisk'ssipservice(e). Finally,thevaluestoreplacethe fields inthescenariofilearereadfromafilenamedcaller.csv(f), seefig ThisisduetocurrentlimitationinSIPp,whichI'llexplainattheendofthissection.

51 Page51of56 Fig.55.Valuesforfieldsincaller.xmlarereadfromcaller.csv Theotherside answerer.sh isconfiguredtoruninudpmonosocketmode( tu1commandline parameter)thatmeansalltheuseragentsitstartswillbeboundtothesameportnumber(specified through pcommandlineparameter),whichinourcaseis Nowwe'rereadyto(stress)testtheapplication.Followthesesteps: 1. RunourapplicationfromEclipse(orfromthecommandlinebyexecutiontherunapp.shscript) 2. Runtheanswerer.sh 3. Runthecaller.sh Goodluck,andenjoy.Foryourreference,here'sascreenshotofexecutionofanswerer.sh&caller.sh. answerer caller 25 Itmustmatchtheportnumberwespecifyinsip.confforuseragentsthatweassigntoanswerthecalls(e.g.:goldenboy).

Allow Auto Answer by Call-Info: No Yes. Turn off speaker on remote disconnect: No Yes

Allow Auto Answer by Call-Info: No Yes. Turn off speaker on remote disconnect: No Yes Disclaimer: This document is just a mere reference document intended to guide qualified Network Engineers to setup these features on their Grandstream phones and Asterisk PBX system. Grandstream is not

More information

Grandstream Networks, Inc. Asterisk PBX Configuration Guide GXP21xx IP Phone/GXP1450 IP Phone

Grandstream Networks, Inc. Asterisk PBX Configuration Guide GXP21xx IP Phone/GXP1450 IP Phone Grandstream Networks, Inc. Asterisk PBX Configuration Guide GXP21xx IP Phone/GXP1450 IP Phone TABLE OF CONTENTS ASTERISK PBX CONFIGURATION GUIDE FOR GXP21XX/GXP1450 DISCLAIMER... 3 PAGING AND INTERCOM...

More information

Basic configuration of the GXW410x with Asterisk

Basic configuration of the GXW410x with Asterisk Basic configuration of the GXW410x with Asterisk Please note that due to the customizable nature of both the GXW410x and Asterisk and the vast deployment possibilities, these instructions should be taken

More information

Software Based VoIP Lab A step by step guide to setting up and configuring an IP-PBX. Donal O Connor DNET 4 donaloconnor@gmail.com

Software Based VoIP Lab A step by step guide to setting up and configuring an IP-PBX. Donal O Connor DNET 4 donaloconnor@gmail.com Software Based VoIP Lab A step by step guide to setting up and configuring an IP-PBX Donal O Connor DNET 4 donaloconnor@gmail.com Introduction Traditionally, a company or individual would have to buy really

More information

Setup the Asterisk server with the Internet Gate

Setup the Asterisk server with the Internet Gate 1 (9) Setup the Asterisk server with the Internet Gate This guide presents ways to setup the Asterisk server together with the Intertex Internet Gate. Below two different setups are described. Also, please

More information

Unicorn60x0 IP ANALOG GATEWAY ASTERISK CONFIGURATION

Unicorn60x0 IP ANALOG GATEWAY ASTERISK CONFIGURATION Unicorn60x0 IP ANALOG GATEWAY ASTERISK CONFIGURATION BASIC CONFIGURATION OF THE Unicorn60x0 WITH ASTERISK Due to the various deployment possibilities of the Unicorn60x0 and Asterisk, this configuration

More information

Telephony with an Asterisk phone system

Telephony with an Asterisk phone system Telephony with an phone system TALKATIVE An old computer is all you need to build your own do-it-yourself personal phone server. BY MARTIN LOSCHWITZ Technology that supports the easy exchange of audio

More information

Micronet VoIP Solution with Asterisk

Micronet VoIP Solution with Asterisk Application Note Micronet VoIP Solution with Asterisk 1. Introduction This is the document for the applications between Micronet units and Asterisk IP PBX. It will show you some basic configurations in

More information

TEL 500. Voice Communications. Week 1 Write Up. Session Initiation Protocol Lab. Submitted To: Prof Ronny Bull. By: Sai Sharan Korvi

TEL 500. Voice Communications. Week 1 Write Up. Session Initiation Protocol Lab. Submitted To: Prof Ronny Bull. By: Sai Sharan Korvi TEL 500 Voice Communications Week 1 Write Up Session Initiation Protocol Lab Submitted To: Prof Ronny Bull By: Sai Sharan Korvi Date: 09/10/2014 ABSTRACT: Softphone is usually a software which can be used

More information

AGILE SIP TRUNK IP- PBX Connection Manual (Asterisk, Trixbox)

AGILE SIP TRUNK IP- PBX Connection Manual (Asterisk, Trixbox) AGILE SIP TRUNK IP- PBX Connection Manual (Asterisk, Trixbox) 1. SIP TRUNK SETTINGS 1.1. Login to CID (Customer ID): https://manager.agile.ne.jp/login.php USERNAME Password 1.2. On the left most column

More information

Mediatrix 3000 with Asterisk June 22, 2011

Mediatrix 3000 with Asterisk June 22, 2011 Mediatrix 3000 with Asterisk June 22, 2011 Proprietary 2011 Media5 Corporation Table of Contents Introduction... 3 Network Topology... 3 Equipment Detail... 3 Configuration of the Fax Extension... 4 Configuration

More information

AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk)

AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk) AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk) 1. Login to CID (Customer ID) Login https://manager.agile.ne.jp/login.php USERNAME Password 2. Go to SIP List of SIP TRUNK SIP SIP List Buy SIP Trunk

More information

SIP Trunk 2 IP-PBX User Guide Asterisk. Ver1.0.0 2015/08/01 Ver1.0.3 2015/09/17 Ver1.0.4 2015/10/07 Ver1.0.5 2015/10/15 Ver1.0.

SIP Trunk 2 IP-PBX User Guide Asterisk. Ver1.0.0 2015/08/01 Ver1.0.3 2015/09/17 Ver1.0.4 2015/10/07 Ver1.0.5 2015/10/15 Ver1.0. SIP Trunk 2 IP-PBX User Guide Asterisk Ver1.0.0 2015/08/01 Ver1.0.3 2015/09/17 Ver1.0.4 2015/10/07 Ver1.0.5 2015/10/15 Ver1.0.6 2015/10/23 Index 1. SIP Trunk 2 Overview 3 2. Purchase/Settings in Web Portal

More information

Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment

Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Application Note May 2009 Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment 2009 Cisco Systems, Inc. All rights reserved. Page 1 of 20 Contents Introduction 3 Audience 3 Scope

More information

F REQUENTLY A SKED Q UESTION

F REQUENTLY A SKED Q UESTION F REQUENTLY A SKED Q UESTION snom phones used together with Asterisk PBX software Date: Aug-03-2003 Author: Pertti Pikkarainen Document: faq-03-08-03-pp 1.0 Asterisk in general Asterisk is a complete PBX

More information

VoIP System for Enterprise Network

VoIP System for Enterprise Network VoIP System for Enterprise Network 6 Moo Wan Kim and Fumikazu Iseki Tokyo University of Information Sciences Japan 1. Introduction This chapter describe VoIP system for the enterprise network (e.g. company,

More information

NOC Workshop VoIP in the NOC labs SANOG10

NOC Workshop VoIP in the NOC labs SANOG10 NOC Workshop VoIP in the NOC labs SANOG10 New Delhi, India August 29 - September 2, 2007 Page 1 of 10 Lab Summary NOC Workshop, SANOG10 - VoIP in the NOC We only have limited time for this portion of the

More information

NodePhone Business Trunks User Manual

NodePhone Business Trunks User Manual NodePhone Business Trunks User Manual Contents NodePhone Business Trunks 2 Features 2 Sip Trunking Explained 3 What do I need 3 Costs 3 Additional costs 4 How much bandwidth do I need? 5 Technical information

More information

WINTER WEIGHT TRAINING PROGRAM FOR CYCLING

WINTER WEIGHT TRAINING PROGRAM FOR CYCLING Body2Bike WinterWeightTrainingProgramforCycling WINTERWEIGHTTRAININGPROGRAMFORCYCLING BASICPRINCIPLES First4 6weeks: Technique: Thisisyourhighestpriority,neversacrificetechniqueforweight.Beginwithlongerrepsofbetween12and16

More information

TEL 500 VOICE COMMUNICATIONS PROJECT REPORT IMPLEMENTATION OF SMALL CALL CENTER WITH AUTO ATTENDENT AND QUEUES SUBMITTED TO: RONNY L.

TEL 500 VOICE COMMUNICATIONS PROJECT REPORT IMPLEMENTATION OF SMALL CALL CENTER WITH AUTO ATTENDENT AND QUEUES SUBMITTED TO: RONNY L. TEL 500 VOICE COMMUNICATIONS PROJECT REPORT IMPLEMENTATION OF SMALL CALL CENTER WITH AUTO ATTENDENT AND QUEUES SUBMITTED TO: RONNY L.BULL SUBMITTED BY: ARUNKUMAR ELIGETI HARISH KUMAR RAPARTHI 11/20/13

More information

VOIP, Linux, and Asterisk Making Beautiful Voice Together

VOIP, Linux, and Asterisk Making Beautiful Voice Together VOIP, Linux, and Asterisk Making Beautiful Voice Together Daryll Strauss President Digital Ordnance SCALE 3x Feb 13th, 2005 POTS World Ma Bell Telephone Company Wire Central Office Public Switched Telephone

More information

Trunks User Guide. Schmooze Com Inc.

Trunks User Guide. Schmooze Com Inc. Schmooze Com Inc. Chapters Overview Logging In Adding a SIP Trunk Adding a DAHDi Trunk Adding an IAX2 Trunk Adding an ENUM Trunk Adding a DUNDi Trunk Adding a Custom Trunk Recap Examples Overview The Trunks

More information

TEL-500 Project Report. Auto-Dialler System. Voice Communications. Done By: - AKASH ANANTHANARAYANAN SANJEEVAKUMAR DEVARAJA

TEL-500 Project Report. Auto-Dialler System. Voice Communications. Done By: - AKASH ANANTHANARAYANAN SANJEEVAKUMAR DEVARAJA TEL-500 Project Report Auto-Dialler System Voice Communications Done By: - AKASH ANANTHANARAYANAN SANJEEVAKUMAR DEVARAJA 1 Index Page Contents Page Number Abstract 3 Introduction 4 Flow Chart 5 Resources

More information

QueueMetrics Icon WebRTC Agent Page Integration with Elastix guide

QueueMetrics Icon WebRTC Agent Page Integration with Elastix guide QueueMetrics Icon WebRTC Agent Page Integration with Elastix guide Discover with this step-by-step guide how to integrate Icon, the brand new QueueMetrics agent page with Elastix, the open source communications

More information

A System for Auto-Provisioning VOIP Telephones for Asterisk

A System for Auto-Provisioning VOIP Telephones for Asterisk A System for Auto-Provisioning VOIP Telephones for Stephen Uhler Sun Microsystems Laboratories Stephen Uhler 2005, Sun Microsystems Sun Labs (1/20) Outline What is auto-provisioning? Why do I need it?

More information

Trixbox. by MATT FLORELL and JAMES PEARSON

Trixbox. by MATT FLORELL and JAMES PEARSON AsteriskNOW and Trixbox by MATT FLORELL and JAMES PEARSON AsteriskNOW Officially released by Digium in 2007 Formerly called PoundKey Based on Asterisk 1.4 Web-based admin using new http manager interface

More information

Ryan Brown October 9, 2004 The Burgh Live, LLC. Voice over IP using Asterisk (*)

Ryan Brown October 9, 2004 The Burgh Live, LLC. Voice over IP using Asterisk (*) Ryan Brown October 9, 2004 The Burgh Live, LLC Voice over IP using Asterisk (*) What is Asterisk? * (http://www.asterisk.org www.asterisk.org) ) is an Open Source Private Branch Exchange (PBX) and Interactive

More information

Asterisk Primer. Presented at Apricot, Bali, Feb 26 th 2007. Marc Blanchet Viagénie. Marc.Blanchet@viagenie.ca http://www.viagenie.

Asterisk Primer. Presented at Apricot, Bali, Feb 26 th 2007. Marc Blanchet Viagénie. Marc.Blanchet@viagenie.ca http://www.viagenie. Asterisk Primer Presented at Apricot, Bali, Feb 26 th 2007 Marc Blanchet Viagénie Marc.Blanchet@viagenie.ca http://www.viagenie.ca Credentials 20+ years in IP networking and Unix, with 10 years on IPv6...

More information

Asterisk: The Open Source PBX Solution Adam Olson Systems and network administrators typically deal with

Asterisk: The Open Source PBX Solution Adam Olson Systems and network administrators typically deal with 1 1 1 0 1 0 1 0 1 Asterisk: The Open Source PBX Solution Adam Olson Systems and network administrators typically deal with data and functionality such as email communications, Web and database applications,

More information

Test on IX130 Performance

Test on IX130 Performance Test on IX130 Performance This document aims to report the performance of IX130. We design a few scenarios where uses IX130, including gateway and PBX and how well the performance of handling transcoding.

More information

Asterisk By Example...doing useful VoIP things. Jonny Martin jonny@jonnynet.net

Asterisk By Example...doing useful VoIP things. Jonny Martin jonny@jonnynet.net Asterisk By Example...doing useful VoIP things Jonny Martin jonny@jonnynet.net Introduction Quick Overview of Asterisk A look at TrixBox, an Asterisk based pretty PABX Basic configuration Advanced Configuration

More information

How To Connect A Gsm To An Ip Phone With A Pbx On A 2N 2N Phone On A Ppl (For A Pbo) On A Gm (For An Ip) On An Ip (For Pbq

How To Connect A Gsm To An Ip Phone With A Pbx On A 2N 2N Phone On A Ppl (For A Pbo) On A Gm (For An Ip) On An Ip (For Pbq 2N VoiceBlue Next 2N VoiceBlue Next & Asterisk connected via SIP trunk Quick guide Version 3.00 www.2n.cz 1 2N VoiceBlue Next has these parameters: IP address 10.0.0.20 Incoming port: 5060 Asterisk parameters:

More information

Applications between Asotel VoIP and Asterisk

Applications between Asotel VoIP and Asterisk Applications between Asotel VoIP and Asterisk This document is describing the configuring manner of registering and communicating with Asterisk only. Please visit the official WEB of Asterisk http://www.asterisk,

More information

TEL 500 WRITE UP WEEK 8 FREE PBX SIP LAB SUBMITTED TO: PROF. RONNY BULL BY: ANUSHA ALIGAPALLY

TEL 500 WRITE UP WEEK 8 FREE PBX SIP LAB SUBMITTED TO: PROF. RONNY BULL BY: ANUSHA ALIGAPALLY TEL 500 WRITE UP WEEK 8 FREE PBX SIP LAB SUBMITTED TO: PROF. RONNY BULL BY: ANUSHA ALIGAPALLY DATE: 11/05/2014 ABSTRACT: Private Branch Exchange has multiple phones connected to it which are in the same

More information

Using Polycom KIRK Wireless Server 300 or 6000 with Asterisk

Using Polycom KIRK Wireless Server 300 or 6000 with Asterisk Using Polycom KIRK Wireless Server 300 or 6000 with Asterisk Technical Bulletin Version 10 l August 2010 l 14205500 Introduction This document provides introductory information on how to use a Polycom

More information

Asterisk & ENUM. Extending the Open Source PBX. Michael Haberler, IPA Otmar Lendl, nic.at

Asterisk & ENUM. Extending the Open Source PBX. Michael Haberler, IPA Otmar Lendl, nic.at Asterisk & ENUM Extending the Open Source PBX Michael Haberler, IPA Otmar Lendl, nic.at Why a ENUM-enable a PBX? your PBX doubles as an IP/PSTN gateway for your existing numbers becomes a dual contact

More information

Setup Guide: on the MyNetFone Service. Revision History

Setup Guide: on the MyNetFone Service. Revision History Setup Guide: on the MyNetFone Service Revision History Version Author Revision Description Release Date 1.0 Sampson So Initial Draft 02/01/2008 2.0 Sampson So Update 27/09/2011 1 Table of Contents Introduction...

More information

Technical Bulletin 43565 Using Polycom SoundPoint IP and Polycom SoundStation IP Phones with Asterisk

Technical Bulletin 43565 Using Polycom SoundPoint IP and Polycom SoundStation IP Phones with Asterisk Technical Bulletin 43565 Using Polycom SoundPoint IP and Polycom SoundStation IP Phones with Asterisk Introduction This document provides introductory information on how to use Polycom SoundPoint IP phones

More information

Overview of Asterisk (*) Jeff Gunther

Overview of Asterisk (*) Jeff Gunther Overview of Asterisk (*) Jeff Gunther Agenda Background Introduction to Asterisk and review the core components of it s architecture. Exploration of Asterisk s telephony and call features. Review some

More information

ASTERISK. Goal. Prerequisites. Asterisk IP PBX Configuration

ASTERISK. Goal. Prerequisites. Asterisk IP PBX Configuration ASTERISK SIP Trunking using Optimum Business SIP Trunk Adaptor and the Asterisk IP PBX Version 1.2.10 Goal The purpose of this configuration guide is to describe the steps needed to configure the Asterisk

More information

Abstract. Avaya Solution & Interoperability Test Lab

Abstract. Avaya Solution & Interoperability Test Lab Avaya Solution & Interoperability Test Lab Application Notes for Configuring SIP IP Telephony Using Avaya 4600 Series IP Telephones, Avaya one-x Desktop Edition, and Asterisk Business Edition PBX Issue

More information

Guideline for SIP Trunk Setup

Guideline for SIP Trunk Setup Guideline for SIP Trunk Setup with ZONETEL Table of contents Sample sip.conf (it applies to asterisk 1.4.x)...3 Sample elastix setup... 3 Ports required... 4 Caller ID...4 FAQ... 5 After i dial out, the

More information

Asterisk. Technical Application Notes

Asterisk. Technical Application Notes Asterisk Technical Application Notes Table of Contents About Asterisk... 1 Purpose, Scope and Audience... 3 Asterisk Deployment Information... 4 Asterisk External IP Address... 4 Sending Calls to Broadvox...

More information

SIP Configuration Guide

SIP Configuration Guide SIP Configuration Guide for using Asterisk@Home with Mediant 1000, 2000 and MP-11x Published by AudioCodes Interoperability Laboratory July 2007 Document #: LTRT-82405 SIP Configuration Guide Contents

More information

Internet telephony Asterisk system.

Internet telephony Asterisk system. Internet telephony Asterisk system. Until recently, only large institutions were able to afford their own telephone exchange. The commercial solutions that were available were based on closed proprietary

More information

Foster Care/Texas State Adoption Frequently Asked Questions

Foster Care/Texas State Adoption Frequently Asked Questions FosterCare/TexasStateAdoption FrequentlyAskedQuestions Q:WhyshouldIbecomepartoftheInternationalFamilyServicesfamily? A:Therearealotofreallygreatagenciesthatyoucanworkwith.Wefeelthatourbestassetisthat whenyouworkwithus,wetreatyoulikefamily.weknowthatwhenyoubringachildintoyourhome

More information

Running Asterisk in a Corporate Environment: a Beginner s Tale

Running Asterisk in a Corporate Environment: a Beginner s Tale Running Asterisk in a Corporate Environment: a Beginner s Tale Stephen Uhler Sun Microsystems Laboratories 2005, Sun Microsystems Stephen Uhler Astricon 2005 Sun Labs (1/19) How I Got into the Phone Business

More information

Without Tears http://creativecommons.org/licenses/by-nc-sa/2.1/au/ The Dumb-Me Guide (Australianised for AU&NZ brethren)

Without Tears http://creativecommons.org/licenses/by-nc-sa/2.1/au/ The Dumb-Me Guide (Australianised for AU&NZ brethren) Without Tears http://creativecommons.org/licenses/by-nc-sa/2.1/au/ The Dumb-Me Guide (Australianised for AU&NZ brethren) Incorporating elements of versions 1.x and 2.x up to v2.7 using AMP (From version

More information

VOIP with Asterisk & Perl

VOIP with Asterisk & Perl VOIP with Asterisk & Perl By: Mike Frager 11/2011 The Elements of PSTN - Public Switched Telephone Network, the pre-internet phone system: land-lines & cell-phones. DID - Direct

More information

Voice over Wired and Wireless Communication for Academic Institutions

Voice over Wired and Wireless Communication for Academic Institutions Voice over Wired and Wireless Communication for Academic Institutions John Benedict L. Bernardo, MIT and Consorcio S. Namoco, Jr., D.Eng. Abstract An effective communication system is very important requirement

More information

SIP Trunk Configuration for nexvortex

SIP Trunk Configuration for nexvortex SIP Trunk Configuration for nexvortex Document version: 1.0 Modification date: June 25, 2013 Prerequisites The nexvortex customer service provides the following communication parameters: Parameter Example

More information

Configuring Elastix 2.0.0 57 for Spitfire SIP Trunks

Configuring Elastix 2.0.0 57 for Spitfire SIP Trunks Configuring Elastix 2.0.0 57 for Spitfire SIP Trunks This document is a guideline for configuring Spitfire SIP trunks onto Elastix 2.0.0 and includes the settings required for Inbound DDI routing and Outbound

More information

Asterisk Module Documentation for the yencap Agent Release: ASTERISK-yencap-1.0.0

Asterisk Module Documentation for the yencap Agent Release: ASTERISK-yencap-1.0.0 Asterisk Module Documentation for the yencap Agent Release: ASTERISK-yencap-1.0.0 Bourdellon Jerome, Bourdellon.Jerome@loria.fr Radu STATE, state@loria.fr Madynes Research team LORIA-INRIA Lorraine rue

More information

SFLphone Documentation

SFLphone Documentation SFLphone Documentation Release 1.0 SFLphone Team August 18, 2014 Contents 1 Contents 3 1.1 Getting started.............................................. 4 1.2 Setup a secure environment with Asterisk................................

More information

Using the GS8 Modular Gateway with Asterisk

Using the GS8 Modular Gateway with Asterisk Zed-3 501 Valley Way Milpitas CA 95035 Using the GS8 Modular Gateway with Asterisk Application note, 96-90002-02, May 2008 USA Voice: +1-408-587-9333 Fax: +1-408-586-9038 www.zed-3.com This document is

More information

DRAFT. A conceptual introduction. Ben Fuhrmannek <bef@eventphone.de> May, 2007 Draft 1. Asterisk - A conceptual introduction

DRAFT. A conceptual introduction. Ben Fuhrmannek <bef@eventphone.de> May, 2007 Draft 1. Asterisk - A conceptual introduction DRAFT AS TE RI S K A conceptual introduction Ben Fuhrmannek May, 2007 Draft 1 Asterisk - A conceptual introduction 1 TABLE OF CONTENTS Introduction 3 Understanding the PBX 4 About Files

More information

Skype connect and Asterisk

Skype connect and Asterisk Skype connect and Asterisk General Configuration Guide Skype for SIP and Asterisk you are new to SIP, Asterisk is a useful, open-source (GPL) platform with which to test and experiment with the Skype for

More information

Figure 38-1. The scenario

Figure 38-1. The scenario 38. Asterisk Application We offer the application shows that it is convenient and cost saving to implement the free IP-PBX using Asterisk and Vigor 3300V when users want to use the Soft Phone or IP Phone

More information

VoIP Channels IAX APPENDIX A. General IAX Settings. Appendix A

VoIP Channels IAX APPENDIX A. General IAX Settings. Appendix A ,appa.22741 Page 209 Wednesday, August 31, 2005 5:00 PM Appendix A APPENDIX A VoIP Channels VoIP channels in Asterisk represent connections to the protocols they support. Each protocol you wish to use

More information

A guide to VoIP and Asterisk

A guide to VoIP and Asterisk A guide to VoIP and Asterisk By Kurt Hutchinson, Tuesday, May 31, 2005 Introduction I've had a phone line free household since I first got a cell phone. Being free from the wires works fairly well, but

More information

LABORATORIUM 1 Setup and basic configuration of Asterisk BPX on Linux

LABORATORIUM 1 Setup and basic configuration of Asterisk BPX on Linux LABORATORIUM 1 Setup and basic configuration of Asterisk BPX on Linux 1. VM setup Please download Asterisk Virtual Machine from http://kt.agh.edu.pl/~rzym/lectures/ti- SSiZ/VMAsterisk.zip and extract archive.

More information

ASTERISK & PHP. Hans-Christian Otto International PHP Conference 2010 SE Berlin, June 1, 2010

ASTERISK & PHP. Hans-Christian Otto International PHP Conference 2010 SE Berlin, June 1, 2010 ASTERISK & PHP Hans-Christian Otto International PHP Conference 2010 SE Berlin, June 1, 2010 1 ABOUT ME PHP since 2004 Asterisk since 2007 working as a freelancer for various companys computer science

More information

Asterisk. http://www.asterisk.org. http://www.kismetwireless.net/presentations.shtml. Michael Kershaw <dragorn@kismetwireless.net>

Asterisk. http://www.asterisk.org. http://www.kismetwireless.net/presentations.shtml. Michael Kershaw <dragorn@kismetwireless.net> Asterisk * http://www.asterisk.org What Asterisk Can Do Voice Over IP (VOIP) Physical phone switch (PBX) Software phone switch Answering machine Call trees (Press 1 to...) VOIP Voice Over IP: Make telephone

More information

VoIP Workshop PacNOG3

VoIP Workshop PacNOG3 VoIP Workshop PacNOG3 Rarotonga, Cook Islands June 2007 Labs 1-4, Asterisk Lab 5, INOC-DBA Lab 6-7, Cisco Voice Gateways Lab 8, CODECS Page 1 of 13 Lab Summary Server logins are as you have set up in previous

More information

and Voice Applications Eyal Wirsansky, Verso Technologies JaxJUG

and Voice Applications Eyal Wirsansky, Verso Technologies JaxJUG Voice Over IP, and Voice Applications Eyal Wirsansky, Verso Technologies JaxJUG Analog Telephony Mr. W AG Bell X What the *!@# is aa Switch?? Moving to Digital Voice (TDM) Separation of Voice and Signaling

More information

Asterisk - The Basics

Asterisk - The Basics Asterisk - The Basics PacNOG 3 VoIP Workshop June 2007, Cook Islands Jonny Martin jonny@jonnynet.net What is Asterisk Asterisk, The Open Source PBX. www.asterisk.org A complete PBX in software Runs on

More information

TekSIP Proxy frontend for Asterisk PBX

TekSIP Proxy frontend for Asterisk PBX TekSIP Proxy frontend for Asterisk PBX What you need: IP PBX--AsteriskNow 3.x Asterisk 1.8 Asterisk 10.x Asterisk 11.x and Proxy--TekSIP 3.4.7 TekSIP 3.4.8 Install Asterisk with or without SRTP support

More information

Quick Provisioning Guide for Third-Party PBX

Quick Provisioning Guide for Third-Party PBX Quick Provisioning Guide for Third-Party PBX Table of Contents Quick Provisioning Guide Table of Contents Chapter 1: Overview...1 Chapter 2: Asterisk Configuration...2 Creating a Phone Extension on Asterisk...2

More information

Asterisk Basics (SIP)

Asterisk Basics (SIP) 03/12/10 Budapest / Hungary MÉSZÁROS Mihály OpenSIPS vs Asterisk from SIP point of view Opensips Proxy, no media handling IPv6 and Ipv4 and multicast Transport protocols sctp,tcp,udp,tls RFC3263 NAPTR,

More information

Fig. Setting up of a VoIP call. Fig. Experimental setup

Fig. Setting up of a VoIP call. Fig. Experimental setup Volume 5, Issue 6, June 2015 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Asterisk VoIP Private

More information

ACD Automatic Call Distribution

ACD Automatic Call Distribution ACD Automatic Call Distribution Right after Auto Attendants and Voice Mail, this is probably the most sought after telephony application and by far the most complicated. ACD is the application you reach

More information

Asterisk with Twilio Elastic SIP Trunking Interconnection Guide using Secure Trunking (SRTP/TLS)

Asterisk with Twilio Elastic SIP Trunking Interconnection Guide using Secure Trunking (SRTP/TLS) Asterisk with Twilio Elastic SIP Trunking Interconnection Guide using Secure Trunking (SRTP/TLS) With the Introduction of Twilio Elastic SIP trunking this guide provides the configuration steps required

More information

Application Note. Using a Dialogic Media Gateway Series as a PSTN Gateway with an Asterisk IP-PBX Server

Application Note. Using a Dialogic Media Gateway Series as a PSTN Gateway with an Asterisk IP-PBX Server Using a Dialogic Media Gateway Series as a PSTN Gateway with an Asterisk IP-PBX Server Using a Dialogic Media Gateway Series as a PSTN Gateway with an Asterisk IP-PBX Server Executive Summary This application

More information

A Method for Implementing, Simulating and Analyzing a Voice over Internet Protocol Network

A Method for Implementing, Simulating and Analyzing a Voice over Internet Protocol Network A Method for Implementing, Simulating and Analyzing a Voice over Internet Protocol Network Bianca Enache Communication Department Politehnica University of Timisoara Timisoara, Romania enache.biancaemilia@gmail.com

More information

Security Art August 2011. Sounds Like Botnet. Itzik Kotler, Chief Technology Officer Iftach Ian Amit, VP Consulting. www.security-art.

Security Art August 2011. Sounds Like Botnet. Itzik Kotler, Chief Technology Officer Iftach Ian Amit, VP Consulting. www.security-art. Security Art August 2011 Sounds Like Botnet Itzik Kotler, Chief Technology Officer Iftach Ian Amit, VP Consulting www.security-art.com Intro to VoIP It s everywhere Home (Vonage, Skype, TeamSpeak, Comcast,

More information

SoliCall PBXMate. User Manual

SoliCall PBXMate. User Manual SoliCall PBXMate User Manual 1 INTRODUCTION 4 2 QUICK START 8 2.1 Unpacking & Environment Configuration 8 2.2 Graphical Interface Vs. Command Line Interface 8 2.3 PBXMate Configuration 9 2.4 PBXMate Activation

More information

Configuration Notes 290

Configuration Notes 290 Configuring Mediatrix 41xx FXS Gateway with the Asterisk IP PBX System June 22, 2011 Proprietary 2011 Media5 Corporation Table of Contents Introduction... 3 About Mediatrix 41xx Series FXS Gateways...

More information

This manual contains product information for the GSM Series cards. The manual is organized in the following manner:

This manual contains product information for the GSM Series cards. The manual is organized in the following manner: Allo.com. 2012 All rights reserved. No part of this publication may be copied, distributed, transmitted, transcribed, stored in a retrieval system, or translated into any human or computer

More information

Embedded Asterisk. A Crazy Man s Approach to VoIP. Terry Dunlap. 5/12/2007 terrydunlap.com

Embedded Asterisk. A Crazy Man s Approach to VoIP. Terry Dunlap. 5/12/2007 terrydunlap.com Embedded Asterisk A Crazy Man s Approach to VoIP Terry Dunlap 5/12/2007 terrydunlap.com 1 The Master Plan Embedded... are you insane? My kinda shopping In search of... simplicity Network administration

More information

Introduction to Asterisk

Introduction to Asterisk Introduction to Asterisk Or: How to spend 2 months on the phone John Todd (jtodd@loligo.com) CTO, VOIP Inc. http://www.voipincorporated.com/ 2004-09-22 AsterCON, Atlanta GA USA Agenda What is Asterisk?

More information

VOIP (Voice Over Internet Protocol) Hacking-Fake Calling

VOIP (Voice Over Internet Protocol) Hacking-Fake Calling VOIP (Voice Over Internet Protocol) Hacking-Fake Calling Author: Avinash Singh Co-Author: Akash Shukla Avinash Singh Corporate Trainer (Virscent Technologies Pvt. Ltd.) Appin Certified Ethical Hacker (ACEH)

More information

Asterisk Business Edition TM Digium Partner Certification

Asterisk Business Edition TM Digium Partner Certification Asterisk Business Edition TM Digium Partner Certification Cyberdata VoIPSpeaker Interoperability Report April 2007 Digium, Inc. 150 West Park Loop, Suite 100 Huntsville, AL 35806 Main Number: 256.428.6000

More information

EarthLink Business SIP Trunking. Asterisk 11.2 IP PBX Customer Configuration Guide

EarthLink Business SIP Trunking. Asterisk 11.2 IP PBX Customer Configuration Guide EarthLink Business SIP Trunking Asterisk 11.2 IP PBX Customer Configuration Guide Publication History First Release: Version 1.0 August 30, 2011 CHANGE HISTORY Version Date Change Details Changed By 1.0

More information

Exchanging Phonecalls Asterisk offers a low-budget

Exchanging Phonecalls Asterisk offers a low-budget Installing and Configuring Exchanging Phonecalls offers a low-budget approach to IP telephony, putting this technology within the price range of small to mid-sized businesses. The Open Source software

More information

Implementation of a Fully Functional VoIP Server Inside of a Campus Network

Implementation of a Fully Functional VoIP Server Inside of a Campus Network Implementation of a Fully Functional VoIP Server Inside of a Campus Network Prepared for Ronny L. Bull Lecturer, Computer Science Department SUNY Institute of Technology By Matthew Lapinski Student, NCS416

More information

ISDN FEATURE ACCESS CODES

ISDN FEATURE ACCESS CODES ISDN FEATURE ACCESS CODES INTRODUCTION These dialing instructions are a quick reference on how to use the most common ISDN voice features with atone Commander, Lucent, AT&T, or Fujitsu ISDN telephone set.

More information

Introduction to VOIP. Stephen Okay Abdus Salam Int l Center for Theoretical Physics Trieste, Italy, February 21, 2007

Introduction to VOIP. Stephen Okay Abdus Salam Int l Center for Theoretical Physics Trieste, Italy, February 21, 2007 Introduction to VOIP Stephen Okay Abdus Salam Int l Center for Theoretical Physics Trieste, Italy, February 21, 2007 Intro to VOIP Classic Telephony Data Networks(Review) VOIP What it is Protocols Hardware

More information

Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment

Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment Application Note Revised June 10 th 2009 Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment 2009 Cisco Systems, Inc. All rights reserved. Page 1 of 69 Table of Contents Introduction

More information

VoIP Security Management

VoIP Security Management VoIP Security Management Humberto Abdelnur, Vincent Cridlig, Jérome Bourdellon, Radu State, Olivier Festor LORIA-INRIA Lorraine, France {abdelnur, cridligv, bourdellon, state, festor}@loria.fr http://madynes.loria.fr

More information

IPChitChat VoIP Service User Manual

IPChitChat VoIP Service User Manual IPChitChat VoIP Service User Manual Document Owner: Netcloud Ltd Prepared By: Michael Date of Issue: 11 th June 2011 Version: V0.5 Copyright 2009 Netcloud Ltd Page 1 of 31 Netcloud are UK specialists in

More information

DUNDi, So Easy A Caveman Could Do It!

DUNDi, So Easy A Caveman Could Do It! DUNDi, So Easy A Caveman Could Do It! General Description JR Richardson Engineering for the Masses hubguru@gmail.com DUNDi is a peer-to-peer system for locating Internet gateways to telephony services.

More information

Two Standards: H.323 / SIP Bridging both worlds. João Pereira - FCCN - Portugal

Two Standards: H.323 / SIP Bridging both worlds. João Pereira - FCCN - Portugal Two Standards: H.323 / SIP Bridging both worlds João Pereira - FCCN - Portugal 1 Presentation FCCN - Portuguese NREN (RCTS) administrator and a research unit; We ve been using H.323 videoconferencing since

More information

General Guidelines for SIP Trunking Installations

General Guidelines for SIP Trunking Installations SIP Trunking Installations General Guidelines for SIP Trunking Installations 1) How do I setup my SIP trunk for inbound/outbound calling? We authenticate IP-PBX SIP Trunking traffic by: IP Authentication

More information

Introduction. What is DUNDi? Configuring Asterisk for use with DUNDi

Introduction. What is DUNDi? Configuring Asterisk for use with DUNDi Introduction This paper will explore how to configure and setup the DUNDi directory service on your Asterisk PBX system. DUNDi is not very hard to configure in Asterisk, however at the time of this writing,

More information

Using DUNDi with a Cluster of Asterisk Servers! General Description and Scope

Using DUNDi with a Cluster of Asterisk Servers! General Description and Scope Using DUNDi with a Cluster of Asterisk Servers! General Description and Scope DUNDi is a peer-to-peer system for locating Internet gateways to telephony services. Unlike traditional centralized services

More information

Asterisk Overview and Interfacing with APAN Server

Asterisk Overview and Interfacing with APAN Server Asterisk Overview and Interfacing with APAN Server Pujan Srivastava: pujan@ait.asia interlab Asian Institute of Technology February 14, 2012 1 o Asterisk Introduction o Asterisk Dialplan o Asterisk CLI

More information

AT&T SIP Trunk Compatibility Testing for Asterisk

AT&T SIP Trunk Compatibility Testing for Asterisk AT&T SIP Trunk Compatibility Testing for Asterisk Mark A. Vince, P.E., AT&T Astricon 2008 September 25, 2008 Phoenix, AZ Agenda Why we tested What we tested Test configuration Asterisk Business Edition

More information

Performance Benchmark Test for Asterisk B2BUA. 13 November 2007 http://www.transnexus.com

Performance Benchmark Test for Asterisk B2BUA. 13 November 2007 http://www.transnexus.com Performance Benchmark Test for Asterisk B2BUA 13 November 2007 http://www.transnexus.com Revision History Revision Date of Issue Changes 0.1 July 16, 2007 Initial Draft. 0.2 July 17, 2007 Minor edits and

More information

Faculty Tutorial: Upload a Syllabus and Course Schedule

Faculty Tutorial: Upload a Syllabus and Course Schedule Faculty Tutorial: Upload a Syllabus and Course Schedule Purpose: To show faculty how to download, update, and then re upload a Syllabus in courses developed by the Office of Online Learning and Web Marketing.

More information

Asterisk Command-Line Interface Reference

Asterisk Command-Line Interface Reference ,appe.23481 Page 337 Wednesday, August 31, 2005 5:02 PM Appendix E APPENDIX E Asterisk Command-Line Interface Reference To access the Asterisk command-line interface (CLI), pass the -c or -r argument to

More information