کانفیگ روتر سیسکو E1 و FXO برای سیموتل

در زیر تنظیمات روتر سیسکو موجود است که موارد مهم آن عبارتند از
در اولین گام اسم روتر و ios که بر روی آن موجود است را تنظیم می کنیم
نکته ترجیحا از این IOS برای روتر 28XX آپلود نمایید

hostname NasimTelecom

boot-start-marker
boot system flash c2800nm-adventerprisek9-mz.151-1.T.bin
boot-end-marker

در این قسمت نوع کارت تنظیم می شود

card type e1 0 0
network-clock-participate wic 0 
isdn switch-type primary-net5
voice-card 0

در این قسمت تنظیم پسورد روتر انجام می شود که XXX می باشد

enable secret XXX

سپس روتر را برای تنظیمات پروتکل سیپ تنظیم می نماییم

voice service voip
 allow-connections sip to sip
 no supplementary-service sip moved-temporarily
 no supplementary-service sip refer
 sip
  registrar server expires max 3600 min 3600

سپس تنظیم کارت e1 و پورت سیگنالینگ که تایم اسلات ۱۵ کانال است برای هر دو کانال انجام می شود و پورت دوم را خاموش نمودیم دقت نمایید که کارتها در اسلات 0 قرار گرفته است

controller E1 0/0/0
 pri-group timeslots 1-31

controller E1 0/0/1
 shutdown

interface Serial0/0/0:15
 no ip address
 encapsulation hdlc
 isdn switch-type primary-net5
 isdn incoming-voice voice
 auto discovery qos 
 no cdp enable


interface Serial0/0/1:15
 no ip address
 encapsulation hdlc
 isdn switch-type primary-net5
 isdn incoming-voice voice
 auto discovery qos 
 no cdp enable


voice-port 0/0/0:15

voice-port 0/0/1:15


در این قسمت تنظیم شبکه خود روتر و گیت وی آن انجام می شود روی دو پورت شبکه انجام می شود

interface FastEthernet0/0
 ip address 192.168.12.16 255.255.255.0
 duplex auto
 speed auto

interface FastEthernet0/1
 ip address 192.168.1.101 255.255.255.0
 duplex auto
 speed auto

ip default-gateway 192.168.12.1

در این قسمت تنظیمات خطوط آنالوگ انجام می شود

voice-port 0/1/0
 supervisory disconnect dualtone mid-call
 supervisory answer dualtone sensitivity high
 supervisory custom-cptone Nasim
 no battery-reversal
 input gain 6
 output attenuation 2
 echo-cancel coverage 24
 no vad
 timeouts call-disconnect 2
 timeouts wait-release 3
 timing sup-disconnect 50
 connection plar A1001
 bearer-cap Speech
 caller-id enable
!
voice-port 0/1/1
 supervisory disconnect dualtone mid-call
 supervisory answer dualtone sensitivity high
 supervisory custom-cptone Nasim
 no battery-reversal
 input gain 6
 output attenuation 2
 echo-cancel coverage 24
 no vad
 timeouts call-disconnect 2
 timeouts wait-release 3
 timing sup-disconnect 50
 connection plar A1002
 bearer-cap Speech
 caller-id enable
!
voice-port 0/1/2
 supervisory disconnect dualtone mid-call
 supervisory answer dualtone sensitivity high
 supervisory custom-cptone Nasim
 no battery-reversal
 input gain 6
 output attenuation 2
 echo-cancel coverage 24
 no vad
 timeouts call-disconnect 2
 timeouts wait-release 3
 timing sup-disconnect 50
 connection plar A1003
 bearer-cap Speech
 caller-id enable
!
voice-port 0/1/3
 supervisory disconnect dualtone mid-call
 supervisory answer dualtone sensitivity high
 supervisory custom-cptone Nasim
 no battery-reversal
 input gain 6
 output attenuation 2
 echo-cancel coverage 24
 no vad
 timeouts call-disconnect 2
 timeouts wait-release 3
 timing sup-disconnect 50
 connection plar A1004
 bearer-cap Speech
 caller-id enable

دایل پیرها مهمترین قسمت روتینگ هستند و به دو بخش تقسیم می شود
آنهایی که در انتها pots دارند ( تنظیمات روت برای سمت شبکه tdm مانند e1 و آنالوگ)
آنهایی که در انتها voip دارند( تنظیمات روت به سمت شبکه ویپ)
در مثال زیر پترن اگر B در ابتدای شماره باشد و سپس عدد 1 و بعد از آن هر چیزی تماس از پورت 0/1/0 خارح می شود و به همین منوال رول های بعدی با الگوهای متفاوت از پورتهای دیگری خارج می شود
نکته: حرف B می تواند در صورت حمله به سرور ویپ شما کار را برای حمله کننده مشکل نماید

dial-peer voice 3 pots
 destination-pattern B1.T
 port 0/1/0
!
dial-peer voice 4 pots
 destination-pattern B2.T
 port 0/1/1
!
dial-peer voice 5 pots
 destination-pattern B3.T
 port 0/1/2
!
dial-peer voice 6 pots
 destination-pattern B4.T
 port 0/1/3

در دایل پیر های ویپ ما تمام ورودی ها با پترن نقطه یا دات (.) را به سمت سرور ویپ به آی پی ۱۹۲.۱۶۸.۱۲.۱۵ و نوع ترنسپرت udp و بر روی پروتکل SIP ورژن 2 هدایت می نماییم.

dial-peer voice 202 voip
 description TO-Simotel
 destination-pattern .
 session protocol sipv2
 session target ipv4:192.168.12.15
 session transport udp
 dtmf-relay rtp-nte
 codec g711ulaw
 no vad

در این قسمت تمام خروجی ها که اول آن BBB باشد را از روی پورت E1 خارج می نماییم

dial-peer voice 101 pots
 destination-pattern BBB.T
 incoming called-number .
 direct-inward-dial
 port 0/0/0:15

این تنظیمات برای دسترسی تلنت را وارد می نماییم

line vty 0 4
 password AAAaaa.
 login

2 پسندیده