welcome! today’s webinar: designing voip services with pika building blocks

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

Upload: aziza

Post on 13-Jan-2016

26 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

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

Welcome!

Today’s Webinar: Designing VoIP Services

with PIKA Building BlocksIrene CrosbyHead of MarketingPIKA Technologies

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

Your Webinar Leader

Yashar MoghanSenior Field Application EngineerPIKA Technologies

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

Familiarization with MShow

• Audio streaming• Sending us questions

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

Objectives

To present:• A technical overview of PIKA VoIP

building blocks, and• How to develop VoIP-enabled

applications using a PIKA platform

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

• 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

Agenda

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

• You have a basic technical understanding of IP / VoIP

• Ideally, you are familiar with PIKA MonteCarlo

Assumptions

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

Jitter Buffer

RTP

RTP 001010 RTP

0010101010

Codec

01001001010101001110101

1101110101

Echo

0010101010

Codec

RTP

RTP 001010 RTP

SIP IP

PSTN/POTS PIKA APPLICATION IP

General requirements for IP-PSTN connectivity

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

Essential building blocks in MonteCarlo 6.2

1. Readily supported IP codecsG.711, G.726

2. RTP Packet headers containing codec type and ordering info

3. Jitter bufferUses RTP information to deliver smoother /steady audio

4. Echo cancellation

All done on the DSP

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

Essential building blocks in MC6.2

1. 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

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

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

Essential building blocks in MC6.2

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

3. 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

Essential building blocks in MC6.2

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

4. 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

Essential building blocks in MC6.2

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

PIKA MonteCarlo 6.2 VoIP API: PK_VOIP_xxx

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

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

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

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;

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

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;

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

VoIP API – Encode – payloadType• PK_VOIP_EncodeSetParameters( )

Payload Type

Codec Payload TypeG.711 µ-law 0G.711 A-law 8G.726 2 / dynamic

For details see: www.ietf.org/rfc/rfc3551.txt

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

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]

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

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).

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

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

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

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

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

Related API – called before VoIP API

• PK_DSP_GetDeviceHandle

• PK_DSP_DEVICE_SeizePort

• PK_DSP_PORT_SetEventHandle• PK_CTBUS_FullDuplexConnect //Line Port

DSP Port

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

Related API – SeizePort (DSP)

• PK_DSP_DEVICE_SeizePort (TDeviceHandle hDsp, TResourceMask resMask );

Example:

resMask = PK_RTP|PK_G711|PK_ECHO_CANCELLATION

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

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

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

VoIP API – Decode – SetParameters• PK_VOIP_DecodeSetParameters (TResourceHandle hPort, TVOIPDecodeParameters *decodeParams);

typedef struct{TCodecType codecType;PK_U32 payloadType;PK_U32 initialLatencyInFrames; //default 3PK_BOOL dynamicJitterBufferEnabled; //TRUE or

FALSEPK_U32 jitterBufferPeriod; //default 640msPK_U32 fixedLatencyInFrames; //1-11

} TVOIPDecodeParameters;

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

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

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

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

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

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

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

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

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

VoIP API – Decode – SetParameters - ExampleTVOIPDecodeParameters 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 );

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

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

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

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)

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

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);

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

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 with

H.323, MS SIP, oSIP, Vovida• MonteCarlo 6.3 to provide an embedded

SIP stack as well

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

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

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

Setting up DSPs for VoIP using PikaSetup.exe

Page 37: Welcome! Today’s Webinar:  Designing VoIP Services  with PIKA Building Blocks
Page 38: Welcome! Today’s Webinar:  Designing VoIP Services  with PIKA Building Blocks
Page 39: Welcome! Today’s Webinar:  Designing VoIP Services  with PIKA Building Blocks

VoIP Test and Sample Applications

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

Test application

• PikaTest.exe• Part of MonteCarlo 6.2 installation, under PIKA Bin

folder• General multi-purpose application• Command-line based

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

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

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

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

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

SIP demo configuration

Telephony Switch

SIP Proxy

SIP Server 1

NIC

Daytona

SIP Stack + MC 6.2SIP 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

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

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…

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

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 • [email protected]• Phone: +1-613-591-1555 x216

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

Thank youfor your time.