
การตั้งค่า Cisco CallManager Express (CME) ให้เชื่อมต่อกับ SIP Trunk ของผู้ให้บริการ
การเชื่อมต่อ Cisco CallManager Express (CME) กับ SIP Trunk ของผู้ให้บริการโทรศัพท์ถือเป็นขั้นตอนสำคัญสำหรับองค์กรที่ต้องการใช้งานโทรศัพท์ VoIP ภายในและภายนอกครับ บทความนี้จะแนะนำทีละขั้นตอน ตั้งแต่การเตรียมข้อมูลผู้ให้บริการ การสร้าง ephone-dn และ ephone ภายในองค์กร การตั้งค่า dial-peer สำหรับสายเข้าและสายออก ไปจนถึงการกำหนด codec และ DTMF เพื่อให้การโทรทั้งขาเข้าและขาออกทำงานได้อย่างสมบูรณ์ พร้อมทั้งแนวทางการตรวจสอบและทดสอบการใช้งานครับ
Diagram Flow ของการติดตั้ง CME ด้วยกันกับ AIS SIP Trunk
Step 1: เตรียมข้อมูล
ก่อนเริ่ม ต้องมีข้อมูลดังนี้:
- SIP Trunk IP / FQDN ของ AIS → เช่น 203.xxx.xxx.xxx
- Port → 5060 (UDP/TCP) หรือ 5061 (TLS)
- DID / เบอร์โทรศัพท์ → เช่น 074801828
- Codec → G.711ulaw
- Interface ของ router ที่เชื่อม Internet → เช่น FastEthernet0/0
Step 2: เปิด voice service
บน CME ต้องเปิดบริการ VoIP และอนุญาต SIP to SIP
voice service voip
allow-connections sip to sip
!
Step 3: ตั้งค่า Codec และ DTMF
- Codec ให้ตรงกับผู้ให้บริการ (AIS ใช้ G.711ulaw)
- DTMF relay ใช้ RTP-NTE
voice class codec 1
codec preference 1 g711ulaw
!
voice class dtmf 1
signal rtp-nte
!
Step 4: สร้าง Internal Extension (ephone-dn)
- ตั้ง internal extension ที่จะรับสายเข้า 1000
- กำหนด ephone ให้โทรศัพท์จริงหรือ IP phone ลงปุ่ม extension นี้
ephone-dn 1
number 1000
name User1000
!
ephone 1
device-security-mode none
mac-address 0011.2233.4455
type 7962
button 1:1
!
Step 5: ตั้งค่า Outbound Dial-Peer (โทรออกไป AIS)
- กำหนด pattern ของเบอร์ที่จะโทรออก เช่น 9T (ขึ้นอยู่กับ dial plan ขององค์กร)
- กำหนด SIP Trunk IP ของ AIS
- ตั้ง codec และ DTMF
dial-peer voice 1000 voip
description Outbound to AIS
destination-pattern 9T
session protocol sipv2
session target ipv4:203.xxx.xxx.xxx
dtmf-relay rtp-nte
codec g711ulaw
no vad
!
Step 6: ตั้งค่า Inbound Dial-Peer (รับสายจาก AIS)
- กำหนด DID จาก AIS (074801828)
- Map ให้ไปยัง ephone-dn 1000
- ใช้ codec และ DTMF เหมือน outbound
dial-peer voice 2000 voip
description Inbound from AIS
incoming called-number 074801828
session protocol sipv2
session target ipv4:0.0.0.0 ! ใช้ internal UA ของ CME
dtmf-relay rtp-nte
codec g711ulaw
no vad
!voice translation-rule 1
rule 1 /^074801828$/ /1000/
!
voice translation-profile AIS_IN
translate called 1
!
dial-peer voice 2000 voip
translation-profile incoming AIS_IN
Step 7: ตรวจสอบและทดสอบ
- Outbound Call: โทรออกไปเบอร์ภายนอก ผ่าน SIP Trunk AIS → ต้อง connect
- Inbound Call: โทรเข้าเบอร์ 074801828 → CME ต้อง ring ที่ ephone-dn 1000
- ตรวจสอบ Firewall / NAT ให้พอร์ต SIP 5060 และ RTP 16384-32767 เปิด