Automatically exported from code.google.com/p/asterisk-chan-dongle
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
contrib/openwrt apply pthread_rwlock_t error fix patch Oct 3, 2011
etc added CHANNEL(dtmf) reading and writing Jul 31, 2013
test rename to chan_dongle May 11, 2011
tools update lock file name in tools Jul 14, 2015
BUGS rename to chan_dongle May 11, 2011
COPYRIGHT.txt rename to chan_dongle May 11, 2011
INSTALL fix typo in INSTALL Jun 30, 2011
LICENSE.txt rename to chan_dongle May 11, 2011
Makefile.in remove duplicated in make dist May 27, 2011
README.txt change links to github (same as rev.46 from https://code.google.com/p… Apr 11, 2015
TODO.txt rename to chan_dongle May 11, 2011
app.c rename to chan_dongle May 11, 2011
app.h rename to chan_dongle May 11, 2011
at_command.c fix for K3765 (and other) USSD parse Aug 8, 2011
at_command.h rename to chan_dongle May 11, 2011
at_parse.c rename to chan_dongle May 11, 2011
at_parse.h rename to chan_dongle May 11, 2011
at_queue.c fix wrong sample of DongleSendSMS Jun 11, 2011
at_queue.h rename to chan_dongle May 11, 2011
at_read.c fix wrong sample of DongleSendSMS Jun 11, 2011
at_read.h rename to chan_dongle May 11, 2011
at_response.c fix RES_CPMS,"+CPMS" mistype Sep 25, 2016
at_response.h rename to chan_dongle May 11, 2011
chan_dongle.c make round_robin local variable of find_device_by_resource_ex() - UNT… Mar 1, 2015
chan_dongle.h make round_robin local variable of find_device_by_resource_ex() - UNT… Mar 1, 2015
channel.c fix Sparc loud noise problem #201 Sep 25, 2016
channel.h rename to chan_dongle May 11, 2011
char_conv.c update example of extensions.conf Jul 9, 2011
char_conv.h rename to chan_dongle May 11, 2011
cli.c fix for Issue 76: Text corrections for device statistics output May 13, 2012
cli.h rename to chan_dongle May 11, 2011
config.h.in rename to chan_dongle May 11, 2011
configure.in update lock file name in tools Jul 14, 2015
cpvt.c added CHANNEL(dtmf) reading and writing Jul 31, 2013
cpvt.h added CHANNEL(dtmf) reading and writing Jul 31, 2013
dc_config.c added CHANNEL(dtmf) reading and writing Jul 31, 2013
dc_config.h added CHANNEL(dtmf) reading and writing Jul 31, 2013
export.h rename to chan_dongle May 11, 2011
helpers.c rename to chan_dongle May 11, 2011
helpers.h rename to chan_dongle May 11, 2011
manager.c remove duplicated ActionID May 21, 2011
manager.h rename to chan_dongle May 11, 2011
memmem.c rename to chan_dongle May 11, 2011
memmem.h rename to chan_dongle May 11, 2011
mixbuffer.c rename to chan_dongle May 11, 2011
mixbuffer.h rename to chan_dongle May 11, 2011
mutils.h rename to chan_dongle May 11, 2011
pdiscovery.c added discovery for E171 21.xx : fix issue 73 Dec 28, 2012
pdiscovery.h rename to chan_dongle May 11, 2011
pdu.c update comments Jul 12, 2011
pdu.h rename to chan_dongle May 11, 2011
ringbuffer.c rename to chan_dongle May 11, 2011
ringbuffer.h rename to chan_dongle May 11, 2011
single.c rename to chan_dongle May 11, 2011
stamp-h.in rename to chan_dongle May 11, 2011

README.txt

--------------------------------------------------
chan_dongle channel driver for Huawei UMTS cards
--------------------------------------------------

WARNING:

This channel driver is in alpha stage.
I am not responsible if this channel driver will eat your money on
your SIM card or do any unpredicted things.

Please use a recent Linux kernel, 2.6.33+ recommended.
If you use FreeBSD, 8.0+ recommended.

This channel driver should work with the folowing UMTS cards:
* Huawei K3715
* Huawei E169 / K3520
* Huawei E155X
* Huawei E175X
* Huawei K3765

Check complete list in:
http://wiki.e1550.mobi/doku.php?id=requirements#list_of_supported_models

Before using the channel driver make sure to:

* Disable PIN code on your SIM card

Supported features:
* Place voice calls and terminate voice calls
* Send SMS and receive SMS
* Send and receive USSD commands / messages

Some useful AT commands:
AT+CCWA=0,0,1                                   #disable call-waiting
AT+CFUN=1,1                                     #reset dongle
AT^CARDLOCK="<code>"                            #unlock code
AT^SYSCFG=13,0,3FFFFFFF,0,3                     #modem 2G only, automatic search any band, no roaming
AT^U2DIAG=0                                     #enable modem function

Here is an example for the dialplan:

[dongle-incoming]
exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLENAME} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' >> /var/log/asterisk/sms.txt)
exten => sms,n,Hangup()

exten => ussd,1,Verbose(Incoming USSD: ${BASE64_DECODE(${USSD_BASE64})})
exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLENAME}: ${BASE64_DECODE(${USSD_BASE64})}' >> /var/log/asterisk/ussd.txt)
exten => ussd,n,Hangup()

exten => s,1,Dial(SIP/2001@othersipserver)
exten => s,n,Hangup()

[othersipserver-incoming]

exten => _X.,1,Dial(Dongle/r1/${EXTEN})
exten => _X.,n,Hangup

you can also use this:

Call using a specific group:
exten => _X.,1,Dial(Dongle/g1/${EXTEN})

Call using a specific group in round robin:
exten => _X.,1,Dial(Dongle/r1/${EXTEN})

Call using a specific dongle:
exten => _X.,1,Dial(Dongle/dongle0/${EXTEN})

Call using a specific provider name:
exten => _X.,1,Dial(Dongle/p:PROVIDER NAME/${EXTEN})

Call using a specific IMEI:
exten => _X.,1,Dial(Dongle/i:123456789012345/${EXTEN})

Call using a specific IMSI prefix:
exten => _X.,1,Dial(Dongle/s:25099203948/${EXTEN})

How to store your own number:

dongle cmd dongle0 AT+CPBS=\"ON\"
dongle cmd dongle0 AT+CPBW=1,\"+123456789\",145


Other CLI commands:

dongle reset <device>
dongle restart gracefully <device>
dongle restart now <device>
dongle restart when convenient <device>
dongle show device <device>
dongle show devices
dongle show version
dongle sms <device> number message
dongle ussd <device> ussd
dongle stop gracefully <device>
dongle stop now <device>
dongle stop when convenient <device>
dongle start <device>
dongle restart gracefully <device>
dongle restart now <device>
dongle restart when convenient <device>
dongle remove gracefully <device>
dongle remove now <device>
dongle remove when convenient <device>
dongle reload gracefully
dongle reload now
dongle reload when convenient

For reading installation notes please look to INSTALL file.

For additional information about Huawei dongle usage
look to chan_dongle Wiki at http://wiki.e1550.mobi
and chan_dongle project home at https://github.com/bg111/asterisk-chan-dongle/