SlideShare una empresa de Scribd logo
1 de 38
Asterisk: dongled !
 Francesco PRIOR    | @priorfra

                   Photo used with permission of Joel Escalona.
Who Am I                                              fprior@iridio.com.ar


            • Francesco Prior
            • Software Developer
            • I’m from “through” Italy, Angola, Argentina




2009       2010           2011             2012
       Trixbox
                                      Pure Asterisk
                                            dCap + Astricon
                                 irVoice

                                                                             2
History of Implementations
                                                     fprior@iridio.com.ar




         Old Nokia Mobile Phone
         +
         AT Commands
         +
         Visual Basic Application
         +
         USB to Serial cable
                                    We needed new features:
                                    • Increasing SMS channels
                                    • Using them for voice
                                    • Managing broadcast
                                    • Interface with Asterisk
                                    …spending little
                                                                            3
Whishes
                fprior@iridio.com.ar




          $$$




                                       4
Solution
           fprior@iridio.com.ar




           Or…                    5
Solution
             fprior@iridio.com.ar




a DONGLE !




                                    6
Summary                                       fprior@iridio.com.ar


  Requirements


  HowTo install dongle and configure with *


  Usage


  Demo Live – Case Study




                                                                     7
*CLI> Premises




     *CLI> Requirements


   *CLI> Installation and configuration



 *CLI> Usage



*CLI> Case Study

                                          8
Requirements
                                                fprior@iridio.com.ar



  Search for a Dongle [around 30 USD at eBay]


  Only HUAWEI modem supported


  not all HUAWEI models are supported


  Power specs and USB hubs
  5V/500mA ? 2.5 W


                                         OK

                                                                       9
*CLI> Premises




 *CLI> Requirements




   *CLI> Installation and Configuration


 *CLI> Usage


*CLI> Case Study

                                          10
Installation and configuration                                                  fprior@iridio.com.ar


Plug the device
root@debian002:~# dmesg

[233064.783557]   usb 2-2.1: new full speed USB device using uhci_hcd and address 4
[233065.096342]   usb 2-2.1: New USB device found, idVendor=12d1, idProduct=1001
[233065.096382]   usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=1
[233065.096432]   usb 2-2.1: Product: HUAWEI Mobile
[233065.096458]   usb 2-2.1: Manufacturer: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
[233065.096475]   usb 2-2.1: SerialNumber: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
[233065.909669]   usb 2-2.1: configuration #1 chosen from 1 choice
[233067.328939]   Initializing USB Mass Storage driver...
[233067.394668]   usbcore: registered new interface driver usb-storage
[233067.402786]   USB Mass Storage support registered.
[233067.419107]   usbcore: registered new interface driver usbserial
[233067.419393]   USB Serial support registered for generic
[233067.419582]   usbcore: registered new interface driver usbserial_generic
[233067.419619]   usbserial: USB Serial Driver core
[233067.439255]   USB Serial support registered for GSM modem (1-port)
[233067.447136]   option 2-2.1:1.0: GSM modem (1-port) converter detected
[233067.466022]   usb 2-2.1: GSM modem (1-port) converter now attached to ttyUSB0
[233067.466112]   option 2-2.1:1.1: GSM modem (1-port) converter detected
[233067.476046]   usb 2-2.1: GSM modem (1-port) converter now attached to ttyUSB1
[233067.476070]   option 2-2.1:1.2: GSM modem (1-port) converter detected
[233067.479013]   usb 2-2.1: GSM modem (1-port) converter now attached to ttyUSB2
[233067.479087]   usbcore: registered new interface driver option
[233067.479124]   option: v0.7.2:USB Driver for GSM modems

                                                                                                       11
Installation and configuration                                                           fprior@iridio.com.ar

 root@debian002:~# apt-get install minicom

 root@debian002:~# minicom -c on -D /dev/ttyUSB0

                                                   -c is for colouring -D is for open specified port
 Welcome to minicom 2.4

 OPTIONS: I18n
 Compiled on Sep 5 2010, 09:23:03.
 Port /dev/ttyUSB14

 Press CTRL-A Z for help on special keys

 AT --> Check the connection
 OK
 ATI --> get device information
 Manufacturer: huawei
 Model: E1552
 Revision: 11.608.13.02.00
 IMEI: 359638019133911
 AT+CGSN
 353143037121812 --> International Mobile Equipment Identity [IMEI]
 AT+CIMI
 722310501570940 --> International Mobile Subscriber Identity [IMSI]
 AT^CVOICE=?
 ^CVOICE:(0) --> Voice is enabled !
 AT^U2DIAG=0
 OK --> switch the device in modem mode only
                                                                                                                12
