Asterisk: dongled !
Upcoming SlideShare
Loading in...5
×
 

Asterisk: dongled !

on

  • 2,164 views

Slides from the talk I gave at ASTRICON 2012.

Slides from the talk I gave at ASTRICON 2012.

Statistics

Views

Total Views
2,164
Views on SlideShare
2,164
Embed Views
0

Actions

Likes
1
Downloads
41
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Asterisk: dongled ! Asterisk: dongled ! Presentation Transcript

  • 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, Argentina2009 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.ara 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.arPlug the deviceroot@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 OK --> Check the connection 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.arInstallation 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.confedit 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 versionchan_dongle: Huawei 3G Dongle Channel Driver, Version 1.1, Revision 10Project Home: http://code.google.com/p/asterisk-chan-dongleBug Reporting: http://code.google.com/p/asterisk-chan-dongle/issues/list*CLI> dongle show devicesID Group State RSSI Mode Submode Provider Name Model Firmware IMEIIMSIdongle1 0 Free 31 3 3 AT&T E169 11.314.13 359658016133911724310501530940debian003*CLI> dongle show device*CLI> help dongle restartUsage: dongle restart < now | gracefully | when convenient > <device> Restart dongle <device>*CLI> help dongle reloadUsage: dongle reload < now | gracefully | when convenient > Reloads the chan_dongle configuration 15
  • Troubleshooting fprior@iridio.com.arProblem SolutionModem 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 SIMcard is not ready yet” Unlock the modem using free“Error initializing Dongle” calculators, then AT^CARDLOCK=”< code >”AT+CNUM ERRORModem 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=0memory. 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.confexten => 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 InterfaceUsing 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] Successfullysent SMS message 0x993efd0debian003*CLI> 19
  • Send SMS with DialPlan fprior@iridio.com.aredit extensions.conf[internal]exten => 74,1,Dial(DONGLE/dongle1/6785574445)exten => 78,1,DongleSendSMS(dongle1,6785574445, ’This is an OUTGOING sms sendedvia DialPlan.)[dongle_incoming] ;same as defined in dongle.confexten => 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.confexten => 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 intodongle1") 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 anOUTGOING 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.arBEFORE 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.arFuture 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