[defaults]
; now you can set here any not required device settings as template
; sure you can overwrite in any [device] section this default values
context=dongle-incoming
group=0 ; calling group
rxgain=0 ; increase the incoming volume; may be negative
txgain=0 ; increase the outgoint volume; may be negative
autodeletesms=yes ; auto delete incoming sms
resetdongle=yes ; reset dongle during initialization with ATZ command
u2diag=-1 ; set ^U2DIAG parameter on device (0 = disable everything except modem function) ; -1 not use ^U2DIAG command
usecallingpres=yes ; use the caller ID presentation or not
callingpres=allowed_passed_screen ; set caller ID presentation by default use default network settings
disablesms=no ; disable of SMS reading from device when received
; chan_dongle has currently a bug with SMS reception. When a SMS gets in during a
; call chan_dongle might crash. Enable this option to disable sms reception.
; default = no
language=en ; set channel default language
smsaspdu=yes ; if 'yes' send SMS in PDU mode, feature implementation incomplete and we strongly recommend say 'yes'
mindtmfgap=45 ; minimal interval from end of previews DTMF from begining of next in ms
mindtmfduration=80 ; minimal DTMF tone duration in ms
mindtmfinterval=200 ; minimal interval between ends of DTMF of same digits in ms
callwaiting=auto ; if 'yes' allow incoming calls waiting; by default use network settings
; if 'no' waiting calls just ignored
disable=no ; OBSOLETED by initstate: if 'yes' no load this device and just ignore this section
initstate=start ; specified initial state of device, must be one of 'stop' 'start' 'remote'
; 'remove' same as 'disable=yes'
exten=+1234567890 ; exten for start incoming calls, only in case of Subscriber Number not available!, also set to CALLERID(ndid)
dtmf=relax ; control of incoming DTMF detection, possible values:
; off - off DTMF tones detection, voice data passed to asterisk unaltered
; use this value for gateways or if not use DTMF for AVR or inside dialplan
; inband - do DTMF tones detection
; relax - like inband but with relaxdtmf option
; default is 'relax' by compatibility reason
; dongle required settings
[dongle4]
audio=/dev/ttyUSB20 ; 3-3
data=/dev/ttyUSB19 ; 3-3
exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,Set(phone=${SHELL(echo ${CALLERID(num)} | sed -e 's/\+//g')})
exten => sms,n,Set(file=/var/log/asterisk/${phone})
exten => sms,n,NoOp(-----------${phone}--------)
exten => sms,n,System(echo "${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}" >> ${file})
exten => sms,n,System(echo "${DONGLEIMEI}" >> ${file})
exten => sms,n,System(echo "${DONGLEIMSI}" >> ${file})
exten => sms,n,System(echo "${CALLERID(num)}" >> ${file})
exten => sms,n,System(echo "${BASE64_DECODE(${SMS_BASE64})}" >> ${file})
exten => sms,n,Hangup()
host21*CLI> dongle cmd dongle4 AT+CMGL=4
[dongle4] 'AT+CMGL=4' Command queued for execute
[dongle4] Got Response for user's command:'+CMGL: 0,1,,23'
[Apr 14 23:49:34] NOTICE[8416]: at_response.c:1718 at_response: [dongle4] Got Response for user's command:'+CMGL: 0,1,,23'