1 / 46

Welcome! Today’s Webinar: Designing VoIP Services with PIKA Building Blocks

Welcome! Today’s Webinar: Designing VoIP Services with PIKA Building Blocks. Irene Crosby Head of Marketing PIKA Technologies. Your Webinar Leader. Yashar Moghan Senior Field Application Engineer PIKA Technologies. Familiarization with MShow. Audio streaming Sending us questions.

aziza
Download Presentation

Welcome! Today’s Webinar: Designing VoIP Services with PIKA Building Blocks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome! Today’s Webinar: Designing VoIP Services with PIKA Building Blocks • Irene Crosby • Head of Marketing • PIKA Technologies

  2. Your Webinar Leader • Yashar Moghan • Senior Field Application Engineer • PIKA Technologies

  3. Familiarization with MShow • Audio streaming • Sending us questions

  4. Objectives To present: • A technical overview of PIKA VoIP building blocks, and • How to develop VoIP-enabled applications using a PIKA platform

  5. Agenda • An overview of general requirements for IP-PSTN connectivity • VoIP building blocks in MonteCarlo 6.2 • G.711 and 726 codecs, RTP, jitter buffer, EC • PIKA VoIP and related API • Integration with VoIP signaling stacks • Hardware requirements: • PIKA MM cards plus any host NIC • Setup tool, test and sample applications

  6. Assumptions • You have a basic technical understanding of IP / VoIP • Ideally, you are familiar with PIKA MonteCarlo

  7. RTP RTP 001010 RTP 0010101010 RTP 001010 RTP RTP 0010101010 Jitter Buffer General requirements for IP-PSTN connectivity PSTN/POTS PIKA APPLICATION IP Codec 01001001010101001110101 IP SIP Echo 1101110101 Codec

  8. Essential building blocks in MonteCarlo 6.2 • Readily supported IP codecs G.711, G.726 • RTP Packet headers containing codec type and ordering info • Jitter buffer Uses RTP information to deliver smoother /steady audio • Echo cancellation All done on the DSP

  9. Essential building blocks in MC6.2 • IP codecs • Format of Tx/Rx compressed data/audio • Compressed data = Payload • G.711 and G.726 formats are offered readily • Other codecs would be considered as needed

  10. Essential building blocks in MC6.2 • RTP (Real-Time Transport Protocol) • Serves as a mechanism to tell the receiving-end the format of the audio • Provides information to the receiving-end to put the packets in the correct order or skip missing ones • [RTP header + Payload] => RTP IP packet

  11. Essential building blocks in MC6.2 • Jitter buffer mechanism • Why needed: VoIP packets do not necessarily arrive at their destination in correct order, or at all! • An adjustable buffer with parameters set in the API structure; i.e. size, dynamic vs. static • Takes advantage of RTP information associated with each packet to order them correctly before delivering the audio to the near-end listener

  12. Essential building blocks in MC6.2 • Echo Cancellation • Due to inherent delay in VoIP systems, echo is more noticeable than in regular PSTN calls. It must be removed in most cases! • G.168 compliant • Tail lengths from 1 to 128ms • EC mask is simply added to resMask when seizing the RTP resource

  13. PIKA MonteCarlo 6.2 VoIP API:PK_VOIP_xxx

  14. VoIP API • PK_VOIP_EncodeSetParameters • PK_VOIP_EncodeGetBufferSize • PK_VOIP_EncodeAddBuffers • PK_VOIP_EncodeStart • PK_VOIP_EncodeStop • PK_VOIP_DecodeSetParameters • PK_VOIP_DecodeGetBufferSize • PK_VOIP_DecodeStart • PK_VOIP_DecodeAddBuffers • PK_VOIP_DecodeStop

  15. VoIP API – Encode – SetParameters • PK_VOIP_EncodeSetParameters (TResourceHandle hPort,TVOIPEncodeParameters *encodeParams); typedef struct{ TCodecType codecType; PK_U32 payloadType; PK_U32 packetizationRate; <keep default 2> PK_BOOL vadEnabled; } TVOIPEncodeParameters;

  16. VoIP API – Encode – codecType • PK_VOIP_EncodeSetParameters( ) Codec Types typedef enum{ PK_PCMU = 0, PK_PCMA = 1, PK_G726_16 = 4, PK_G726_24 = 5, PK_G726_32 = 6, PK_G726_40 = 7 } TCodecType;

  17. VoIP API – Encode – payloadType • PK_VOIP_EncodeSetParameters( ) Payload Type Codec Payload Type G.711 µ-law 0 G.711 A-law 8 G.726 2 / dynamic For details see: www.ietf.org/rfc/rfc3551.txt

  18. VoIP API – Encode – GetBufferSize • PK_VOIP_EncodeGetBufferSize (TResourceHandle hPort); • Must be called after SetParameters but before AddBuffer • Returns the recommended size of the buffer (in bytes) • e.g. if G.711, packetization 2: required RTP buffer size returned is 172 bytes (12 bytes RTP header + 2 x 80 bytes payload) • Used to allocate memory for the buffer (.lpData) • Used to set the length of the buffer (.dwBufferLength) [See Page 202 of Programmer’s Guide]

  19. VoIP API – Encode – AddBuffer • PK_VOIP_EncodeAddBuffer (TResourceHandle hPort, TBufferHeader *pBuffer); • Called after EncodeGetBufferSize but before EncodeStart • The buffer passed-in must at least be as large as the buffer size returned by PK_VOIP_EncodeGetBufferSize • The buffer is returned to the application once it is filled (by RTP encoding, hport).

  20. VoIP API – Encode – Start • PK_VOIP_EncodeStart (TResourceHandle hPort); • Called after EncodeAddBuffer • Starts RTP encoding process on DSP port, hPort • Encoded RTP packets are returned to application via installed ‘event handler’ (of hport) and indicated by event PK_EVENT_VOIP_ENCODE_RETURN_PACKET • The packet is now ready for transmission over the host network interface

  21. VoIP API – Encode – Stop • PK_VOIP_EncodeStop (TResourceHandle hPort); • Called after Encodestop • Stops an RTP encoding operation on the DSP port specified by hPort • Used when the VoIP call terminates

  22. Related API – called before VoIP API • PK_DSP_GetDeviceHandle • PK_DSP_DEVICE_SeizePort • PK_DSP_PORT_SetEventHandle • PK_CTBUS_FullDuplexConnect //Line Port  DSP Port

  23. Related API – SeizePort (DSP) • PK_DSP_DEVICE_SeizePort (TDeviceHandle hDsp, TResourceMask resMask ); Example: resMask =PK_RTP|PK_G711|PK_ECHO_CANCELLATION

  24. VoIP API • PK_VOIP_EncodeSetParameters • PK_VOIP_EncodeGetBufferSize • PK_VOIP_EncodeAddBuffers • PK_VOIP_EncodeStart • PK_VOIP_EncodeStop • PK_VOIP_DecodeSetParameters • PK_VOIP_DecodeGetBufferSize • PK_VOIP_DecodeStart • PK_VOIP_DecodeAddBuffers • PK_VOIP_DecodeStop

  25. VoIP API – Decode – SetParameters • PK_VOIP_DecodeSetParameters (TResourceHandle hPort, TVOIPDecodeParameters *decodeParams); typedef struct{ TCodecType codecType; PK_U32 payloadType; PK_U32 initialLatencyInFrames; //default 3 PK_BOOL dynamicJitterBufferEnabled; //TRUE or FALSE PK_U32 jitterBufferPeriod; //default 640ms PK_U32 fixedLatencyInFrames; //1-11 } TVOIPDecodeParameters;

  26. VoIP API – Decode – initialLatencyInFrames • PK_VOIP_DecodeSetParameters( ) initialLatencyInFrames: • Indicates number of frames that will be placed in the jitter buffer before starting the RTP decoder • Suggested/default value is 3 • 0 or 1 will have the RTP receiver start the decoder as soon as an RTP packet is received

  27. VoIP API – Decode – dynamicJitterBufferEnabled • PK_VOIP_DecodeSetParameters( ) dynamicJitterBufferEnabled: • Set as PK_TRUE or PK_FALSE • RTP process will manage the number of frames to put in the jitter buffer by analyzing the packets received • After the jitterBufferPeriod is expired, the number of “initial frames” in the jitter buffer may change based on timing of the packets received

  28. VoIP API – Decode – jitterBufferPeriod • PK_VOIP_DecodeSetParameters( ) jitterBufferPeriod: • Defines how often the RTP receiver manages the jitter buffer in number of 10 milliseconds • Default value is 640 ms

  29. VoIP API – Decode – fixedLatencyInFrames • PK_VOIP_DecodeSetParameters( ) fixedLatencyInFrames: • Identifies the fixed number of frames to be stored in the jitter buffer • 1 is the minimum, 11 is the maximum value for this parameter • Applied when dynamicJitterBufferEnabled is set to PK_FALSE

  30. VoIP API – Decode – SetParameters - Example TVOIPDecodeParameters VOIPDecodeParameters ; VOIPDecodeParameters.codecType = PK_PCMU; VOIPDecodeParameters.payloadType = 0; VOIPDecodeParameters.initialLatencyInFrames = PK_VOIP_INITIAL_LATENCY_DEFAULT; // 3 (frames) VOIPDecodeParameters.dynamicJitterBufferEnabled = PK_TRUE; VOIPDecodeParameters.jitterBufferPeriod = PK_VOIP_JITTER_BUFFER_PERIOD_DEFAULT; // 64 (640ms) VOIPDecodeParameters.fixedLatencyInFrames = 0; PK_VOIP_DecodeSetParameters ( hDSPPort, &VOIPDecodeParameters );

  31. VoIP API – Decode – GetBufferSize • PK_VOIP_DecodeGetBufferSize( ) • Provided for consistency with Encode • Returned value is calculated based on the size of RTP header and the maximum allowed payload (200 ms) • Application may allocate smaller buffers if the worst case is known for the expected number of frames per RTP packet

  32. Important notes: • DSP port seized for VoIP streaming can perform both encode and decode simultaneously; i.e. one DSP port per VoIP session • For encode: add ~15 buffers before calling PK_VOIP_EncodeStart • For decode: use of only one buffer is sufficient; to be added after calling PK_VOIP_DecodeStart (once filled with an incoming packet)

  33. Related API – Echo Cancellation • PK_DSP_DEVICE_SeizePort(hDSPDevice , PK_ECHO_REFERENCE); • PK_CTBUS_HalfDuplexConnect(hDSPPort , hDSPPortER); • PK_EC_Initialize(hDSPPort , hDSPPortER , 12); //last parm Tail Length • PK_EC_Enable(hDSPPort);

  34. Integration with VoIP signaling stacks • No restriction on use of any stack due to low-level, modular and flexible VoIP API • Sample integration with SIP is available • Customers have done integration withH.323, MS SIP, oSIP, Vovida • MonteCarlo 6.3 to provide an embedded SIP stack as well

  35. PIKA board support and other hardware requirements • All PIKA board types support VoIP • PrimeNet MM (E1/T1), Daytona MM (LS/POTS), InLine MM (LS) • DSP-based, common to all boards • Host NIC used for IP connection

  36. Setting up DSPs for VoIP using PikaSetup.exe

  37. VoIP Test and Sample Applications

  38. Test application • PikaTest.exe • Part of MonteCarlo 6.2 installation, under PIKA  Bin folder • General multi-purpose application • Command-line based

  39. Test/sample applications • VoIP_Sample_DMM • Demonstrates use of VoIP API in a focused manner • No signaling stack integration • Easy setup, requires one DMM POTS only • VoIP audio streaming between two phones on DMM • Echo cancellation enabled • Available online under Downloads Sample Code

  40. Test/sample applications • SIP Demo v0.5 • Much larger application, includes SIP integration • Able to register the system (i.e., a VoIP client) with a publicly available or private SIP proxy • Full ‘call’ support; including invite, trying and bye messages • Can place VoIP calls between two PIKA-based systems (VoIP clients) or to a SIP phone • Verified under numerous SIP proxies • Online under Downloads Sample Code

  41. SIP Proxy SIP demo configuration ext. 450 PSTN WORLD GrandStream VoIP phone SIP Server 1 SIP Server 2 SIP Stack + MC 6.2 NIC SIP Stack + MC 6.2 NIC Daytona Daytona External line (591-0000) Telephony Switch ext. 441 ext. 442 PIKA WORLD Any phone

  42. Thank You • If you are interested in taking a closer look, download our Programmer’s Guide: • http://www.pikatechnologies.com/downloads/software.htm • Additional HW info is available from: • http://www.pikatechnologies.com/downloads/hardware.htm • If you want to speak to the sales account manager in your region, a field application engineer, or technical support, the next slide has their contact information…

  43. How to reach our people • Sales • Western USA – Brett Sumpter phone: +1-903-939-3711 • Eastern USA – Cheryl Farmer phone: +1-770-345-5944 • EMEA – Maarten Kronenburg phone: +31 76 5083 560 • Canada, Americas & Asia – Terry Atwood phone: +1-613-591-1555 x329 • Field Application Engineers • Yashar Moghan – phone: +1-613-591-1555 x415 • Cindy Xu – phone: +1-613-591-1555 x458 • Technical Support • support@pikatech.com • Phone: +1-613-591-1555 x216

  44. Thank youfor your time.

More Related