24
VOICE OVER IP USING NOKIA ASHA SOFTWARE PLATFORM 1.1 (BETA) Dalbir S Dahiya Engineering Manager Nokia Asha Developer Platform [email protected]

Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

Embed Size (px)

DESCRIPTION

Nokia Asha software platform 1.1 adds voice over IP (VoIP) capabilities for app developers. This webinar shows you how to add VoIP services to your Nokia Asha apps and how to set up a wireless local area network (WLAN) with Nokia Asha SDK 1.1 for testing your apps. We cover how to work with the VoIP API, how to simulate a WLAN for testing, and how to develop full apps that use VoIP. The webinar is presented by Dalbir Dahiya, engineering manager with Nokia. He begins with an overview of how to implement VoIP in apps for users of Nokia Asha phones, and then covers all the information you need to develop with the VoIP API. He also demonstrates sample apps that you can download and modify to incorporate into your own apps. Find out more about: * the VoIP API in the Java Developers Library: http://developer.nokia.com/Resources/Library/Java/#!developers-guides/voip.html * the Nokia Asha SDK: http://developer.nokia.com/Develop/asha/java/tools.xhtml * getting started with the Nokia IDE: http://developer.nokia.com/Develop/asha/java/start/nokia_ide/ * getting started with NetBeans: http://developer.nokia.com/Develop/asha/java/start/netbeans/ * all the new APIs in Nokia Asha software platform 1.1: http://developer.nokia.com/Resources/Library/Java/#!whats-new/java-runtime-for-nokia-asha-software-platform-110.html Check out the current webinar schedule here: http://www.developer.nokia.com/webinars and https://developer.nokia.com/Develop/asha/learning/

Citation preview

Page 1: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

VOICE OVER IP USING NOKIA ASHA SOFTWARE PLATFORM 1.1 (BETA)

Dalbir S Dahiya Engineering Manager

Nokia Asha Developer Platform

[email protected]

Page 2: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

CONTENTS

• Introduction to VOIP • VOIP Experience • Native VOIP • VOIP App using Java API

• Implementation Steps • Basic VOIP APIs • Call Setup Coding details • Configuration

• VOIP Example • Additional Information

Page 3: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

NOKIA ASHA VOIP INTRODUCTION Voice over IP (VOIP) uses the Internet Protocol (IP) to transmit voice as packets over an IP network. Nokia Asha Platform uses Session Initiation Protocol (SIP) protocol.

VOIP platform details:

• Protocols: SIP, RTP/RTCP, STUN • Supports WiFi internet access • Call features: Mobile Originating and Mobile

Terminating calls • Hold/Retrieve • Multi call support (one active, one held, one

waiting) • Call forwarding • DTMF support

Page 4: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

NOKIA ASHA VOIP INTRODUCTION VOIP platform capabilities:

• One media stream (audio) only is supported

• Speech codecs: AMR-WB/NB, G.711 u-law/a-law, G.729, G.726, GSM-EFR/FR.

• Echo cancelation & Dynamic jitter buffer

• Secure call support (SIP TLS + SRTP)

• Network Aaddress Translation /Firewall travelsal: STUN support, NAT keep alive, symmetric signaling/media

• Quality of Service: Media/Signalling QoS marking with Differentiated Service Fields, Bandwidth negotiation, RTP CP Extended Report VoIP metrics

• IPv4 and IPv6 in signaling.

• E.164 numbers

Page 5: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

VOIP platform limitations:

• Multicast streams are not supported.

• Changing the port number/media type/transport during a session is not supported in the

• Session establishment through two proxies.

• Successful session with proxy failure

• Session through a SIP ALG.

• Offer & Answer: A port number of zero is used to reject offered media for MT sessions.

NOKIA ASHA VOIP INTRODUCTION

Page 6: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

VOIP EXPERIENCE

Native VoIP

• Setting up via Accounts

• Native Call UI experience

• Native Phonebook integration

• Native notifications integration

• Native dialer integration

• Native logs integration

• Native fastlane integration

Java Application

• Seamless SIP setting configuration

• Full control on the call UI

• Custom ringing tones

• All in-call features available

• Support for multiple calls

VoIP is available both as natively integrated solution as well as via Java API. Both utilise the same platform VoIP implementation

Page 7: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

SETTING UP NATIVE VOIP CONFIGURATION

Accounts is a Nokia hosted FREE service that can be accessed directly from the phone UI over GPRS/WLAN connection. From the Accounts end users can setup the wanted VoIP providers to their handsets or create their own manual VoIP settings.

Companies can host OTA SMS based configuration systems which are OMA CP compliant to their employes or customers to setup VoIP to Asha handset.

Small companies or individual users can create OMA CP compliant VoIP configuration documents and configure them to the phone over Bluetooth OBEX Push.

Page 8: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

NATIVE VOIP SIMULATION SETUP

Asterisk Server Version 1.8.13.1

OS Version Ubuntu 13.04

Server IP Address 192.168.1.100

Total SIP Account Created 40

Usernames 1001-1040

Password password

