Board logo

標題: 教程 - Using your spare USB 3G modem with Asterisk (SMS and Voice - In and Out) [打印本頁]

作者: ckleea    時間: 2011-3-31 22:15     標題: 教程 - Using your spare USB 3G modem with Asterisk (SMS and Voice - In and Out)

本帖最後由 ckleea 於 2011-5-13 19:41 編輯

與其讓你的手指退下來,不如物盡其用,駁上你的asterisk server 做多個FXO 口

注意:會可能有較多英文;需要有linux software compile experience,同裝linux package 經驗。

不過,相信是另一種方面實現voip 流動方案。

After some days of work, trial and errors, I am finally able to make it successful

I use a spare USB 3G modem to connect my asterisk 1.8 to do
1. Voice in and out (音質清晰)
- very clear (tested with bubblestar 兄 and others)

2. SMS in and out (短訊可打出打入)
- incoming to asterisk server - support Chinese and English; SMS can then forward to user by email
可以接受中英文短訊,然後經電郵轉發指定用戶
- outgoing - Only English message in asterisk command line
暫時只可以在asterisk CLI 發英文短訊

Future:
Waiting for frontend GUI program to do SMS

感謝:
雯雯借出手指試用
bubblestar 兄試通話quality
作者: ckleea    時間: 2011-3-31 22:16

本帖最後由 ckleea 於 2011-4-1 10:30 編輯

基本準備:

1. working asterisk server

2. centos 5.5 server with support kernel, I use 2.6.38. The latest centos 5.5 official kernel is 2.6.18 which is not able to work with voice part. 好多沙聲成者冇聲

http://elrepo.org/tiki/tiki-index.php

3. one supported huawei USB 3G modem

(I use K3715; E180 should work; E169G works with SMS only)
Full list of supported device is available below
http://wiki.e1550.mobi/doku.php?id=requirements


The following will tell you how to check your USB modem is SIMS unlocked and Voice enabled
http://www.hkepc.com/forum/viewt ... &extra=page%3D1

Tools
dc-unlocker http://www.dc-unlocker.com/
firmware & dashbroad files http://dc-files.com/

4. one working sims card
我用People 儲值 SIMS卡
唔需要3G SIMS,2G 已經足夠,因為目的是通話及短訊,不是用來上網。

參考網頁
1. http://www.telecom-cafe.com/foru ... 1&highlight=usb
2. http://www.telecom-cafe.com/foru ... &extra=page%3D1

圖片附件: supported devices.PNG (2011-4-1 03:46, 27.67 KB) / 下載次數 1042
http://telecom-cafe.com/forum/attachment.php?aid=620&k=ece03a7ccb2e5029c4bb09b449deda66&t=1732308489&sid=Que1WD


作者: ckleea    時間: 2011-3-31 22:16

本帖最後由 ckleea 於 2011-4-1 10:33 編輯

準備軟件 software

http://code.google.com/p/datacard/downloads/list

Download at
http://code.google.com/p/datacar ... gz&can=2&q=

If you want tor try other driver, there is one called Celliax.