Installation and configuration                                               fprior@iridio.com.ar


Installation of chan_dongle module:
      wget http://asterisk-chan-dongle.googlecode.com/files/chan_dongle-1.1.r10.tgz
      tar -xzvf chan_dongle-1.1.r10.tgz
      cd chan_dongle-1.1.r10
      ./configure
      make
      make install
      cp etc/dongle.conf /etc/asterisk/dongle.conf

edit dongle.conf
      [dongle1]
      ;audio=/dev/ttyUSB1       ; tty port for audio connection;
      ;data=/dev/ttyUSB2        ; tty port for AT commands;

      imei=123456789012345
      imsi=123456789012345
      context=dongle-incoming




 reload dongle.conf

      *CLI> dongle reload now


                                                                                                    13
Installation and configuration                                        fprior@iridio.com.ar



*CLI> help dongle
            dongle callwaiting    Enable/Disable Call-Waiting on the dongle
                    dongle cmd*   Send commands to port for debugging
              dongle discovery    Discovery devices and create config
                    dongle pdu*   Send PDU of SMS from the dongle
                 dongle reload    Reload dongle
                 dongle remove    Remove dongle
                  dongle reset    Reset dongle now
                dongle restart    Restart dongle
   dongle show device settings*   Show Dongle device settings
      dongle show device state*   Show Dongle device state
 dongle show device statistics    Show Dongle device statistics
           dongle show devices*   Show Dongle devices state
           dongle show version*   Show module version
                    dongle sms*   Send SMS from the dongle
                  dongle start    Start dongle
                   dongle stop    Stop dongle
                   dongle ussd    Send USSD commands to the dongle




                                                                                             14
Installation and configuration                                                fprior@iridio.com.ar

*CLI> dongle show version

chan_dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 10
Project Home: http://code.google.com/p/asterisk-chan-dongle
Bug Reporting: http://code.google.com/p/asterisk-chan-dongle/issues/list



*CLI> dongle show devices

ID      Group State RSSI Provider Name Model Firmware IMEI            IMSI
dongle1 0     Free 31    AT&T          E169 11.314.13 359658016133911 724310501530940
debian003*CLI> dongle show device




*CLI> help dongle restart
Usage: dongle restart < now | gracefully | when convenient > <device>
       Restart dongle <device>



*CLI> help dongle reload
Usage: dongle reload < now | gracefully | when convenient >
       Reloads the chan_dongle configuration

                                                                                                     15
Troubleshooting                                                             fprior@iridio.com.ar


Problem                                      Solution
Modem cannot register into GSM network:      Select Any band: AT^SYSCFG=2,2,3fffffff,0,2



“Error checking subscriber phone number”     Modem Locked:
“Dongle needs to be reinitialized. The SIM
card is not ready yet”                       Unlock the modem using free
“Error initializing Dongle”                  calculators, then AT^CARDLOCK=”< code >”
AT+CNUM ERROR
Modem with Voice NOT Enabled                 DC-Unlocker could help for a few dollars
                                             to enable voice feature [normally disabled]
Linux recognizes the device as storage       AT^U2DIAG=0
memory.                                      switch the device is only Modem




                                                                                                   16
*CLI> Premises




 *CLI> Requirements




   *CLI> Installation and configuration




    *CLI> Usage


   *CLI> Case Study
                                          17
Call and receive                                          fprior@iridio.com.ar




 edit extensions.conf

[internal]
exten => 74,1,Dial(DONGLE/dongle1/6785574445)


[dongle_incoming] ;same as defined in dongle.conf
exten => s,1,NoOp(Incoming CALL from ${CALLERID(all)} to ${EXTEN})
   same => n,Dial(SIP/26)
   same => n,Hangup()




                                                                                 18
Send SMS from CLI                                                       fprior@iridio.com.ar




                                        1. Asterisk Console
    Three ways to send messages         2. DialPlan
                                        3. Asterisk Manager Interface




Using CLI and plain text:

*CLI> dongle sms dongle1 6785574445 This is an OUTGOING message from CLI
[dongle1] SMS queued for send with id 0x993efd0
    -- [dongle1] Successfully sent SMS message 0x993efd0