Extension Number’s 6001-6040

Emulator 11000, SIP AC-1001/ext-6001

Emulator 11002, SIP AC-1002/ext-6002

Page 9: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

NATIVE VOIP DEMO

Page 10: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

VOIP APP USING JAVA API

Page 11: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

VOIP IMPLEMENTATION ON NOKIA ASHA

• Nokia Asha software platform 1.1 provides the actual VoIP client engine implementation and the VoIP API for 3rd party applications

• Platform is taking care most of the actual VoIP functionality, but it needs also the also the specific VoIP settings from the given application and SIP account.

• The VoIP settings of each VoIP MIDlets are given in a form of an XML file to the VoIP API.

• VoIP settings, such as network, audio codec settings, etc. can be left to their default values. Otherwise, developer should use appropriate configuration for the SIP server in use.

Page 12: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

VOIP PACKAGE OVERVIEW

• On Nokia Asha Platform 1.1, there is new Java package available:

• com.nokia.mid.voip

• Principal classes in the package are as following:

• VoipManager

• VoipStates

• VoipCauses

• Principal interfaces in the package are as following:

• VoipSettings

• VoipSettingsStateListener

• VoipAudioCall

• VoipSettingsStateListener

• VoipMTCallListener

Page 13: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

MAKING VOIP CALL STEP I

• There is no build-in method for this so the developer needs to write his own. For example a custom made function for reading the xml file:

• In order to retrieve the VoIP settings and register with the VoiP server, read the xml file from the resource/jar file and represent it as a String:

Page 14: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

MAKING VOIP CALL STEP II

• Create a VoipSettings instance that is used for reading the VoIP settings from a String. When the settings are written (with the build-in writeVoipSettings method), the client attempts to use the settings as they have been provided by the developer to connect and register with the VoIP server.

• A VoipSettingsStateUpdated listener is used for listening for the status of the registration attempt (whether the client is online, offline or a connection or registration error occurred):

Page 15: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

MAKING VOIP CALL STEP III

• A VoipAudioCall instance and a VoipAudioCallStateListener are used to establish a call and listen for any call updates (call establishment, call termination, connection error). The startCall method receives as argument a boolean that allows the calling MIDlet to send its caller id to the remote party:

Page 16: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

RECIEVING VOIP CALL I

• When the MIDlet is running, A VoipMTCallListener is used for listening for any incoming calls:

Page 17: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

RECEIVING CALL WHEN APP IS CLOSED

• When the MIDlet is not running, the getAppProperty method is used from the instance that extends the MIDlet class in order to retrieve the invocation reason (“arg-0”) and the caller id (“arg-1”). The developers needs to control if the invocation reason is a valid incoming call and then handle the incoming call as follows:

Page 18: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

IMPLEMENTING VOIP FUNCTIONALITY

• After obtaining a reference to a VoIP Audio Call using VoipManager, applications can use method startCall() to initiate and outbound call or to answer an incoming call

Page 19: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

CONFIGURATION XML EXAMPLE

Java midlet config xml file can be obtain from Asha SDK 1.1 example application. For TLS support, one need to do the following changes to xml file: 1. Turning SIPoTLS ON or OFF - to turn on

SIPoTLS following need to be changed SECURECALLPREF <0,1,2>

1.if SIPoTLS and RTP used 2.if SIPoTLS and SRTP used

2. all sip: prefix need to be sips: APROTOCOL <TCP/UDP) PORTNBR as 5061

Page 20: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

THE VOIP EXAMPLE

This example shows how to create a simple VoIP client MIDlet for making internet calls over SIP protocol. It demonstrates the usage the VoIP API on Nokia Asha software platform 1.1 and how to handle VoIP calls. Pre-requisites: 1. Nokia IDE for Java ME with Java ME support 2. Nokia Asha SDK 1.1 - Beta 3. Two emulator instances 4. SIP Server running i.e. Asterisk SIP server at 192.168.1.100 5. Two SIP accounts i.e. 1001 with ext. 6001 & 1002 with ext. 6002

Page 21: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

THE VOIP EXAMPLE DEMO

Page 22: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

MORE INFORMATION Overview

- http://developer.nokia.com/Develop/asha/java/start/

Downloads

- http://developer.nokia.com/Develop/asha/java/tools.xhtml

- http://projects.developer.nokia.com/LWUIT_for_Series_40

Guides

- Nokia Asha Design Guide: http://developer.nokia.com/Resources/Library/Asha_UI/

- Porting Guide: http://developer.nokia.com/Resources/Library/Porting_to_Nokia_Asha/

- Documentation: http://developer.nokia.com/Develop/asha/java/resources/docs/

- Training Videos: http://developer.nokia.com/Develop/asha/learning.xhtml

- Code Examples: http://developer.nokia.com/Develop/asha/java/resources/code/

Page 23: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

THANK YOU. QUESTIONS?

For more information:

https://developer.nokia.com/Develop/asha/learning.xhtml

Page 24: Nokia Asha webinar: Add VoIP services to your Nokia Asha apps

BACKUP