| 本帖最後由 角色 於 2013-11-3 23:17 編輯 
 In order to get the system work, you have to add/modify the following variables in /etc/asterisk/dongle.conf
 
 Listing 1
 In /etc/asterisk/dongle.conf複製代碼[defaults]
context = DID_3Gdongle0    (This context will be used in Asterisk-GUI)
.
.
.
exten = +852RRRRSSSS  (SIM card telephone number)
[dongle0]
imei = XXXXXXXXX453218 (the IMEI code of the SIM card)
imsi = YYYYYYYYY232505 (the IMSI code of the SIM card)
 
 Listing 2
 The the following /etc/asterisk/users.conf was created by Asterisk-GUI and modified by hand複製代碼;!
;! Automatically generated configuration file
;! Filename: dongle.conf (/etc/asterisk/dongle.conf)
;! Generator: Manager
;! Creation Date: Sun Nov  3 19:15:14 2013
;!
[general]
interval = 15  ; Number of seconds between trying to connect to devices
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
;jbenable = yes                 ; Enables the use of a jitterbuffer on the receiving side of a
; Dongle channel. Defaults to "no". An enabled jitterbuffer will
; be used only if the sending side can create and the receiving
; side can not accept jitter. The Dongle channel can't accept jitter,
; thus an enabled jitterbuffer on the receive Dongle side will always
; be used if the sending side can create jitter.
;jbforce = no                   ; Forces the use of a jitterbuffer on the receive side of a Dongle
; channel. Defaults to "no".
;jbmaxsize = 200                ; Max length of the jitterbuffer in milliseconds.
;jbresyncthreshold = 1000       ; Jump in the frame timestamps over which the jitterbuffer is
; resynchronized. Useful to improve the quality of the voice, with
; big jumps in/broken timestamps, usually sent from exotic devices
; and programs. Defaults to 1000.
;jbimpl = fixed                 ; Jitterbuffer implementation, used on the receiving side of a Dongle
; channel. Two implementations are currently available - "fixed"
; (with size always equals to jbmaxsize) and "adaptive" (with
; variable size, actually the new jb of IAX2). Defaults to fixed.
;jbtargetextra = 40             ; This option only affects the jb when 'jbimpl = adaptive' is set.
; The option represents the number of milliseconds by which the new jitter buffer
; will pad its size. the default is 40, so without modification, the new
; jitter buffer will set its size to the jitter value plus 40 milliseconds.
; increasing this value may help if your network normally has low jitter,
; but occasionally has spikes.
;jblog = no                     ; Enables jitterbuffer frame logging. Defaults to "no".
;-----------------------------------------------------------------------------------
[defaults]
context = DID_3Gdongle0
group = 0
rxgain = 0
txgain = 0
autodeletesms = yes
resetdongle = yes
u2diag = -1
usecallingpres = yes
callingpres = allowed_passed_screen
disablesms = no
language = en
smsaspdu = yes
mindtmfgap = 45
mindtmfduration = 80
mindtmfinterval = 200
callwaiting = auto
disable = no
initstate = start
exten = +852RRRRSSSS
dtmf = relax
;   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
[dongle0]
audio = /dev/ttyUSB1  ; tty port for audio connection;  no default value
data = /dev/ttyUSB2  ; tty port for AT commands;                no default value
; or you can omit both audio and data together and use imei=123456789012345 and/or imsi=123456789012345
;  imei and imsi must contain exactly 15 digits !
;  imei/imsi discovery is available on Linux only
;imei=123456789012345
;imsi=123456789012345
imei = XXXXXXXXX453218
imsi = YYYYYYYYY232505
; if audio and data set together with imei and/or imsi audio and data has precedence
;   you can use both imei and imsi together in this case exact match by imei and imsi required
 Listing 3
 The listing 4 (/etc/asterisk/extensions.conf) was first initialised by Asterisk-GUI and modified by hand複製代碼[3Gdongle0]
trunkname = 3Gdongle0
context = DID_3Gdongle0
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = yes
trunkstyle = voip
disallow = all
allow = all
 Listing 4
 複製代碼[CallingRule_Dongle0]
;exten = _82X.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${EXTEN:2},,trunk_1,)
exten = _82X.,1,Dial(Dongle/dongle0/${EXTEN:2})
exten = _82X.,2,Hangup()
 |