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