http://www.voip-info.org/wiki/view/Celliax
I have tried to compile this but not ok because I am using asterisk 1.8 (not supported.

dc-unlocker to check your USB 3G modem's sims unlocked and voice function

VOIP client to test voice quality

My favorite is Zoiper and also Yate client

SSH to check the console status
Optional; but you need this for the setup.
作者: ckleea    時間: 2011-3-31 22:16

本帖最後由 ckleea 於 2011-4-1 10:34 編輯

Update kernel.

If you are using Centos OS, you are likley to use kernel 2.6.18. You need to prepare to update the kernel > 2.6.32 because there is problem in handling /dev/ttyUSB?

How to
1. you need to go this site
http://elrepo.org/tiki/tiki-index.php

Import the public key:
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org

To install ELRepo for RHEL-5, SL-5 or CentOS-5:
rpm -Uvh http://elrepo.org/elrepo-release-5-2.el5.elrepo.noarch.rpm

2. install the latest mainline kernel
yum --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel

注意:風險存在,需要自行平估

3. a reboot is required to load the new kernel. You may need to edit the grub.conf to default booting to the new kernel.

4. a recompilation of DAHDI is usually required after rebooting. Make sure you have the latest
i.e. dahdi-linux-complete-2.4.1+2.4.1

To obtain latest dahdi, type
  1. cd /usr/src/asterisk
  2. wget [url]http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz[/url]
  3. tar zxvf dahdi-linux-complete-current.tar.gz
  4. cd dahdi-linux-complete-2.4.1+2.4.1
  5. make; make install; make config;
  6. service dahdi restart
複製代碼

作者: ckleea    時間: 2011-3-31 22:17

本帖最後由 ckleea 於 2011-4-1 10:34 編輯

Download the latest chan_datacard driver from below
http://code.google.com/p/datacard/downloads/list

The latest is http://datacard.googlecode.com/files/chan_datacard-1.0.r310.tgz
  1. cd /usr/src/asteisk
  2. wget http://datacard.googlecode.com/files/chan_datacard-1.0.r310.tgz
  3. tar zxvf chan_datacard-1.0.r310.tgz
  4. cd chan_datacard-1.0.r310
  5. ./configure
  6. make
  7. make install
複製代碼

作者: ckleea    時間: 2011-3-31 22:17

本帖最後由 ckleea 於 2011-4-1 03:41 編輯

Create datacard.conf in /etc/asterisk
  1. [general]

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

  3. ;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
  4. ;jbenable = yes                 ; Enables the use of a jitterbuffer on the receiving side of a
  5.                                 ; Datacard channel. Defaults to "no". An enabled jitterbuffer will
  6.                                 ; be used only if the sending side can create and the receiving
  7.                                 ; side can not accept jitter. The Datacard channel can't accept jitter,
  8.                                 ; thus an enabled jitterbuffer on the receive Datacard side will always
  9.                                 ; be used if the sending side can create jitter.

  10. ;jbforce = no                   ; Forces the use of a jitterbuffer on the receive side of a Datacard
  11.                                 ; channel. Defaults to "no".

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

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

  17. ;jbimpl = fixed                 ; Jitterbuffer implementation, used on the receiving side of a Datacard
  18.                                 ; channel. Two implementations are currently available - "fixed"
  19.                                 ; (with size always equals to jbmaxsize) and "adaptive" (with
  20.                                 ; variable size, actually the new jb of IAX2). Defaults to fixed.

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

  27. ;jblog = no                     ; Enables jitterbuffer frame logging. Defaults to "no".
  28. ;-----------------------------------------------------------------------------------

  29. [defaults]
  30. ; now you can set here any not required device settings as template
  31. ; sure you can overwrite in any [device] section this default values

  32. context=datacard-incoming         ; context for incoming calls, SMS and USSD
  33. group=0                           ; calling group
  34. rxgain=3                          ; increase the incoming volume; may be negative
  35. txgain=-3                         ; increase the outgoint volume; may be negative
  36. autodeletesms=yes                 ; auto delete incoming sms
  37. resetdatacard=yes                 ; reset datacard during initialization with ATZ command
  38. u2diag=-1                         ; set ^U2DIAG parameter on device (0 = disable everything except modem function)
  39.                                       ; -1 not use ^U2DIAG command
  40. usecallingpres=yes                ; use the caller ID presentation or not
  41. callingpres=allowed_passed_screen ; set caller ID presentation. By default use default network settings
  42.                                            ; see http://www.the-asterisk-book.com/unstable/applikationen-setcallerpres.html
  43. disablesms=no                     ; disable of SMS reading from device when received. Enable this option to disable
  44.                                      ; sms reception. Use smsaspdu=yes to avoid problem when SMS is too long in TEXT mode.
  45. smsaspdu=1                        ; if 'yes' send SMS in PDU mode.
  46. language=UTF-8                    ; set channel default language
  47. mindtmfgap=45                     ; minimal interval from end of previews DTMF from begining of next in ms
  48. mindtmfduration=80                ; minimal DTMF tone duration in ms
  49. mindtmfinterval=200               ; minimal interval between ends of DTMF of same digits in ms

  50. callwaiting=yes                   ; if 'yes' allow incoming calls waiting; by default use network settings
  51.                                   ; if 'no' waiting calls just ignored
  52. disable=no                        ; if 'yes' no load this device and just ignore this section
  53. ;exten=+85267896789                ; exten for start incoming calls, only in case of Subscriber Number not available!,
  54.                                       ; also set to CALLERID(dnid)

  55. dtmf=inband                             ; control of incoming DTMF detection, possible values:
  56.                                      ;   off           - off DTMF tone detection, voice data passed to asterisk unaltered
  57.                                      ;              use this value for gateways or if you do not use IVR in diaplan
  58.                                       ;   inband - do DTMF tones detection
  59.                                       ;   relax  - like inband but with relaxdtmf option
  60.                                       ;  default is 'relax' for backward compatibility


  61. ; datacard required settings

  62. [datacard0]
  63. ;audio=/dev/hw-audio-0
  64. ;data=/dev/hw-data-0
  65. audio=/dev/ttyUSB1                ; tty port for audio connection;        
  66. data=/dev/ttyUSB2                 ; tty port for AT commands;

  67. exten=+85267896789

  68. ; or you can omit both audio and data parameters and use imei=123456789012345 and/or imsi=612849384756451
  69. ; imei and imsi must contain exactly 15 digits !
  70. ; imei/imsi discovery is available on Linux only

  71. ; K3715       
  72. imei=123456789012345
  73. imsi=612849384756451


  74. ; if you set audio and data parameter together with imei and/or imsi, audio and data is used.
  75. ; you can use both imei and imsi together. In this case exact match by imei and imsi is required.
  76. ;

  77. ;[datacard1]
  78. ;audio=/dev/ttyUSB4                ; tty port for audio connection;        
  79. ;data=/dev/ttyUSB5                 ; tty port for AT commands;  

  80. ; K3715       
  81. ;imei=
  82. ;imsi=

  83. ;[datacard2]
  84. ;audio=/dev/ttyUSB7                ; tty port for audio connection;        
  85. ;data=/dev/ttyUSB8                 ; tty port for AT commands;

  86. ; E169G
  87. ;imei=
  88. ;imsi=
複製代碼
create the datacard_extensions.conf
  1. [datacard-incoming]
  2. include => datacard-incoming-sms
  3. include => datacard-incoming-ussd
  4. exten => +85267896789,1,Answer()
  5. exten => +85267896789,n,GotoIf($[${CALLERID(num)} = 91234567]?Kwong-call)
  6. exten => +85267896789,n,Playback(number-not-answering)
  7. exten => +85267896789,n,Playback(vm-goodbye)
  8. exten => +85267896789,n,Hangup()
  9. exten => +85267896789,n(Kwong-call),GoTO(default,1001,1)
  10. exten => +85267896789,n,Hangup()

  11. [datacard-incoming-sms]
  12. exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
  13. exten => sms,n,Set(GLOBAL(isms)=/var/log/asterisk/sms/incoming/sms-${STRFTIME(${EPOCH},Hongkong,%G%m%d-%H%M%S)}.txt)
  14. exten => sms,n,System(echo '${STRFTIME(${EPOCH},Hongkong,%Y-%m-%d %H:%M:%S)} - ${DATACARD} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' > ${isms})
  15. exten => sms,n,System(smtp-cli --from recipientemail --to senderemail --subject "You got a new SMS " --attach ${isms} --host=smtphost --user=username --pass=password)
  16. exten => sms,n,Hangup()

  17. [datacard-incoming-ussd]
  18. exten => ussd,1,Noop(Incoming USSD: ${BASE64_DECODE(${USSD_BASE64})})
  19. exten => ussd,n,Set(GLOBAL(iussd)=/var/log/asterisk/sms/incoming/ussd-${STRFTIME(${EPOCH},Hongkong,%C%y%m%d%H%M)}.txt)
  20. exten => ussd,n,System(echo '${STRFTIME(${EPOCH},Hongkong,%Y-%m-%d %H:%M:%S)} - ${DATACARD} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' > ${iussd})
  21. exten => ussd,n,System(smtp-cli --from recipientemail --to senderemail --subject "You got a new SMS " --attach ${iussd} --host=smtphost --user=username --pass=password)
  22. exten => ussd,n,Hangup()
複製代碼
add this
#include "datacard_extensions.conf"

to [globals] of extensions.conf

add a dialplan for outgoing call in extensions.conf e.g.
  1. ;dial-out via 3G Modem
  2. [CallingRule_3GModem]
  3. exten => _82.,1,Dial(Datacard/datacard0/${EXTEN:2})
  4. exten => _82.,n,Hangup()
  5. ;exten => _82.,1,Macro(superdial,Datacard/g0/852${EXTEN:2})
  6. ;exten => _82.,2,Macro(superdial,SIP/pstn-spa3k-d1/${EXTEN:2})
複製代碼

作者: ckleea    時間: 2011-3-31 22:17

本帖最後由 ckleea 於 2011-4-1 03:47 編輯

Datacard command in asterisk cli

          datacard callwaiting Enable/Disable Call-Waiting on the datacard
                  datacard cmd Send commands to port for debugging
               datacard reload Reload datacard
               datacard remove Remove datacard
                datacard reset Reset datacard now
              datacard restart Restart datacard
datacard show device settings Show Datacard device settings
    datacard show device state Show Datacard device state
datacard show device statistic Show Datacard device statistics
         datacard show devices Show Datacard devices state
         datacard show version Show module version
                  datacard sms Send SMS from the datacard
                datacard start Start datacard
                 datacard stop Stop datacard
                 datacard ussd Send USSD commands to the datacard
作者: ckleea    時間: 2011-3-31 22:18

本帖最後由 ckleea 於 2011-4-1 03:49 編輯

How to send an SMS from asterisk cli

datacard sms datacard[0] recipientphone message
e.g. datacard sms datacard0 85291234567 Hello, it is a successful test of SMS sent from asterisk.

Within few seconds, mobile phone will receive the above SMS
作者: ckleea    時間: 2011-3-31 22:18

本帖最後由 ckleea 於 2011-4-1 14:18 編輯

其他 driver
1. celliax
下面的 link 教點樣裝
http://ngoinabox.mahiti.org/howt ... lliax-with-centos53
作者: ckleea    時間: 2011-3-31 22:18

本帖最後由 ckleea 於 2011-4-2 06:36 編輯

Examples of SMS received

They are from the operator

2011-04-02 05:46:24 - datacard0 - 85262264644: Sorry, your handset cannot be configured/updated for DATA settings. Please refer to the following APN: GPRS&streaming(peoples.net),MMS(peoples.mms)

2011-04-02 05:50:42 - datacard0 - 85262264644: 閣下之手機未能正確安裝/更新設定,請參考以下接入點:GPRS&streaming(peoples.net),MMS(peoples.mms)
作者: TsinTsin    時間: 2011-4-1 01:04

呢個正啊,賣得錢咯野值得學
"GUI send SMS" 用個 app/web 去call Asterisk Manager API(AMI) 應該做到

我都開左 .net project 研究緊用個 App 去call AMI 做野,用Java、PHP都得~仲多好多sources,不過功課限制一定要C#
作者: 電腦超人    時間: 2011-4-1 01:19

我比較期待可以SMS callback...
因為有不少國家/地區的電話是單向收費的...
只要發一個短訊(或國際短訊)...便可以低廉(甚至免費!)的價格去自建callback services...
比用漫遊的Callback廉宜不少呢...
而且這樣也不需要當地網絡/3G連線...通話質素可能會更好一點呢~
作者: Qnewbie    時間: 2011-4-1 01:41

回復 12# 電腦超人


    Some VSPs provide WAP callback.
作者: 電腦超人    時間: 2011-4-1 01:54

回復  電腦超人


    Some VSPs provide WAP callback.
Qnewbie 發表於 2011-4-1 01:41

但係唔係個個地區既SIM card提供上網服務...
作者: ckleea    時間: 2011-4-1 02:51

本帖最後由 ckleea 於 2011-4-1 10:36 編輯

回復 12# 電腦超人

這個可以做到。因為可以對callerID number,用AGI programming去完成。

e.g.
exten => sms,n,System(echo '${STRFTIME(${EPOCH},Hongkong,%Y-%m-%d %H:%M:%S)} - ${DATACARD} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' > ${isms})

need to parse ${CALLERID(num) and ${BASE64_DECODE(${SMS_BASE64})} to AGI for processing
作者: ckleea    時間: 2011-4-1 02:52

回復 11# TsinTsin


    期待指教。
作者: ckleea    時間: 2011-4-1 14:13

網上有人一齊用13 支手指!
作者: bubblestar    時間: 2011-4-3 11:43

From /var/log/asterisk/messages, I got the following warning.

WARNING[3573] chan_datacard.c: unable to open /dev/ttyUSB2: Bad file descriptor

Any ideas?
作者: ckleea    時間: 2011-4-3 13:28

You have not put in the USB stick.
作者: bubblestar    時間: 2011-4-3 15:09

I think so.
作者: ckleea    時間: 2011-4-3 16:35

Try to get a USB stick to test E180 or K3715
作者: ckleea    時間: 2011-4-28 09:29

The frontend GUI has been released but I am not able to make it work

screenshot.6.jpg

I got this error

ERROR[18237]: chan_datacard.c:422 do_monitor_phone: [datacard0] timedout while waiting 'OK' in response to 'SMSTEXT'

圖片附件: screenshot.6.jpg (2011-4-28 09:28, 115.35 KB) / 下載次數 925
http://telecom-cafe.com/forum/attachment.php?aid=704&k=2a3f7ef8f5f91400967ca48ec05ce12e&t=1732308489&sid=Que1WD


作者: bubblestar    時間: 2011-4-30 22:56

多謝 ckleea 兄的協助及指導,今天已成功在Asterisk 之內整合了 K3715 USB stick,並可以:

1. 利用USB stick 以extension撥出PSTN 電話
2. 利用USB stick 接入PSTN 至指定 extension
3. 利用USB stick 於Asterisk 發出 SMS
4. 利用USB stick 於Asterisk 接收 SMS
5. 利用USB stick 於Asterisk 接收 SMS 再 SMS to Email

今天收獲非常豐富,再進一步擴大Asterisk 的使用功能。
作者: ckleea    時間: 2011-4-30 23:02

回復 23#

就是這樣,現在用最簡單方法,將USB 手指轉成asterisk 的FXO,雖然還比銅線固網貴,但作為後備FXO都唔錯。如果香港D mobile 可以打入唔使俾錢就最好。
作者: bubblestar    時間: 2011-5-1 10:44

本帖最後由 bubblestar 於 2011-5-1 12:31 編輯

Some useful Datacard CLI commands:


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


For example, we can get Provider Name, Model, IMEI and IMSI number of our USB stick by typing:

CLI > datacard show devices

Datacard show devices.png

圖片附件: Datacard show devices.png (2011-5-1 10:50, 4.79 KB) / 下載次數 884
http://telecom-cafe.com/forum/attachment.php?aid=706&k=a7dd90d75bbaef91333aabb0e7b8f33f&t=1732308489&sid=Que1WD


作者: 雯雯    時間: 2011-5-2 13:27

回復 24# ckleea

如果可以做到同時用來3G上網就更加好!
作者: ckleea    時間: 2011-5-2 14:01

Not possible
作者: 角色    時間: 2011-5-2 15:03

I believe the technology avaliable should be okay but we do not know the requried technology and do not know how to do it.

I guess one day ckleea tells us he is able to do so.

YH
作者: 角色    時間: 2011-5-2 15:03

I believe the technology avaliable should be okay but we do not know the requried technology and do not know how to do it.

I guess one day ckleea tells us he is able to do so.

YH
作者: ckleea    時間: 2011-5-2 15:04

回復 29# 角色


    I also hope so
作者: bubblestar    時間: 2011-5-2 16:10

本帖最後由 bubblestar 於 2011-5-2 16:12 編輯

使用了一兩天,發覺用Nokia E71 3G 撥打 K3715 USB stick 2G 時,它們之間使用了很少人用的Codec slin,因為連接至接通之間,在CLI 發現大量,差不多有成百個以上 Warning,雖然不會影響通話,但始終很礙眼。

Asked to transmit frame type slin, while native formats is 0x4 (ulaw) red/write = 0x4 (ulaw)/0x4 (ulaw)

slin_flooding.png


不想看到這些Warning Floods,解決辦法是到sip.conf 的相關內線中或在 [general] 之中加入

allow = ulaw
allow = alaw
allow = gsm                                                       
allow = g729
allow = slin

之後CLI 中再沒發現Warning 了。

圖片附件: slin_flooding.png (2011-5-2 16:04, 67.25 KB) / 下載次數 849
http://telecom-cafe.com/forum/attachment.php?aid=708&k=63843a7002eb804a8cc9d6f5ef4e38bb&t=1732308489&sid=Que1WD


作者: bubblestar    時間: 2011-5-2 16:18

本帖最後由 bubblestar 於 2011-5-2 16:22 編輯

CKleea C-Hing,

Grateful if you could share your IVR settings in extensions.conf as I cannot further process dialing even I can reach my IVR dialing menu.  It seems my USB stick cannot recognize (食不到) the DTMF signals from PSTN or Nokia E71 mobile phone.

I guess it might be something related to codec translation again.  No ideas but I know you did it successfully.


For information, my Nokia E71 mobile over 3G can dial into the same Asterisk IVR menu using VoIP and further process to other internal/external destination without problem.
作者: ckleea    時間: 2011-5-2 16:35

回復 31# bubblestar


    I found the same warnings. Thanks for sharing
作者: ckleea    時間: 2011-5-2 17:04

回復 32# bubblestar


    Sometimes work, sometimes not working. iPhone seems better
作者: ckleea    時間: 2011-5-2 17:34

回復 29# 角色


    You may try this

http://www.techonia.com/install-huawei-usb-modem-centos
作者: ckleea    時間: 2011-5-2 20:34

回復 28# 角色


    YH, E1550 is supported modem for voice and SMS
作者: alang    時間: 2011-5-9 11:27

The frontend GUI has been released but I am not able to make it work
I got this error
ERROR[1823 ...
ckleea 發表於 2011-4-28 09:29


請問這個 GUI 是哪一套軟體?是 Web-based?
作者: ckleea    時間: 2011-5-9 13:08

Yes, web based program using asterisk - java and php.
作者: 雯雯    時間: 2011-5-13 17:27

剛剛發現標題有問題!

Using your spare USG 3G modem with Asterisk (SMS and Voice - In and Out)
作者: ckleea    時間: 2011-5-13 19:53

回復 39# 雯雯


    已更新,謝謝。
作者: ckleea    時間: 2011-5-13 23:59

An updated driver called chan_dongle is now available for test.

I can compile and load into asterisk
作者: bubblestar    時間: 2011-5-14 12:30

Do we need to remove/uninstall chan_datacard before compilation and how is the performance?
作者: ckleea    時間: 2011-5-14 12:35

回復 42# bubblestar


I have not yet tried last night. What I have tested are
1. the original version not able to compile under centos
2. a revised version came out on the next day
3. it can be compiled under centos 5.6 and loaded successfully by my asterisk server
4. the USB stick is shown up properly.
5. I unload the chan_datacard.so module and test on this.
6. will test further if I have time.
作者: ckleea    時間: 2011-5-14 12:51

回復 41# ckleea

Some screenshot
[May 14 12:41:24] NOTICE[21609]: chan_datacard.c:1512 reload_config: [datacard0] Loaded device
  == Registered channel type 'Datacard' (Datacard Channel Driver)
    -- [datacard0] Trying to connect on /dev/ttyUSB2...
  == Registered application 'DatacardStatus'
  == Registered application 'DatacardSendSMS'
  == Manager registered action DatacardShowDevices
  == Manager registered action DatacardSendUSSD
  == Manager registered action DatacardSendSMS
  == Manager registered action DatacardSetCCWA
  == Manager registered action DatacardReset
  == Manager registered action DatacardRestart
  == Manager registered action DatacardStop
  == Manager registered action DatacardStart
  == Manager registered action DatacardRemove
  == Manager registered action DatacardReload
Loaded chan_datacard.so => (Datacard Channel Driver)


[May 14 12:42:07] NOTICE[22075]: chan_dongle.c:1556 reload_config: [dongle0] Loaded device
  == Registered channel type 'Dongle' (Huawei 3G Dongle Channel Driver)
    -- [dongle0] Trying to connect on /dev/ttyUSB2...
  == Registered application 'DongleStatus'
  == Registered application 'DongleSendSMS'
  == Manager registered action DongleShowDevices
  == Manager registered action DongleSendUSSD
  == Manager registered action DongleSendSMS
  == Manager registered action DongleSendPDU
  == Manager registered action DongleSetCCWA
  == Manager registered action DongleReset
  == Manager registered action DongleRestart
  == Manager registered action DongleStop
  == Manager registered action DongleStart
  == Manager registered action DongleRemove
  == Manager registered action DongleReload
Loaded chan_dongle.so => (Huawei 3G Dongle Channel Driver)


ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
dongle0      0     Free       21   0    0       CMCC PEOPLES   K3715      11.113.03.00.00   3534xxxxxxx39  4541xxxxxxx2294  +8526xxxxxxx
作者: ckleea    時間: 2011-5-26 22:57

I use 2 USB modem to test out

screenshot.26-05-2011 22.46.51.png

圖片附件: screenshot.26-05-2011 22.46.51.png (2011-5-26 22:57, 50.32 KB) / 下載次數 1013
http://telecom-cafe.com/forum/attachment.php?aid=759&k=f6520c79a512635b3296f770038589c7&t=1732308489&sid=Que1WD


作者: ckleea    時間: 2011-5-26 22:57

I have fixed the SMS can't send problem by editing the SMS service center number to HK
作者: bubblestar    時間: 2011-6-13 14:26

The front-end zMessage is finally installed and works.  Both incoming and outgoing SMS can now be handle in GUI without the need to operate in Asterisk CLI.

BTW, I would like to report that Internet Explorer is not 100% compatible with zMessage while Firefox is preferable.

Thanks again for ckleea C-Hing's help and advice so that I can get it done smoothly.
作者: ckleea    時間: 2011-6-17 08:41

回復 11# TsinTsin


見你已經有一個.net project for web call,請問SMS project 會否出現?自己唔識使用你的 sample code,會否做一個 PHP codes?
作者: Qnewbie    時間: 2011-6-26 01:08

Could we use USB stick to share internet too? I am thinking of some 3G mobile plans include limited/unlimited local data.
作者: ckleea    時間: 2011-6-26 06:45

回復 49# Qnewbie

I have not explored but seem it may. However, you may need to use another way not directly integrate with asterisk.
作者: ckleea    時間: 2011-6-26 07:56

Some one mentioned the use of kannel to send SMS but I doubt if you can use Internet, voice and SMS at the same time.  I personally still think it is far more simple to use asterisk on a Linux server.
作者: Qnewbie    時間: 2011-6-26 13:49

I think you are right. The integration with internet sharing isn't an objective for asterisk.
作者: ckleea    時間: 2011-6-26 13:59

回復 52# Qnewbie

perhaps, if one can develop drivers for access the same USB ports by different apps at the same time, it may work.
作者: 角色    時間: 2013-9-20 10:42

原来CK早在2011年就可以专研Data Card,现在叫Data Dongle。我角色到今天才慢慢爬!
作者: ckleea    時間: 2013-9-20 15:58

I tried a lot of things at that time but not as experienced as you were
作者: fatfish    時間: 2013-9-23 08:54

这个技术很让人向往
但是对我等技术盲来说有点难

作者: wochinaren123    時間: 2013-9-23 12:58

提示: 作者被禁止或刪除 內容自動屏蔽
作者: 角色    時間: 2013-10-27 00:24

There are more information for Huawei 3G modem

http://wiki.e1550.mobi/doku.php
作者: 角色    時間: 2013-10-27 00:51

The source code for asterisk data dongle could be obtainable in the following path:

https://code.google.com/p/asterisk-chan-dongle/
作者: 角色    時間: 2013-10-30 01:16

回復 23# bubblestar

Examples code在哪里?




歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2