Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

История изменений [назад]

нажмите, чтобы скрыть/показать версии 1
изначальная версия
редактировать

спросил 2013-03-10 03:00:33 +0400

astin1317 Gravatar astin1317

ограничить диапазон портов для ИСХОДЯOЩИХ соединений

скажите как ограничить sport астериска ? поты указанные в rtpstart rtpend udptlstart udptlend ограничивают почему то только порты по которым от принимает потоки сам же делает соединения с различных портов

ограничить диапазон портов для ИСХОДЯOЩИХ соединений

скажите как ограничить sport астериска ? поты указанные в rtpstart rtpend udptlstart udptlend ограничивают почему то только порты по которым от принимает потоки сам же делает соединения с различных портов

[root@localhost ~]# cat /etc/asterisk/rtp_additional.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

[general]
rtpend=20000
rtpstart=10000

[root@localhost ~]# tcpdump -n net 212.53.40/24
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:37:48.955680 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 880
15:37:48.970537 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 303
15:37:48.970900 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 448
15:37:48.971053 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 401
15:37:48.971185 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 1130
15:37:48.992148 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 303
15:37:51.720161 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 831
15:37:58.019174 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 535
15:37:58.033887 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 480
15:38:03.142545 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 634
15:38:03.160480 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 566
15:38:09.742688 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 869
15:38:09.743123 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 548
15:38:09.744671 IP 192.168.10.106.**28136** > 212.53.40.72.17170: UDP, length 32
15:38:09.764161 IP 192.168.10.106.**28136** > 212.53.40.72.17170: UDP, length 32
15:38:09.776955 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.784157 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.797206 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.804157 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.816758 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.824163 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.836817 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32

ограничить диапазон портов для ИСХОДЯOЩИХ соединений

скажите как ограничить sport астериска ? поты указанные в rtpstart rtpend udptlstart udptlend ограничивают почему то только порты по которым от принимает потоки сам же делает соединения с различных портов

[root@localhost ~]# ls /etc/asterisk/rtp*
/etc/asterisk/rtp_additional.conf  /etc/asterisk/rtp.conf
[root@localhost ~]# cat /etc/asterisk/rtp.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

[general]
;rtp settings are defined in the chan_motif freepbx module


;icesupport=yes
[root@localhost ~]# 

[root@localhost ~]# cat /etc/asterisk/rtp_additional.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

[general]
rtpend=20000
rtpstart=10000

[root@localhost ~]# tcpdump -n net 212.53.40/24
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:37:48.955680 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 880
15:37:48.970537 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 303
15:37:48.970900 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 448
15:37:48.971053 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 401
15:37:48.971185 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 1130
15:37:48.992148 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 303
15:37:51.720161 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 831
15:37:58.019174 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 535
15:37:58.033887 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 480
15:38:03.142545 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 634
15:38:03.160480 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 566
15:38:09.742688 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 869
15:38:09.743123 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 548
15:38:09.744671 IP 192.168.10.106.**28136** > 212.53.40.72.17170: UDP, length 32
15:38:09.764161 IP 192.168.10.106.**28136** > 212.53.40.72.17170: UDP, length 32
15:38:09.776955 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.784157 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.797206 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.804157 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.816758 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.824163 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.836817 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32

ограничить диапазон портов для ИСХОДЯOЩИХ соединений

скажите как ограничить sport астериска ? поты указанные в rtpstart rtpend udptlstart udptlend ограничивают почему то только порты по которым от принимает потоки сам же делает соединения с различных портов

[root@localhost ~]# ls /etc/asterisk/rtp*
/etc/asterisk/rtp_additional.conf  /etc/asterisk/rtp.conf
[root@localhost ~]# cat /etc/asterisk/rtp.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

[general]
;rtp settings are defined in the chan_motif freepbx module


;icesupport=yes
[root@localhost ~]# 

[root@localhost ~]# cat /etc/asterisk/rtp_additional.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

[general]
rtpend=20000
rtpstart=10000

[root@localhost ~]# tcpdump -n net 212.53.40/24
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:37:48.955680 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 880
15:37:48.970537 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 303
15:37:48.970900 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 448
15:37:48.971053 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 401
15:37:48.971185 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 1130
15:37:48.992148 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 303
15:37:51.720161 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 831
15:37:58.019174 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 535
15:37:58.033887 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 480
15:38:03.142545 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 634
15:38:03.160480 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 566
15:38:09.742688 IP 212.53.40.40.sip > 192.168.10.106.sip: SIP, length: 869
15:38:09.743123 IP 192.168.10.106.sip > 212.53.40.40.sip: SIP, length: 548
15:38:09.744671 IP 192.168.10.106.**28136** > 212.53.40.72.17170: UDP, length 32
15:38:09.764161 IP 192.168.10.106.**28136** > 212.53.40.72.17170: UDP, length 32
15:38:09.776955 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.784157 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.797206 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.804157 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.816758 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32
15:38:09.824163 IP 192.168.10.106.28136 > 212.53.40.72.17170: UDP, length 32
15:38:09.836817 IP 212.53.40.72.17170 > 192.168.10.106.28136: UDP, length 32


Reliably Transmitting (NAT) to 80.75.132.66:5060:
INVITE sip:6005060@80.75.132.66 SIP/2.0
Via: SIP/2.0/UDP 94.XX.XX.XX:5060;branch=z9hG4bK3ff13042;rport
Max-Forwards: 70
From: <sip:78124580735@94.XX.XX.XX>;tag=as52936d2c
To: <sip:6005060@80.75.132.66>
Contact: <sip:78124580735@94.XX.XX.XX:5060>
Call-ID: 29f0501f6b1d73b342fa1a511b365f85@94.XX.XX.XX:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0beta3(11.2.1)
Date: Mon, 11 Mar 2013 08:53:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 305

v=0
o=root 2122324920 2122324920 IN IP4 94.XX.XX.XX
s=Asterisk PBX 11.2.1
c=IN IP4 94.XX.XX.XX
t=0 0
m=audio 26410 RTP/AVP 18 3 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.