2008年6月30日 星期一
Debug mode DTMF open
/etc/asterisk/logger.conf
messages => notice,warning,error,dtmf
logs saved at:
/var/log/asterisk/messages
Debug for E1
/etc/asterisk/logger.conf
messages => notice,warning,error,dtmf
logs saved at:
/var/log/asterisk/messages
2008年6月27日 星期五
G.729 & G.723 codec translation
2. Copy to:
cp codec_723.so codec_729.so /usr/lib/asterisk/modules/
3. change properties:
chmod 755 codec_g723.so
chmod 755 codec_g729.so
chown root codec_g723.so
chown root codec_g729.so
chgrp root codec_g723.so
chgrp root codec_g729.so
4. restart the asterisk or whole system
5. recheck:
sudo asterisk -rx core show translation
2008年6月26日 星期四
Connection Guideline of VIT1/E1 and PBX E1/T1 module
I. Pinouts of VIT1/E1:
Pin | Signal |
1 | Rx, ring, - |
2 | Rx, tip, + |
4 | Tx, ring, - |
5 | Tx, tip, + |
II. Straight cable pinout:
1. RJ48/45 (VIT1/E1) to RJ48/45 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 1 | Rx, ring, - |
2 | 2 | Rx, tip, + |
4 | 4 | Tx, ring, - |
5 | 5 | Tx, tip, + |
3 | 3 | Shield/return/ground |
6 | 6 | Shield/return/ground |
2. RJ48/45 (VIT1/E1) to DB-15 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 11 | Rx, ring, - |
2 | 3 | Rx, tip, + |
4 | 9 | Tx, ring, - |
5 | 1 | Tx, tip, + |
3 | 4 | Shield/return/ground |
6 | 2 | Shield/return/ground |
III. Crossover cable pinout:
1. RJ48/45 (VIT1/E1) to RJ48/45 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 4 | Rx, ring ,- === Tx, ring, - |
2 | 5 | Rx, tip, + === Tx, tip, + |
4 | 1 | Tx, ring, - === Rx, ring, - |
5 | 2 | Tx, tip, + === Rx, tip, + |
3 | 3 | Shield/return/ground |
6 | 6 | Shield/return/ground |
2. RJ48/45 (VIT1/E1) to DB-15 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 9 | Rx, ring , - === Tx, ring, - |
2 | 1 | Rx, tip, + === Tx, tip, + |
4 | 11 | Tx, ring, - === Rx, ring, - |
5 | 3 | Tx, tip, + === Rx, tip, + |
3 | 4 | Shield/return/ground |
6 | 2 | Shield/return/ground |
T1/E1 PinOuts
Pin | Signal |
1 | Rx, ring, - |
2 | Rx, tip, + |
4 | Tx, ring, - |
5 | Tx, tip, + |
II.
Straight cable pinout:
1.
RJ48/45 (VIT1/E1) to RJ48/45 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 1 | Rx, ring, - |
2 | 2 | Rx, tip, + |
4 | 4 | Tx, ring, - |
5 | 5 | Tx, tip, + |
3 | 3 | Shield/return/ground |
6 | 6 | Shield/return/ground |
2.
RJ48/45 (VIT1/E1) to DB-15 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 11 | Rx, ring, - |
2 | 3 | Rx, tip, + |
4 | 9 | Tx, ring, - |
5 | 1 | Tx, tip, + |
3 | 4 | Shield/return/ground |
6 | 2 | Shield/return/ground |
III. Crossover cable pinout:
1.
RJ48/45 (VIT1/E1) to RJ48/45 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 4 | Rx, ring ,- 1 Tx, ring, - |
2 | 5 | Rx, tip, + 1 Tx, tip, + |
4 | 1 | Tx, ring, - 1 Rx, ring, - |
5 | 2 | Tx, tip, + 1 Rx, tip, + |
3 | 3 | Shield/return/ground |
6 | 6 | Shield/return/ground |
2.
RJ48/45 (VIT1/E1) to DB-15 (PBX E1/T1 module)
Pin (on VIT1/E1) | Pin (on PBX E1/T1 module) | Signal |
1 | 9 | Rx, ring , - 1 Tx, ring, - |
2 | 1 | Rx, tip, + 1 Tx, tip, + |
4 | 11 | Tx, ring, - 1 Rx, ring, - |
5 | 3 | Tx, tip, + 1 Rx, tip, + |
3 | 4 | Shield/return/ground |
6 | 2 | Shield/return/ground |
2008年6月24日 星期二
How to play and record voice by using Lexis30
更改讀取權限(否則這兩個資料夾無法讀取)
sudo chmod -R 777 /var/lib/asterisk/sounds
sudo chmod -R 777 /var/spool/asterisk/monitor
將要撥放的檔案放入 /var/lib/asterisk/sounds
錄好的檔案會放在 /var/spool/asterisk/monitor
在extensions.conf裡新增一個context[testnewout]
skype端錄音配置成
exten => _X.,1,Wait(9)
exten => _X.,n,SendDtmf(${EXTEN})
exten => _X.,n,NoOp(${EXTEN})
exten => _X.,n,Wait(1)
exten => _X.,n,Monitor(wav,${EXTEN})
exten => _X.,n(play),Wait(10)
exten => _X.,n,Goto(play)
skype 放音 配置成
exten => _X.,1,Wait(9)
exten => _X.,n,SendDtmf(${EXTEN})
exten => _X.,n,NoOp(${EXTEN})
exten => _X.,n,Wait(1)
exten => _X.,n(play),Playback(語音文件名)
exten => _X.,n,Goto(play)
將test2.c放置於任一資料夾(例如test) 按此下載
compile 成一個檔案(例如testapp)
sudo gcc test2.c -o testapp
撥打的命令
在 testapp所在的目錄下 sudo ./testapp X skypeID (分機號)
X代表共幾路呼叫,SkypeID可填入代表號,分機號則填入欲撥打的分機號
例如 sudo ./testapp 1 voskytp1 325為1路撥打voskytp1後轉分機325
使用這個來錄音,先在extensions.conf裡依照上面錄音端設定
然後依以下的指令來撥打
sudo ./testapp 1 tpae01 991
sudo ./testapp 2 tpae02 992
sudo ./testapp 3 tpae03 993
依此類推,這樣子會在放錄音檔的地方產生991-in.wav,9910-out.wav,992-in.wav....
使用這個來放音,先在extensions.conf裡依照上面放音端設定
然後依照以下的指令來撥打
sudo ./testapp 1 tpae01 991
sudo ./testapp 2 tpae02 992
sudo ./testapp 3 tpae03 993
依此類推,這樣對方相對應的分機就會接起來後就會聽到聲音
PS.放音建議可以使用windows+skype+音源線會比較快
2008年6月18日 星期三
顯示一些特別保留碼的語法
使用方法為
"<" + ";"(連在一起),就可以顯示出 "<"
">" + ";"(連在一起),就可以顯示出 ">"
2008年6月17日 星期二
Skype Codecs
2. [forcecodec]G729[/forcecodec]
3. [disablecodecs]SVOPC SVOPC_SB AMRWB[/disablecodecs]
Example:
[call]
[forcecodec]G729[/forcecodec]]/forcecodec]
[/call]
2008年6月10日 星期二
Restart Zaptel setting without restart system
Only restart Asterisk is not enough
you can type "sudo ztcfg -vv" to restart the zaptel driver to make you setting take effect
Asterisk adjust gain
configure zapata.conf
rxgain represents the receive volume
txgain represents the transmit volume
Default value is 0.0
PS:Most reading suggests going no lower than -11.0 and no higher than 11.0, though it will take values from -100 to 100.Make sure that rxgain=/txgain= lines are placed prior to channel= line in your zapata.conf otherwise the gain settings will not have any effect.
Reference link:Click Here