Run the slides


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Objectives * Target developers – technical overview * Introduce new features and capabilities * Explain how these new features can be used to meet your requirements * Explain implementation details for each feature/capability
  • Objectives * Target developers – technical overview * Introduce new features and capabilities * Explain how these new features can be used to meet your requirements * Explain implementation details for each feature/capability
  • Objectives * Target developers – technical overview * Introduce new features and capabilities * Explain how these new features can be used to meet your requirements * Explain implementation details for each feature/capability
  • Run the slides

    1. 1. Welcome! Today’s Webinar: Designing VoIP Services with PIKA Building Blocks Irene Crosby Head of Marketing PIKA Technologies
    2. 2. Your Webinar Leader Yashar Moghan Senior Field Application Engineer PIKA Technologies
    3. 3. Familiarization with MShow <ul><li>Audio streaming </li></ul><ul><li>Sending us questions </li></ul>
    4. 4. Objectives <ul><li>To present: </li></ul><ul><li>A technical overview of PIKA VoIP building blocks, and </li></ul><ul><li>How to develop VoIP-enabled applications using a PIKA platform </li></ul>
    5. 5. <ul><li>An overview of general requirements for IP-PSTN connectivity </li></ul><ul><li>VoIP building blocks in MonteCarlo 6.2 </li></ul><ul><ul><li>G.711 and 726 codecs, RTP, jitter buffer, EC </li></ul></ul><ul><li>PIKA VoIP and related API </li></ul><ul><li>Integration with VoIP signaling stacks </li></ul><ul><li>Hardware requirements: </li></ul><ul><ul><li>PIKA MM cards plus any host NIC </li></ul></ul><ul><li>Setup tool, test and sample applications </li></ul>Agenda
    6. 6. <ul><li>You have a basic technical understanding of IP / VoIP </li></ul><ul><li>Ideally, you are familiar with PIKA MonteCarlo </li></ul>Assumptions
    7. 7. Codec 01001001010101001110101 1101110101 Echo Codec SIP IP PSTN/POTS PIKA APPLICATION IP General requirements for IP-PSTN connectivity Jitter Buffer RTP RTP 001010 RTP 0010101010 0010101010 RTP RTP 001010 RTP
    8. 8. Essential building blocks in MonteCarlo 6.2 <ul><li>Readily supported IP codecs </li></ul><ul><ul><li>G.711, G.726 </li></ul></ul><ul><li>RTP </li></ul><ul><ul><li>Packet headers containing codec type and ordering info </li></ul></ul><ul><li>Jitter buffer </li></ul><ul><ul><li>Uses RTP information to deliver smoother /steady audio </li></ul></ul><ul><li>Echo cancellation </li></ul><ul><li>All done on the DSP </li></ul>
    9. 9. Essential building blocks in MC6.2 <ul><li>IP codecs </li></ul><ul><ul><li>Format of Tx/Rx compressed data/audio </li></ul></ul><ul><ul><li>Compressed data = Payload </li></ul></ul><ul><ul><li>G.711 and G.726 formats are offered readily </li></ul></ul><ul><ul><li>Other codecs would be considered as needed </li></ul></ul>
    10. 10. <ul><li>RTP (Real-Time Transport Protocol) </li></ul><ul><ul><li>Serves as a mechanism to tell the receiving-end the format of the audio </li></ul></ul><ul><ul><li>Provides information to the receiving-end to put the packets in the correct order or skip missing ones </li></ul></ul><ul><ul><li>[RTP header + Payload] => RTP IP packet </li></ul></ul>Essential building blocks in MC6.2
    11. 11. <ul><li>Jitter buffer mechanism </li></ul><ul><ul><li>Why needed: VoIP packets do not necessarily arrive at their destination in correct order, or at all! </li></ul></ul><ul><ul><li>An adjustable buffer with parameters set in the API structure; i.e. size, dynamic vs. static </li></ul></ul><ul><ul><li>Takes advantage of RTP information associated with each packet to order them correctly before delivering the audio to the near-end listener </li></ul></ul>Essential building blocks in MC6.2
    12. 12. <ul><li>Echo Cancellation </li></ul><ul><ul><li>Due to inherent delay in VoIP systems, echo is more noticeable than in regular PSTN calls. It must be removed in most cases! </li></ul></ul><ul><ul><li>G.168 compliant </li></ul></ul><ul><ul><li>Tail lengths from 1 to 128ms </li></ul></ul><ul><ul><li>EC mask is simply added to resMask when seizing the RTP resource </li></ul></ul>Essential building blocks in MC6.2
    13. 13. PIKA MonteCarlo 6.2 VoIP API: PK_VOIP_xxx
    14. 14. VoIP API <ul><li>PK_VOIP_EncodeSetParameters </li></ul><ul><li>PK_VOIP_EncodeGetBufferSize </li></ul><ul><li>PK_VOIP_EncodeAddBuffers </li></ul><ul><li>PK_VOIP_EncodeStart </li></ul><ul><li>PK_VOIP_EncodeStop </li></ul><ul><li>PK_VOIP_DecodeSetParameters </li></ul><ul><li>PK_VOIP_DecodeGetBufferSize </li></ul><ul><li>PK_VOIP_DecodeStart </li></ul><ul><li>PK_VOIP_DecodeAddBuffers </li></ul><ul><li>PK_VOIP_DecodeStop </li></ul>
    15. 15. VoIP API – Encode – SetParameters <ul><li>PK_VOIP_EncodeSetParameters </li></ul><ul><li>( TResourceHandle hPort , TVOIPEncodeParameters *encodeParams ); </li></ul><ul><li>typedef struct{ </li></ul><ul><li>TCodecType codecType; </li></ul><ul><li>PK_U32 payloadType; </li></ul><ul><li>PK_U32 packetizationRate; <keep default 2> </li></ul><ul><li>PK_BOOL vadEnabled; </li></ul><ul><li>} TVOIPEncodeParameters ; </li></ul>
    16. 16. VoIP API – Encode – codecType <ul><li>PK_VOIP_EncodeSetParameters( ) </li></ul><ul><li>Codec Types </li></ul><ul><li>typedef enum{ </li></ul><ul><li>PK_PCMU = 0, </li></ul><ul><li>PK_PCMA = 1, </li></ul><ul><li>PK_G726_16 = 4, </li></ul><ul><li>PK_G726_24 = 5, </li></ul><ul><li>PK_G726_32 = 6, </li></ul><ul><li>PK_G726_40 = 7 </li></ul><ul><li>} TCodecType; </li></ul>
    17. 17. VoIP API – Encode – payloadType <ul><li>PK_VOIP_EncodeSetParameters( ) </li></ul><ul><li>Payload Type </li></ul><ul><li>Codec Payload Type </li></ul><ul><li>G.711 µ-law 0 </li></ul><ul><li>G.711 A-law 8 </li></ul><ul><li>G.726 2 / dynamic </li></ul><ul><li>For details see: rfc3551 .txt </li></ul>
    18. 18. VoIP API – Encode – GetBufferSize <ul><li>PK_VOIP_EncodeGetBufferSize </li></ul><ul><li>( TResourceHandle hPort ); </li></ul><ul><ul><li>Must be called after SetParameters but before AddBuffer </li></ul></ul><ul><ul><li>Returns the recommended size of the buffer (in bytes) </li></ul></ul><ul><ul><li>e.g. if G.711, packetization 2: required RTP buffer size returned is 172 bytes (12 bytes RTP header + 2 x 80 bytes payload) </li></ul></ul><ul><ul><li>Used to allocate memory for the buffer (.lpData) </li></ul></ul><ul><ul><li>Used to set the length of the buffer (.dwBufferLength) </li></ul></ul><ul><ul><li>[See Page 202 of Programmer’s Guide ] </li></ul></ul>
    19. 19. VoIP API – Encode – AddBuffer <ul><li>PK_VOIP_EncodeAddBuffer </li></ul><ul><li>( TResourceHandle hPort , TBufferHeader *pBuffer ); </li></ul><ul><ul><li>Called after EncodeGetBufferSize but before EncodeStart </li></ul></ul><ul><ul><li>The buffer passed-in must at least be as large as the buffer size returned by PK_VOIP_EncodeGetBufferSize </li></ul></ul><ul><ul><li>The buffer is returned to the application once it is filled (by RTP encoding, hport ). </li></ul></ul>
    20. 20. VoIP API – Encode – Start <ul><li>PK_VOIP_EncodeStart </li></ul><ul><li>( TResourceHandle hPort ); </li></ul><ul><ul><li>Called after EncodeAddBuffer </li></ul></ul><ul><ul><li>Starts RTP encoding process on DSP port, hPort </li></ul></ul><ul><ul><li>Encoded RTP packets are returned to application via installed ‘event handler’ (of hport ) and indicated by event PK_EVENT_VOIP_ENCODE_RETURN_PACKET </li></ul></ul><ul><ul><li>The packet is now ready for transmission over the host network interface </li></ul></ul>
    21. 21. VoIP API – Encode – Stop <ul><li>PK_VOIP_EncodeStop </li></ul><ul><li>( TResourceHandle hPort ); </li></ul><ul><ul><li>Called after Encodestop </li></ul></ul><ul><ul><li>Stops an RTP encoding operation on the DSP port specified by hPort </li></ul></ul><ul><ul><li>Used when the VoIP call terminates </li></ul></ul>
    22. 22. Related API – called before VoIP API <ul><li>PK_DSP_GetDeviceHandle </li></ul><ul><li>PK_DSP_DEVICE_SeizePort </li></ul><ul><li>PK_DSP_PORT_SetEventHandle </li></ul><ul><li>PK_CTBUS_FullDuplexConnect //Line Port  DSP Port </li></ul>
    23. 23. Related API – SeizePort (DSP) <ul><li>PK_DSP_DEVICE_SeizePort </li></ul><ul><ul><li>(TDeviceHandle hDsp, TResourceMask resMask ); </li></ul></ul><ul><li>Example: </li></ul><ul><li>resMask = PK_RTP|PK_G711|PK_ECHO_CANCELLATION </li></ul>
    24. 24. VoIP API <ul><li>PK_VOIP_EncodeSetParameters </li></ul><ul><li>PK_VOIP_EncodeGetBufferSize </li></ul><ul><li>PK_VOIP_EncodeAddBuffers </li></ul><ul><li>PK_VOIP_EncodeStart </li></ul><ul><li>PK_VOIP_EncodeStop </li></ul><ul><li>PK_VOIP_DecodeSetParameters </li></ul><ul><li>PK_VOIP_DecodeGetBufferSize </li></ul><ul><li>PK_VOIP_DecodeStart </li></ul><ul><li>PK_VOIP_DecodeAddBuffers </li></ul><ul><li>PK_VOIP_DecodeStop </li></ul>
    25. 25. VoIP API – Decode – SetParameters <ul><li>PK_VOIP_DecodeSetParameters </li></ul><ul><li>( TResourceHandle hPort , </li></ul><ul><li> TVOIPDecodeParameters *decodeParams ); </li></ul><ul><li>typedef struct{ </li></ul><ul><li>TCodecType codecType; </li></ul><ul><li>PK_U32 payloadType; </li></ul><ul><li>PK_U32 initialLatencyInFrames; //default 3 </li></ul><ul><li>PK_BOOL dynamicJitterBufferEnabled; //TRUE or FALSE </li></ul><ul><li>PK_U32 jitterBufferPeriod; //default 640ms </li></ul><ul><li>PK_U32 fixedLatencyInFrames; //1-11 </li></ul><ul><li>} TVOIPDecodeParameters; </li></ul>
    26. 26. VoIP API – Decode – initialLatencyInFrames <ul><li>PK_VOIP_DecodeSetParameters( ) </li></ul><ul><li>initialLatencyInFrames: </li></ul><ul><ul><li>Indicates number of frames that will be placed in the jitter buffer before starting the RTP decoder </li></ul></ul><ul><ul><li>Suggested/default value is 3 </li></ul></ul><ul><ul><li>0 or 1 will have the RTP receiver start the decoder as soon as an RTP packet is received </li></ul></ul>
    27. 27. VoIP API – Decode – dynamicJitterBufferEnabled <ul><li>PK_VOIP_DecodeSetParameters( ) </li></ul><ul><li> dynamicJitterBufferEnabled: </li></ul><ul><ul><li>Set as PK_TRUE or PK_FALSE </li></ul></ul><ul><ul><li>RTP process will manage the number of frames to put in the jitter buffer by analyzing the packets received </li></ul></ul><ul><ul><li>After the jitterBufferPeriod is expired, the number of “initial frames” in the jitter buffer may change based on timing of the packets received </li></ul></ul>
    28. 28. VoIP API – Decode – jitterBufferPeriod <ul><li>PK_VOIP_DecodeSetParameters( ) </li></ul><ul><li> jitterBufferPeriod: </li></ul><ul><ul><li>Defines how often the RTP receiver manages the jitter buffer in number of 10 milliseconds </li></ul></ul><ul><ul><li>Default value is 640 ms </li></ul></ul>
    29. 29. VoIP API – Decode – fixedLatencyInFrames <ul><li>PK_VOIP_DecodeSetParameters( ) </li></ul><ul><li> fixedLatencyInFrames: </li></ul><ul><ul><li>Identifies the fixed number of frames to be stored in the jitter buffer </li></ul></ul><ul><ul><li>1 is the minimum, 11 is the maximum value for this parameter </li></ul></ul><ul><ul><li>Applied when dynamicJitterBufferEnabled is set to PK_FALSE </li></ul></ul>
    30. 30. VoIP API – Decode – SetParameters - Example <ul><li>TVOIPDecodeParameters VOIPDecodeParameters ; </li></ul><ul><li>VOIPDecodeParameters.codecType = PK_PCMU ; </li></ul><ul><li>VOIPDecodeParameters.payloadType = 0 ; </li></ul><ul><li>VOIPDecodeParameters.initialLatencyInFrames = PK_VOIP_INITIAL_LATENCY_DEFAULT ; // 3 (frames) </li></ul><ul><li>VOIPDecodeParameters.dynamicJitterBufferEnabled = PK_TRUE ; </li></ul><ul><li>VOIPDecodeParameters.jitterBufferPeriod = PK_VOIP_JITTER_BUFFER_PERIOD_DEFAULT ; // 64 (640ms) </li></ul><ul><li>VOIPDecodeParameters.fixedLatencyInFrames = 0 ; </li></ul><ul><li>PK_VOIP_DecodeSetParameters ( hDSPPort, &VOIPDecodeParameters ); </li></ul>
    31. 31. VoIP API – Decode – GetBufferSize <ul><li>PK_VOIP_DecodeGetBufferSize( ) </li></ul><ul><ul><li>Provided for consistency with Encode </li></ul></ul><ul><ul><li>Returned value is calculated based on the size of RTP header and the maximum allowed payload (200 ms) </li></ul></ul><ul><ul><li>Application may allocate smaller buffers if the worst case is known for the expected number of frames per RTP packet </li></ul></ul>
    32. 32. Important notes: <ul><li>DSP port seized for VoIP streaming can perform both encode and decode simultaneously; i.e. one DSP port per VoIP session </li></ul><ul><li>For encode : add ~15 buffers before calling PK_VOIP_EncodeStart </li></ul><ul><li>For decode : use of only one buffer is sufficient; to be added after calling PK_VOIP_DecodeStart (once filled with an incoming packet) </li></ul>
    33. 33. Related API – Echo Cancellation <ul><li>PK_DSP_DEVICE_SeizePort ( hDSPDevice , PK_ECHO_REFERENCE ) ; </li></ul><ul><li>PK_CTBUS_HalfDuplexConnect ( hDSPPort , hDSPPortER ) ; </li></ul><ul><li>PK_EC_Initialize ( hDSPPort , hDSPPortER , 12 ) ; //last parm Tail Length </li></ul><ul><li>PK_EC_Enable ( hDSPPort ) ; </li></ul>
    34. 34. Integration with VoIP signaling stacks <ul><li>No restriction on use of any stack due to low-level, modular and flexible VoIP API </li></ul><ul><li>Sample integration with SIP is available </li></ul><ul><li>Customers have done integration with H.323, MS SIP, oSIP, Vovida </li></ul><ul><li>MonteCarlo 6.3 to provide an embedded SIP stack as well </li></ul>
    35. 35. PIKA board support and other hardware requirements <ul><li>All PIKA board types support VoIP </li></ul><ul><ul><li>PrimeNet MM (E1/T1), Daytona MM (LS/POTS), InLine MM (LS) </li></ul></ul><ul><li>DSP-based, common to all boards </li></ul><ul><li>Host NIC used for IP connection </li></ul>
    36. 36. Setting up DSPs for VoIP using PikaSetup.exe
    37. 39. VoIP Test and Sample Applications
    38. 40. Test application <ul><li>PikaTest.exe </li></ul><ul><ul><li>Part of MonteCarlo 6.2 installation, under PIKA  Bin folder </li></ul></ul><ul><ul><li>General multi-purpose application </li></ul></ul><ul><ul><li>Command-line based </li></ul></ul>
    39. 41. Test/sample applications <ul><li>VoIP_Sample_DMM </li></ul><ul><ul><li>Demonstrates use of VoIP API in a focused manner </li></ul></ul><ul><ul><li>No signaling stack integration </li></ul></ul><ul><ul><li>Easy setup, requires one DMM POTS only </li></ul></ul><ul><ul><li>VoIP audio streaming between two phones on DMM </li></ul></ul><ul><ul><li>Echo cancellation enabled </li></ul></ul><ul><ul><li>Available online under Downloads  Sample Code </li></ul></ul>
    40. 42. Test/sample applications <ul><li>SIP Demo v0.5 </li></ul><ul><ul><li>Much larger application, includes SIP integration </li></ul></ul><ul><ul><li>Able to register the system (i.e., a VoIP client) with a publicly available or private SIP proxy </li></ul></ul><ul><ul><li>Full ‘ call ’ support; including invite, trying and bye messages </li></ul></ul><ul><ul><li>Can place VoIP calls between two PIKA-based systems (VoIP clients) or to a SIP phone </li></ul></ul><ul><ul><li>Verified under numerous SIP proxies </li></ul></ul><ul><ul><li>Online under Downloads  Sample Code </li></ul></ul>
    41. 43. SIP demo configuration Telephony Switch SIP Server 1 NIC Daytona SIP Stack + MC 6.2 SIP Server 2 NIC Daytona SIP Stack + MC 6.2 Any phone GrandStream VoIP phone ext. 441 ext. 442 ext. 450 External line (591-0000) PIKA WORLD PSTN WORLD SIP Proxy
    42. 44. Thank You <ul><li>If you are interested in taking a closer look, download our Programmer’s Guide: </li></ul><ul><ul><li> </li></ul></ul><ul><li>Additional HW info is available from: </li></ul><ul><ul><li> </li></ul></ul><ul><li>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… </li></ul>
    43. 45. How to reach our people <ul><li>Sales </li></ul><ul><ul><li>Western USA – Brett Sumpter phone: +1-903-939-3711 </li></ul></ul><ul><ul><li>Eastern USA – Cheryl Farmer phone: +1-770-345-5944 </li></ul></ul><ul><ul><li>EMEA – Maarten Kronenburg phone: +31 76 5083 560 </li></ul></ul><ul><ul><li>Canada, Americas & Asia – Terry Atwood phone: +1-613-591-1555 x329 </li></ul></ul><ul><li>Field Application Engineers </li></ul><ul><ul><li>Yashar Moghan – phone: +1-613-591-1555 x415 </li></ul></ul><ul><ul><li>Cindy Xu – phone: +1-613-591-1555 x458 </li></ul></ul><ul><li>Technical Support </li></ul><ul><ul><li>[email_address] </li></ul></ul><ul><ul><li>Phone: +1-613-591-1555 x216 </li></ul></ul>
    44. 46. Thank you for your time.