返回列表 發帖
The next question may be the search of a low-powered 3G modem which could be easily powered up by general 500mA 5V supply.

TOP

For plain Asterisk server, we can easily apply the settings for chan_dongle. However, if we use Asterisk-GUI, it is extremely to add dongle channel.

TOP

我在想,有些人不会APL,只会用GUI click click吓!

看来要想想办法。

TOP

回復 47# SuiYan

Are you able to send SMS to other mobile phone number. For reference, there is an example to illustrate the task.

http://www.telecom-cafe.com/foru ... =5958&pid=35862

TOP

Finally I was able to set up 3G modem (both outbound and inbound calls) using a light editing process and then the rest of tasks could be done by the Asterisk-GUI.

TOP

For your reference, I attached two screen captures as shown below:

1085a.gif

1085b.gif

TOP

Please make sure that you are able to see /dev/ttyU* as shown below:

1086.gif

TOP

本帖最後由 角色 於 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
  1. [defaults]
  2. context = DID_3Gdongle0    (This context will be used in Asterisk-GUI)
  3. .
  4. .
  5. .
  6. exten = +852RRRRSSSS  (SIM card telephone number)


  7. [dongle0]
  8. imei = XXXXXXXXX453218 (the IMEI code of the SIM card)
  9. imsi = YYYYYYYYY232505 (the IMSI code of the SIM card)
複製代碼
In /etc/asterisk/dongle.conf


Listing 2
  1. ;!
  2. ;! Automatically generated configuration file
  3. ;! Filename: dongle.conf (/etc/asterisk/dongle.conf)
  4. ;! Generator: Manager
  5. ;! Creation Date: Sun Nov  3 19:15:14 2013
  6. ;!
  7. [general]

  8. interval = 15  ; Number of seconds between trying to connect to devices

  9. ;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
  10. ;jbenable = yes                 ; Enables the use of a jitterbuffer on the receiving side of a
  11. ; Dongle channel. Defaults to "no". An enabled jitterbuffer will
  12. ; be used only if the sending side can create and the receiving
  13. ; side can not accept jitter. The Dongle channel can't accept jitter,
  14. ; thus an enabled jitterbuffer on the receive Dongle side will always
  15. ; be used if the sending side can create jitter.

  16. ;jbforce = no                   ; Forces the use of a jitterbuffer on the receive side of a Dongle
  17. ; channel. Defaults to "no".

  18. ;jbmaxsize = 200                ; Max length of the jitterbuffer in milliseconds.

  19. ;jbresyncthreshold = 1000       ; Jump in the frame timestamps over which the jitterbuffer is
  20. ; resynchronized. Useful to improve the quality of the voice, with
  21. ; big jumps in/broken timestamps, usually sent from exotic devices
  22. ; and programs. Defaults to 1000.

  23. ;jbimpl = fixed                 ; Jitterbuffer implementation, used on the receiving side of a Dongle
  24. ; channel. Two implementations are currently available - "fixed"
  25. ; (with size always equals to jbmaxsize) and "adaptive" (with
  26. ; variable size, actually the new jb of IAX2). Defaults to fixed.

  27. ;jbtargetextra = 40             ; This option only affects the jb when 'jbimpl = adaptive' is set.
  28. ; The option represents the number of milliseconds by which the new jitter buffer
  29. ; will pad its size. the default is 40, so without modification, the new
  30. ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
  31. ; increasing this value may help if your network normally has low jitter,
  32. ; but occasionally has spikes.

  33. ;jblog = no                     ; Enables jitterbuffer frame logging. Defaults to "no".
  34. ;-----------------------------------------------------------------------------------

  35. [defaults]
  36. context = DID_3Gdongle0
  37. group = 0
  38. rxgain = 0
  39. txgain = 0
  40. autodeletesms = yes
  41. resetdongle = yes
  42. u2diag = -1
  43. usecallingpres = yes
  44. callingpres = allowed_passed_screen
  45. disablesms = no
  46. language = en
  47. smsaspdu = yes
  48. mindtmfgap = 45
  49. mindtmfduration = 80
  50. mindtmfinterval = 200
  51. callwaiting = auto
  52. disable = no
  53. initstate = start
  54. exten = +852RRRRSSSS
  55. dtmf = relax




  56. ;   off    - off DTMF tones detection, voice data passed to asterisk unaltered
  57. ;              use this value for gateways or if not use DTMF for AVR or inside dialplan
  58. ;   inband - do DTMF tones detection
  59. ;   relax  - like inband but with relaxdtmf option
  60. ;  default is 'relax' by compatibility reason

  61. ; dongle required settings
  62. [dongle0]
  63. audio = /dev/ttyUSB1  ; tty port for audio connection;  no default value
  64. data = /dev/ttyUSB2  ; tty port for AT commands;                no default value

  65. ; or you can omit both audio and data together and use imei=123456789012345 and/or imsi=123456789012345
  66. ;  imei and imsi must contain exactly 15 digits !
  67. ;  imei/imsi discovery is available on Linux only
  68. ;imei=123456789012345
  69. ;imsi=123456789012345
  70. imei = XXXXXXXXX453218
  71. imsi = YYYYYYYYY232505
  72. ; if audio and data set together with imei and/or imsi audio and data has precedence
  73. ;   you can use both imei and imsi together in this case exact match by imei and imsi required
複製代碼
The the following /etc/asterisk/users.conf was created by Asterisk-GUI and modified by hand

Listing 3
  1. [3Gdongle0]
  2. trunkname = 3Gdongle0
  3. context = DID_3Gdongle0
  4. hasexten = no
  5. hasiax = no
  6. hassip = yes
  7. registeriax = no
  8. registersip = yes
  9. trunkstyle = voip
  10. disallow = all
  11. allow = all
複製代碼
The listing 4 (/etc/asterisk/extensions.conf) was first initialised by Asterisk-GUI and modified by hand

Listing 4
  1. [CallingRule_Dongle0]
  2. ;exten = _82X.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${EXTEN:2},,trunk_1,)
  3. exten = _82X.,1,Dial(Dongle/dongle0/${EXTEN:2})
  4. exten = _82X.,2,Hangup()
複製代碼

TOP

回復 56# SuiYan

Very good! The next task is the voice calls.

TOP

回復 59# SuiYan

I have already modified the post accordingly. Please take a look.

TOP

你用Asterisk-GUI吗?

TOP

是否没有做port forwarding?

TOP

回復 68# ckleea

3A?那么高的电流? 哪个牌子呢?

TOP

你想的是可行!但是还别的方法的,就是SIP Trunk(北京、上海、广州ET263大号),还有香港多家的SIP Trunk,那么大家具可以连起来,再加上WiFi的话就更加方便。你要咋打就咋打!

整个方法就用一个红莓就可以。不知道是否能回答你的问题呢?

TOP

那么没有办法,那么你只可以,reboot,还有NAT=yes,no都试试看。

TOP

返回列表