Internet of Things and VoIP

From Wiki for Dragino Project
Revision as of 01:25, 29 November 2012 by Edwin (Talk | contribs) (Test 1: Install Asterisk in Dragino make internal calls)

Jump to: navigation, search

Introduction

This topic is talking about to set up the relationship between IoT and IP Telephony network.

We will do different tests below to show how to integrate IoT into VoIP network. We will use the open source Asterisk software here for voip connection.



Test 1: Install Asterisk in Dragino make internal calls


Purpose

Asterisk is a powerful, open source software to build telephony system. Softphone can be runed in either PC or smart phone. The purpose for this test is getting start with Asterisk and soft phone. Below is the set up of this test. Image...


Install and run Asterisk in Dragino

make sure your Dragino have network connection, Run:

root@dragino-bc8622:~# opkg update      // Update the valid package list
root@dragino-bc8622:~# opkg install asterisk18          // install asterisk v1.8
root@dragino-bc8622:~# opkg install asterisk18-app-system       // install asterisk system command applications. 

after install Asterisk, we can run:

root@dragino-bc8622:~# asterisk                        // Start Asterisk Server
root@dragino-bc8622:~# asterisk -vvvvvvgrc             // Connect to Asterisk Server console, here we can see debug info for asterisk server. 
Asterisk 1.8.7.1, Copyright (C) 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
Connected to Asterisk 1.8.7.1 currently running on dragino-bc8622 (pid = 1207)
Verbosity was 0 and is now 6
   -- Remote UNIX connection
dragino-bc8622*CLI>


Register IP phone extensions

Set up phone extensions, modify the file /etc/asterisk/sip.conf and add below at the end of this file.

[dragino-test1]
type=friend                     ; Friends place calls and receive calls
context=demo                ; Context for incoming calls from this user
secret=password
host=dynamic                    ; This peer register with us
dtmfmode=rfc2833                ; Choices are inband, rfc2833, or info
allow=ulaw                      ; dtmfmode=inband only works with ulaw or alaw!
[dragino-test2]
type=friend                     ; Friends place calls and receive calls
context=demo                ; Context for incoming calls from this user
secret=password
host=dynamic                    ; This peer register with us
dtmfmode=rfc2833                ; Choices are inband, rfc2833, or info
allow=ulaw                      ; dtmfmode=inband only works with ulaw or alaw!

Here we generate two accounts with username/password: 1) dragino-test1/password and 2) dragino-test2/password.