[Aug 15 18:03:14] NOTICE[16262] at_response.c:257 at_response_ok: [dongle1]
Successfully sent SMS message 0x993efd0
debian003*CLI>


                                                                                               19
Send SMS with DialPlan                                               fprior@iridio.com.ar

edit extensions.conf
[internal]
exten => 74,1,Dial(DONGLE/dongle1/6785574445)

exten => 78,1,DongleSendSMS(dongle1,6785574445, ’This is an OUTGOING sms sended
via DialPlan.')

[dongle_incoming] ;same as defined in dongle.conf
exten => s,1,NoOp(Incoming CALL from ${CALLERID(all)} to ${EXTEN})
   same => n,Hangup()

exten => sms,1,NoOp(Incoming SMS into ${DONGLENAME})
   same => n,NoOp( From ${CALLERID(num)})
   same => n,NoOp( Message: ${BASE64_DECODE(${SMS_BASE64})})
   same => n,Hangup()

Using dialplan
 -- Executing [78@internal:1] DongleSendSMS("SIP/26-00000011",
"dongle1,6785574445,'This is an OUTGOING sms sended via DialPlan.'") in new stack
  -- Auto fallthrough, channel 'SIP/26-00000011' status is 'UNKNOWN'
  -- [dongle1] Successfully sent SMS message 0x993efd0
[Aug 15 18:19:25] NOTICE[16262] at_response.c: at_response_ok: [dongle1]
Successfully sent SMS message 0x993efd0
                                                                                            20
Receive SMS                                                                            fprior@iridio.com.ar

edit extensions.conf
[internal]
exten => 74,1,Dial(DONGLE/dongle1/6785574445)

exten => 78,1,DongleSendSMS(dongle1,6785574445, ’This is an OUTGOING sms sended thru
DialPlan.')

[dongle_incoming] ;same as defined in dongle.conf
exten => s,1,NoOp(Incoming CALL from ${CALLERID(all)} to ${EXTEN})
   same => n,Hangup()

exten => sms,1,NoOp(Incoming SMS into ${DONGLENAME})
   same => n,NoOp( From ${CALLERID(num)})
   same => n,NoOp( Message: ${BASE64_DECODE(${SMS_BASE64})})
   same => n,Hangup()

Incoming SMS
[dongle1] Got SMS from 6785574445: ‘This is an INCOMING message thru dongle1.'
  -- Executing [sms@dongle_incoming:1] NoOp("Local/sms@dongle_incoming-1f32;1", "Incoming SMS into
dongle1") in new stack
  -- Executing [sms@dongle_incoming:2] NoOp("Local/sms@dongle_incoming-1f32;1", " From 6785574445")
in new stack
  -- Executing [sms@dongle_incoming:3] NoOp("Local/sms@dongle_incoming-1f32;1", " This is an
OUTGOING sms sended thru DialPlan. ") in new stack

 -- Executing [sms@dongle_incoming:4] Hangup("Local/sms@dongle_incoming-1f32;1", "") in new stack
== Spawn extension (dongle_incoming,sms,4) exited non-zero on 'Local/sms@dongle_incoming-1f32;1'

                                                                                                              21
References                                                            fprior@iridio.com.ar



 Wiki: http://wiki.e1550.mobi/doku.php
 Code: http://code.google.com/p/asterisk-chan-dongle/
 Forum: http://groups.google.com/group/chan_dongle/about


 Forum Activity:




                   http://groups.google.com/group/chan_dongle/about


                                                                                             22
Time Out for questions.




        …or continue with Case Study.
*CLI> Premises




*CLI> Requirements




  *CLI> Install and configure




   *CLI> Usage




    *CLI> Case Study
Our Case Study              fprior@iridio.com.ar


BEFORE




   6 GSM dongle
   1 powered HUB D-Link
   more than 1500 sms/day

                                                   25
Our Case Study   fprior@iridio.com.ar




                                        26
Statistics   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    27
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    28
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    29
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    30
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    31
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    32
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    33
Case Study   fprior@iridio.com.ar




             www.irvoice.com.ar
                                    34
Time Out for questions.




          …or continue with Conclusions.
Conclusions                                                fprior@iridio.com.ar




• Simple, economic , scalable
• Save a lot of money redirecting mobile calls across
  mobile networks.
• SMS Integration, suitable for countless applications:
       sending failure alert
       notify customers about due date and promotions
       medical appointment reminders, etc.
• customized SMS with dynamic data: e.g.
          “Dear $CUSTOMER, your credit will expires on $DATE”
• Fast: 6 SMS/min = 360 message / hour
        aprox. 3200 sms/day EACH CHANNEL ! [ for 30 U$/dongle !]

                                                                                  36
Conclusions                                      fprior@iridio.com.ar



Future Plans:
• Study C and learn more about Asterisk Code
• have the opportunity to push irVoice into the market
• …. return to the AstriCon next year !




                                                                        37
Contact Information                              fprior@iridio.com.ar




     Francesco Prior


     fprior@iridio.com.ar


     @priorfra


…happy to share with you a time during the event !
                                                                        38

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
 
MySQL Security
MySQL SecurityMySQL Security
MySQL Security
 
OpenStack Neutron's Distributed Virtual Router
OpenStack Neutron's Distributed Virtual RouterOpenStack Neutron's Distributed Virtual Router
OpenStack Neutron's Distributed Virtual Router
 
The Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationThe Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - Presentation
 
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)MySQL Group Replication - Ready For Production? (2018-04)
MySQL Group Replication - Ready For Production? (2018-04)
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
 
Replication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTIDReplication Troubleshooting in Classic VS GTID
Replication Troubleshooting in Classic VS GTID
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
最近のOpenStackを振り返ってみよう
最近のOpenStackを振り返ってみよう最近のOpenStackを振り返ってみよう
最近のOpenStackを振り返ってみよう
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみた
 
MySQL InnoDB Cluster 소개
MySQL InnoDB Cluster 소개MySQL InnoDB Cluster 소개
MySQL InnoDB Cluster 소개
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack introduction to linux kernel tcp/ip ptocotol stack
introduction to linux kernel tcp/ip ptocotol stack
 
Interrupts on xv6
Interrupts on xv6Interrupts on xv6
Interrupts on xv6
 
Scylla Summit 2022: Making Schema Changes Safe with Raft
Scylla Summit 2022: Making Schema Changes Safe with RaftScylla Summit 2022: Making Schema Changes Safe with Raft
Scylla Summit 2022: Making Schema Changes Safe with Raft
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance Showdown
 

Similar a Asterisk: dongled !

3 g modem_tutorial
3 g modem_tutorial3 g modem_tutorial
3 g modem_tutorial
aljarous
 

Similar a Asterisk: dongled ! (20)

Asterisk: dongled !
Asterisk: dongled !Asterisk: dongled !
Asterisk: dongled !
 
Asterisk: ¡dongled!
Asterisk: ¡dongled!Asterisk: ¡dongled!
Asterisk: ¡dongled!
 
Elastix World 2013: "Asterisk: dongled ! "
Elastix World 2013: "Asterisk: dongled ! "Elastix World 2013: "Asterisk: dongled ! "
Elastix World 2013: "Asterisk: dongled ! "
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
 
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
 
Начало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev KitНачало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev Kit
 
DEF CON 27 - GRICHTER - reverse engineering 4g hotspots for fun bugs net fina...
DEF CON 27 - GRICHTER - reverse engineering 4g hotspots for fun bugs net fina...DEF CON 27 - GRICHTER - reverse engineering 4g hotspots for fun bugs net fina...
DEF CON 27 - GRICHTER - reverse engineering 4g hotspots for fun bugs net fina...
 
AHD DVR manual-vcon
AHD DVR manual-vconAHD DVR manual-vcon
AHD DVR manual-vcon
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
3 g modem_tutorial
3 g modem_tutorial3 g modem_tutorial
3 g modem_tutorial
 
SunEyes T Series User Manual
SunEyes T Series User ManualSunEyes T Series User Manual
SunEyes T Series User Manual
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Day 5.2 startingarouter
Day 5.2 startingarouterDay 5.2 startingarouter
Day 5.2 startingarouter
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
 
TpLink_Deco XE75 Pro 1.0_User Guide.pdf
TpLink_Deco XE75 Pro 1.0_User Guide.pdfTpLink_Deco XE75 Pro 1.0_User Guide.pdf
TpLink_Deco XE75 Pro 1.0_User Guide.pdf
 
IoThings you don't even need to hack
IoThings you don't even need to hackIoThings you don't even need to hack
IoThings you don't even need to hack
 
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
GNOME on Android Dongle
GNOME on Android DongleGNOME on Android Dongle
GNOME on Android Dongle
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Asterisk: dongled !

  • 1. Asterisk: dongled ! Francesco PRIOR | @priorfra Photo used with permission of Joel Escalona.
  • 2. Who Am I fprior@iridio.com.ar • Francesco Prior • Software Developer • I’m from “through” Italy, Angola, Argentina 2009 2010 2011 2012 Trixbox Pure Asterisk dCap + Astricon irVoice 2
  • 3. History of Implementations fprior@iridio.com.ar Old Nokia Mobile Phone + AT Commands + Visual Basic Application + USB to Serial cable We needed new features: • Increasing SMS channels • Using them for voice • Managing broadcast • Interface with Asterisk …spending little 3
  • 4. Whishes fprior@iridio.com.ar $$$ 4
  • 5. Solution fprior@iridio.com.ar Or… 5
  • 6. Solution fprior@iridio.com.ar a DONGLE ! 6
  • 7. Summary fprior@iridio.com.ar Requirements HowTo install dongle and configure with * Usage Demo Live – Case Study 7
  • 8. *CLI> Premises *CLI> Requirements *CLI> Installation and configuration *CLI> Usage *CLI> Case Study 8
  • 9. Requirements fprior@iridio.com.ar Search for a Dongle [around 30 USD at eBay] Only HUAWEI modem supported not all HUAWEI models are supported Power specs and USB hubs 5V/500mA ? 2.5 W OK 9
  • 10. *CLI> Premises *CLI> Requirements *CLI> Installation and Configuration *CLI> Usage *CLI> Case Study 10
  • 11. Installation and configuration fprior@iridio.com.ar Plug the device root@debian002:~# dmesg [233064.783557] usb 2-2.1: new full speed USB device using uhci_hcd and address 4 [233065.096342] usb 2-2.1: New USB device found, idVendor=12d1, idProduct=1001 [233065.096382] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=1 [233065.096432] usb 2-2.1: Product: HUAWEI Mobile [233065.096458] usb 2-2.1: Manufacturer: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ [233065.096475] usb 2-2.1: SerialNumber: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ [233065.909669] usb 2-2.1: configuration #1 chosen from 1 choice [233067.328939] Initializing USB Mass Storage driver... [233067.394668] usbcore: registered new interface driver usb-storage [233067.402786] USB Mass Storage support registered. [233067.419107] usbcore: registered new interface driver usbserial [233067.419393] USB Serial support registered for generic [233067.419582] usbcore: registered new interface driver usbserial_generic [233067.419619] usbserial: USB Serial Driver core [233067.439255] USB Serial support registered for GSM modem (1-port) [233067.447136] option 2-2.1:1.0: GSM modem (1-port) converter detected [233067.466022] usb 2-2.1: GSM modem (1-port) converter now attached to ttyUSB0 [233067.466112] option 2-2.1:1.1: GSM modem (1-port) converter detected [233067.476046] usb 2-2.1: GSM modem (1-port) converter now attached to ttyUSB1 [233067.476070] option 2-2.1:1.2: GSM modem (1-port) converter detected [233067.479013] usb 2-2.1: GSM modem (1-port) converter now attached to ttyUSB2 [233067.479087] usbcore: registered new interface driver option [233067.479124] option: v0.7.2:USB Driver for GSM modems 11
  • 12. Installation and configuration fprior@iridio.com.ar root@debian002:~# apt-get install minicom root@debian002:~# minicom -c on -D /dev/ttyUSB0 -c is for colouring -D is for open specified port Welcome to minicom 2.4 OPTIONS: I18n Compiled on Sep 5 2010, 09:23:03. Port /dev/ttyUSB14 Press CTRL-A Z for help on special keys AT --> Check the connection OK ATI --> get device information Manufacturer: huawei Model: E1552 Revision: 11.608.13.02.00 IMEI: 359638019133911 AT+CGSN 353143037121812 --> International Mobile Equipment Identity [IMEI] AT+CIMI 722310501570940 --> International Mobile Subscriber Identity [IMSI] AT^CVOICE=? ^CVOICE:(0) --> Voice is enabled ! AT^U2DIAG=0 OK --> switch the device in modem mode only 12
  • 13. Installation and configuration fprior@iridio.com.ar Installation of chan_dongle module: wget http://asterisk-chan-dongle.googlecode.com/files/chan_dongle-1.1.r10.tgz tar -xzvf chan_dongle-1.1.r10.tgz cd chan_dongle-1.1.r10 ./configure make make install cp etc/dongle.conf /etc/asterisk/dongle.conf edit dongle.conf [dongle1] ;audio=/dev/ttyUSB1 ; tty port for audio connection; ;data=/dev/ttyUSB2 ; tty port for AT commands; imei=123456789012345 imsi=123456789012345 context=dongle-incoming reload dongle.conf *CLI> dongle reload now 13
  • 14. Installation and configuration fprior@iridio.com.ar *CLI> help dongle dongle callwaiting Enable/Disable Call-Waiting on the dongle dongle cmd* Send commands to port for debugging dongle discovery Discovery devices and create config dongle pdu* Send PDU of SMS from the dongle dongle reload Reload dongle dongle remove Remove dongle dongle reset Reset dongle now dongle restart Restart dongle dongle show device settings* Show Dongle device settings dongle show device state* Show Dongle device state dongle show device statistics Show Dongle device statistics dongle show devices* Show Dongle devices state dongle show version* Show module version dongle sms* Send SMS from the dongle dongle start Start dongle dongle stop Stop dongle dongle ussd Send USSD commands to the dongle 14
  • 15. Installation and configuration fprior@iridio.com.ar *CLI> dongle show version chan_dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 10 Project Home: http://code.google.com/p/asterisk-chan-dongle Bug Reporting: http://code.google.com/p/asterisk-chan-dongle/issues/list *CLI> dongle show devices ID Group State RSSI Provider Name Model Firmware IMEI IMSI dongle1 0 Free 31 AT&T E169 11.314.13 359658016133911 724310501530940 debian003*CLI> dongle show device *CLI> help dongle restart Usage: dongle restart < now | gracefully | when convenient > <device> Restart dongle <device> *CLI> help dongle reload Usage: dongle reload < now | gracefully | when convenient > Reloads the chan_dongle configuration 15
  • 16. Troubleshooting fprior@iridio.com.ar Problem Solution Modem cannot register into GSM network: Select Any band: AT^SYSCFG=2,2,3fffffff,0,2 “Error checking subscriber phone number” Modem Locked: “Dongle needs to be reinitialized. The SIM card is not ready yet” Unlock the modem using free “Error initializing Dongle” calculators, then AT^CARDLOCK=”< code >” AT+CNUM ERROR Modem with Voice NOT Enabled DC-Unlocker could help for a few dollars to enable voice feature [normally disabled] Linux recognizes the device as storage AT^U2DIAG=0 memory. switch the device is only Modem 16
  • 17. *CLI> Premises *CLI> Requirements *CLI> Installation and configuration *CLI> Usage *CLI> Case Study 17
  • 18. Call and receive fprior@iridio.com.ar edit extensions.conf [internal] exten => 74,1,Dial(DONGLE/dongle1/6785574445) [dongle_incoming] ;same as defined in dongle.conf exten => s,1,NoOp(Incoming CALL from ${CALLERID(all)} to ${EXTEN}) same => n,Dial(SIP/26) same => n,Hangup() 18
  • 19. Send SMS from CLI fprior@iridio.com.ar 1. Asterisk Console Three ways to send messages 2. DialPlan 3. Asterisk Manager Interface Using CLI and plain text: *CLI> dongle sms dongle1 6785574445 This is an OUTGOING message from CLI [dongle1] SMS queued for send with id 0x993efd0 -- [dongle1] Successfully sent SMS message 0x993efd0 [Aug 15 18:03:14] NOTICE[16262] at_response.c:257 at_response_ok: [dongle1] Successfully sent SMS message 0x993efd0 debian003*CLI> 19
  • 20. Send SMS with DialPlan fprior@iridio.com.ar edit extensions.conf [internal] exten => 74,1,Dial(DONGLE/dongle1/6785574445) exten => 78,1,DongleSendSMS(dongle1,6785574445, ’This is an OUTGOING sms sended via DialPlan.') [dongle_incoming] ;same as defined in dongle.conf exten => s,1,NoOp(Incoming CALL from ${CALLERID(all)} to ${EXTEN}) same => n,Hangup() exten => sms,1,NoOp(Incoming SMS into ${DONGLENAME}) same => n,NoOp( From ${CALLERID(num)}) same => n,NoOp( Message: ${BASE64_DECODE(${SMS_BASE64})}) same => n,Hangup() Using dialplan -- Executing [78@internal:1] DongleSendSMS("SIP/26-00000011", "dongle1,6785574445,'This is an OUTGOING sms sended via DialPlan.'") in new stack -- Auto fallthrough, channel 'SIP/26-00000011' status is 'UNKNOWN' -- [dongle1] Successfully sent SMS message 0x993efd0 [Aug 15 18:19:25] NOTICE[16262] at_response.c: at_response_ok: [dongle1] Successfully sent SMS message 0x993efd0 20
  • 21. Receive SMS fprior@iridio.com.ar edit extensions.conf [internal] exten => 74,1,Dial(DONGLE/dongle1/6785574445) exten => 78,1,DongleSendSMS(dongle1,6785574445, ’This is an OUTGOING sms sended thru DialPlan.') [dongle_incoming] ;same as defined in dongle.conf exten => s,1,NoOp(Incoming CALL from ${CALLERID(all)} to ${EXTEN}) same => n,Hangup() exten => sms,1,NoOp(Incoming SMS into ${DONGLENAME}) same => n,NoOp( From ${CALLERID(num)}) same => n,NoOp( Message: ${BASE64_DECODE(${SMS_BASE64})}) same => n,Hangup() Incoming SMS [dongle1] Got SMS from 6785574445: ‘This is an INCOMING message thru dongle1.' -- Executing [sms@dongle_incoming:1] NoOp("Local/sms@dongle_incoming-1f32;1", "Incoming SMS into dongle1") in new stack -- Executing [sms@dongle_incoming:2] NoOp("Local/sms@dongle_incoming-1f32;1", " From 6785574445") in new stack -- Executing [sms@dongle_incoming:3] NoOp("Local/sms@dongle_incoming-1f32;1", " This is an OUTGOING sms sended thru DialPlan. ") in new stack -- Executing [sms@dongle_incoming:4] Hangup("Local/sms@dongle_incoming-1f32;1", "") in new stack == Spawn extension (dongle_incoming,sms,4) exited non-zero on 'Local/sms@dongle_incoming-1f32;1' 21
  • 22. References fprior@iridio.com.ar Wiki: http://wiki.e1550.mobi/doku.php Code: http://code.google.com/p/asterisk-chan-dongle/ Forum: http://groups.google.com/group/chan_dongle/about Forum Activity: http://groups.google.com/group/chan_dongle/about 22
  • 23. Time Out for questions. …or continue with Case Study.
  • 24. *CLI> Premises *CLI> Requirements *CLI> Install and configure *CLI> Usage *CLI> Case Study
  • 25. Our Case Study fprior@iridio.com.ar BEFORE 6 GSM dongle 1 powered HUB D-Link more than 1500 sms/day 25
  • 26. Our Case Study fprior@iridio.com.ar 26
  • 27. Statistics fprior@iridio.com.ar www.irvoice.com.ar 27
  • 28. Case Study fprior@iridio.com.ar www.irvoice.com.ar 28
  • 29. Case Study fprior@iridio.com.ar www.irvoice.com.ar 29
  • 30. Case Study fprior@iridio.com.ar www.irvoice.com.ar 30
  • 31. Case Study fprior@iridio.com.ar www.irvoice.com.ar 31
  • 32. Case Study fprior@iridio.com.ar www.irvoice.com.ar 32
  • 33. Case Study fprior@iridio.com.ar www.irvoice.com.ar 33
  • 34. Case Study fprior@iridio.com.ar www.irvoice.com.ar 34
  • 35. Time Out for questions. …or continue with Conclusions.
  • 36. Conclusions fprior@iridio.com.ar • Simple, economic , scalable • Save a lot of money redirecting mobile calls across mobile networks. • SMS Integration, suitable for countless applications: sending failure alert notify customers about due date and promotions medical appointment reminders, etc. • customized SMS with dynamic data: e.g. “Dear $CUSTOMER, your credit will expires on $DATE” • Fast: 6 SMS/min = 360 message / hour aprox. 3200 sms/day EACH CHANNEL ! [ for 30 U$/dongle !] 36
  • 37. Conclusions fprior@iridio.com.ar Future Plans: • Study C and learn more about Asterisk Code • have the opportunity to push irVoice into the market • …. return to the AstriCon next year ! 37
  • 38. Contact Information fprior@iridio.com.ar Francesco Prior fprior@iridio.com.ar @priorfra …happy to share with you a time during the event ! 38