Mục tiêu thực hành:
- Cấu hình Public Inbound DID trên FreeSwitch v.1.6.
- Hiệu chỉnh ACL trên FreeSwitch v1.6 cho phép tiếp nhận cuộc gọi từ VoiceGateway.
- Thiết lập định tuyến cuộc gọi Dial Peer trên Cisco VoiceGateway.
Các bước triển khai:
Cấu hình Public Inbound DID trên FreeSwitch v.1.6.
- Thiết lập chuyển tiếp cuộc gọi tới DID Number (1001) cho Internal Extension (1001).
vi /usr/local/freeswitch/conf/dialplan/public/01_inbound_did.xml
<include><extension name="1001_did"><condition field="destination_number" expression="^(1001)$"><action application="transfer" data="1001 XML default"/></condition></extension></include>
- Thiết lập chuyển tiếp cuộc gọi tới DID Number (5551212) cho Internal Extension (1000).
vi /usr/local/freeswitch/conf/dialplan/public/00_inbound_did.xml
<include><extension name="public_did"><condition field="destination_number" expression="^(5551212)$"><!--If you're hosting multiple domains you will want to set thetarget_domain on these calls so they hit the proper domain after youtransfer the caller into the default context.$${domain} is the default domain set from vars.xml but you can set itto any domain you have setup in your user directory.--><action application="set" data="domain_name=$${domain}"/><!-- This example maps the DID 5551212 to ring 1000 in the default context --><action application="transfer" data="1000 XML default"/></condition></extension></include>
- Tiến hành reloadxml trên FreeSwitch.
[root@localhost ~]# fs_cli –rfreeswitch@localhost.localdomain> reloadxml
Hiệu chỉnh ACL trên FreeSwitch v1.6 cho phép tiếp nhận cuộc gọi từ VoiceGateway.
- Khai báo địa chỉ IP của VoiceGateway vào danh sách ACL trên FreeSwitch.
vi /usr/local/freeswitch/conf/autoload_configs/acl.conf.xml
<configuration name="acl.conf" description="Network Lists"><network-lists><!--These ACL's are automatically created on startup.rfc1918.auto - RFC1918 Spacenat.auto - RFC1918 Excluding your local lan.localnet.auto - ACL for your local lan.loopback.auto - ACL for your local lan.--><list name="lan" default="allow"><node type="deny" cidr="192.168.42.0/24"/><node type="allow" cidr="192.168.42.42/32"/></list><!--This will traverse the directory adding all userswith the cidr= tag to this ACL, when this ACL matchesthe users variables and params apply as if theydigest authenticated.--><list name="domains" default="deny"><!-- domain= is special it scans the domain from the directory to build the ACL --><node type="allow" domain="$${domain}"/><!-- use cidr= if you wish to allow ip ranges to this domains acl. --><!-- <node type="allow" cidr="192.168.0.0/24"/> --><node type="allow" cidr="10.10.10.0/24"/></list></network-lists></configuration>
- Tiến hành reloadxml trên FreeSwitch.
[root@localhost ~]# fs_cli –rfreeswitch@localhost.localdomain> reloadxml
Thiết lập định tuyến cuộc gọi Dial Peer trên Cisco VoiceGateway.
voice class codec 2codec preference 1 g711ulawcodec preference 2 g711alawexitdial-peer voice 42 voipdestination-pattern 100[0-9]session protocol sipv2session target ipv4:10.10.10.188dtmf-relay sip-notifysession transport udpvoice-class codec 2exitdial-peer voice 43 voipdestination-pattern 5551212session protocol sipv2session target ipv4:10.10.10.188dtmf-relay sip-notifysession transport udpvoice-class codec 2exit
Tham khảo các Videos lý thuyết CCNA Voice (Collaboration) trước khi tham khảo các bài hướng dẫn thực hành VoIP. Mọi thắc mắc, các bạn vui lòng liên lạc với mình thông qua kênh Zalo (Jade Bùi) 076.877.2021.
0 comments