part 1
ตัวอย่างที่ผมเขียนนี้เป็น Basic Configuration นะครับ โดยนำ Router มาเชื่อมต่อเข้ากับตู้ PABX โดยที่ฝั่ง HQ จะนำ Router มาต่อกับตู้ PABX ด้วย FXO ส่วนทางด้านสาขา (Remote Site) นำ Router มาเชื่อมต่อกับ PABX ด้วย FXS (ต่อเข้ากับ Co-Line) ของ PABX ลักษณะการใช้ของผุ้ใช้คือ เมื่อต้องการโทรจาก HQ ไปยังสาขาก็ยกหูแล้วกด 900 (สมมตินะครับ) หลังจากนั้น PABX จะทำการ hunting ไปยังเบอร์ 16 หรือ 17 จากนั้นผู้ใช้จะได้สัญญาณ dial tone ของ PABX ที่ ฝั่ง remote site จากนั้นก็สามารถกดเบอร์ภายในของอีกฝั่งหนึ่งได้ตามต้องการ การใช้ VOIP นี้ทำให้การโทรหากันระหว่างสาขาไม่ต้องเสียค่าใช้จ่ายเพราะว่าสัญญาณเสียงจะส่งผ่านสื่อกลางที่เราใช้สำหรับส่งข้อมูลอยู่แล้ว
ด้าน HQ
HQ#show runn
Building configuration…
Current configuration : 2807 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname HQ
!
boot-start-marker
boot system flash c2800nm-ipvoice-mz.124-5a.bin
boot-end-marker
!
logging buffered 51200 warnings
!
no aaa new-model
!
resource policy
!
!
ip cef
!
!
ip domain name yourdomain.com
!
voice-card 0
no dspfarm
!
!
username cisco privilege 15 secret 5 xxxxxxxxxxx/
!
!
!
interface GigabitEthernet0/0
description $ETH-LAN$$ETH-SW-LAUNCH$$INTF-INFO-GE 0/0$
ip address 10.139.0.254 255.255.254.0
ip directed-broadcast
duplex auto
speed auto
!
!
interface Serial0/0/0
description Link to Airport (Circuit ID: XXXX)
bandwidth 512
ip address 10.10.10.1 255.255.255.0
!
interface Serial0/0/1
description Link to Rayong (Circuit ID: XXXX)
bandwidth 512
ip address 10.10.20.1 255.255.255.0
!
!
!
ip route 0.0.0.0 0.0.0.0 10.139.0.1
ip route 10.139.8.0 255.255.254.0 10.139.0.13 name Airport
ip route 10.139.16.0 255.255.254.0 10.10.20.2
ip route 10.139.24.0 255.255.254.0 10.10.10.2
ip route 192.168.2.0 255.255.255.0 10.10.20.2
!
ip http server
ip http authentication local
ip http timeout-policy idle 5 life 86400 requests 10000
!
snmp-server community Public RO
!
!
control-plane
!
!
voice-port 0/3/0
connection plar 101
!
voice-port 0/3/1
connection plar 102
!
voice-port 0/3/2
!
voice-port 0/3/3
!
!
dial-peer voice 1 pots
destination-pattern 16
port 0/3/0
!
dial-peer voice 20 voip
destination-pattern 1.
session target ipv4:10.10.20.2
ip qos dscp cs5 media <— คำสั่งนี้อาจจะเพิ่มเติมในการ classify voice media ด้วย Class selector 5
!
dial-peer voice 2 pots
destination-pattern 17
port 0/3/1
!
banner login ^C
———————————————————————–
Cisco Router and Security Device Manager (SDM) is installed on this device.
This feature requires the one-time use of the username “cisco”
with the password “cisco”.
Please change these publicly known initial credentials using SDM or the IOS CLI.
Here are the Cisco IOS commands.
username privilege 15 secret 0
no username cisco
Replace and with the username and password you want to use.
For more information about SDM please follow the instructions in the QUICK START
GUIDE for your router or go to http://www.cisco.com/go/sdm
———————————————————————–
^C
!
line con 0
login local
line aux 0
line vty 0 4
privilege level 15
login local
transport input telnet
line vty 5 15
privilege level 15
login local
transport input telnet
!
scheduler allocate 20000 1000
!
end
HQ#
ขั้นตอนการทำงานของ Router มีดังนี้
เมื่อ HQ Router ได้รับสัญญาณมาจาก PABX ที่เบอร์ 16 ซึ่งจะตรงกับ port 0/3/0 ซึ่ง port จะทำ connection plar (Private Line Automatic Ringdown) ไปที่เบอร์ 101 จากนั้น HQ Router จะทำการโทรไปยัง 101 โดยใช้เข้าไปหาใน dialer-peer voice 20 เมื่อไปถึง Branch Router แล้ว ก็จะส่งต่อไปยัง port 0/2/0 (ดู configuration ใน part 2)
part 2
มาดูทางด้านสาขาบ้างครับ การโทรออกจากสาขาไป HQ ทำโดยเมื่อผู้ใช้ยกหู ก็กด 900 (สมมตินะครับ)PABX ก็จะตัดออกทาง CO-Line ไปทาง Router จากนั้น ผู้ใช้ก็จะได้สัญญาณ dial tone จาก PABX ด้าน HQ หลังจากนั้นผู้ใช้ก็กดเบอร์ภายในที่ต้องการ
configuration เป็นดังนี้ครับ
Branch#sh runn
Building configuration…
Current configuration : 1387 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Branch
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$RZqx$fi3YIYJOTN59HTRNRT9.m/
enable password 12345
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
no aaa new-model
ip subnet-zero
ip cef
!
!
no ftp-server write-enable
!
voice-card 0
!
!
interface FastEthernet0/0
ip address 192.168.2.254 255.255.255.0 secondary
ip address 10.139.16.254 255.255.254.0
speed auto
half-duplex
no cdp enable
no mop enabled
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
no cdp enable
!
interface Serial0/3/0
description Link to HQ (Circuit ID: xxxxx)
bandwidth 512
ip address 10.10.20.2 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.20.1
!
!
no ip http server
no ip http secure-server
!
snmp-server community public RO
!
!
!
control-plane
!
!
!
voice-port 0/2/0
connection plar 201
!
voice-port 0/2/1
connection plar 202
!
voice-port 0/2/2
!
voice-port 0/2/3
!
!
dial-peer voice 16 pots
destination-pattern 101
port 0/2/0
!
dial-peer voice 10 voip
destination-pattern 2.
session target ipv4:10.10.20.1
!
dial-peer voice 17 pots
destination-pattern 102
port 0/2/1
!
!
line con 0
line aux 0
line vty 0 4
password 12345
login
!
end
Branch#
คำสั่งเพิ่มเติมสำหรับ Cisco ในการดูการทำงานคือ
show voice port summary
Note
สำหรับ FXS เป็นตัวจ่ายกระแสไฟฟ้า หรือจ่ายสัญญาณออก จึงต้องต่อกับส่วนที่รับสัญญาน เช่น เครื่องโทรศัพท์, CO Line ของ PABX
ส่วน FXO เป็นตัวรับกระแสไฟฟ้า หรือรับสัญญานจึงต้องต่อกับตัวที่ส่งสัญญาณเช่น ต่อกับ PABX ด้าน extension หรือต่อกับ Line โทรศัพท์โดยตรงจาก TOT หรือ TRUE
จาก http://www.9networker.com/
Look good "การทำ VOIP แบบ FXS กับ FXO ด้วย Cisco Router "








I rkeocn you are quite dead on with that.
[Translate]