Теперь dhcp(В данном случаем машина Freebsd имеет адрес 172.16.0.1, является и dhcp и tftp сервером):
ee /etc/rc.conf
dhcpd_enable="YES"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="em0
В данном случае em0 у меня интерфейс, на котором надо раздавать в сеть айпишники.
cd /usr/ports/net/isc-dhcp42-server
make install clean
ee /usr/local/etc/dhcpd.conf
option domain-name yourdomain";
option domain-name-servers 172.16.0.33, 172.16.0.38;
# Time Server (There are multiple values and configurations refer to Admin Guide for Specifics)
sntp_server: 172.16.0.1(адрес моей фряхи) ; SNTP Server IP Address
## sntp_mode: directedbroadcast ; unicast, multicast, anycast, or directedbroadcast (default)
time_zone: BT ; Time Zone Phone is in
dst_offset: 01/00 ; Offset from Phone’s time when DST is in effect
dst_start_month: March ; Month in which DST starts
dst_start_day: " ; Day of month in which DST starts
dst_start_day_of_week: Sunday ; Day of week in which DST starts
dst_start_week_of_month: 8 ; Week of month in which DST starts
dst_start_time: 2 ; Time of day in which DST starts
dst_stop_month: Oct ; Month in which DST stops
dst_stop_day: " ; Day of month in which DST stops
dst_stop_day_of_week: Sunday ; Day of week in which DST stops
dst_stop_week_of_month: 8 ; Week of month in which DST stops 8=last week of month
dst_stop_time: 3 ; Time of day in which DST stops
dst_auto_adjust: 1 ; Enable(1-Default)/Disable(0) DST automatic adjustment
time_format_24hr: 1 ; Enable(1 — 24Hr Default)/Disable(0 — 12Hr)
date_format: D/M/Y"
# Do Not Disturb Control (0-off, 1-on, 2-off with no user control, 3-on with no user control)
dnd_control: 1 ; Default 0 (Do Not Disturb feature is off)
# Caller ID Blocking (0-disabled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
callerid_blocking: 0 ; Default 0 (Disable sending all calls as anonymous)
# Anonymous Call Blocking (0-disabled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
anonymous_call_block: 0 ; Default 0 (Disable blocking of anonymous calls)
# DTMF AVT Payload (Dynamic payload range for AVT tones — 96-127)
dtmf_avt_payload: 101 ; Default 101
# Sync value of the phone used for remote reset
sync: 1 ; Default 1
####### New Parameters added in Release 2.1 #######
# Backup Proxy Support
#proxy_backup: sip.pbxware.ru" ; Dotted IP of Backup Proxy
#proxy_backup_port: 5060 ; Backup Proxy port (default is 5060)
# Emergency Proxy Support
#proxy_emergency: sip.pbxware.ru" ; Dotted IP of Emergency Proxy
#proxy_emergency_port: 5060 ; Emergency Proxy port (default is 5060)
# Configurable VAD option
enable_vad: 0 ; VAD setting 0-disable (Default), 1-enable
####### New Parameters added in Release 2.2 ######
# NAT/Firewall Traversal
nat_enable: 0 ; 0-Disabled (default), 1-Enabled
nat_address: " ; WAN IP address of NAT box (dotted IP or DNS A record only)
voip_control_port: 5060 ; UDP port used for SIP messages (default — 5060)
start_media_port: 16384 ; Start RTP range for media (default — 16384)
end_media_port: 16484 ; End RTP range for media (default — 32766)
nat_received_processing: 0 ; 0-Disabled (default), 1-Enabled
# Outbound Proxy Support
#outbound_proxy: sip.pbxware.ru" ; restricted to dotted IP or DNS A record only
#outbound_proxy_port: 5060 ; default is 5060
####### New Parameter added in Release 3.0 #######
# Allow for the bridge on a 3way call to join remaining parties upon hangup
cnf_join_enable : 1 ; 0-Disabled, 1-Enabled (default)
####### New Parameters added in Release 3.1 #######
# Allow Transfer to be completed while target phone is still ringing
semi_attended_transfer: 1 ; 0-Disabled, 1-Enabled (default)
# Telnet Level (enable or disable the ability to telnet into the phone)
telnet_level: 0 ; 0-Disabled (default), 1-Enabled, 2-Privileged
####### New Parameters added in Release 4.0 #######
# XML URLs
#services_url: " ; URL for external Phone Services
#directory_url: " ; URL for external Directory location
logo_url: http://192.168.0.1/7940.bmp" ; URL for branding logo to be used on phone displ(Можно впаять на телефон свое лого)
# HTTP Proxy Support
http_proxy_addr: " ; Address of HTTP Proxy server
#http_proxy_port: 80 ; Port of HTTP Proxy Server (80-default)
# Dynamic DNS/TFTP Support
dyn_dns_addr_1: " ; restricted to dotted IP
dyn_dns_addr_2: " ; restricted to dotted IP
dyn_tftp_addr: " ; restricted to dotted IP
# Remote Party ID
remote_party_id: 0 ; 0-Disabled (default), 1-Enabled
####### New Parameters added in Release 4.4 #######
# Call Hold Ringback (0-off, 1-on, 2-off with no user control, 3-on with no user control)
call_hold_ringback: 0 ; Default 0 (Call Hold Ringback feature is off)
####### New Parameters added in Release 6.0 #######
;=========================================================================================
;
; general definitions
;
;=========================================================================================
[general]
servername = Адрес нашего сервера
keepalive = 60
debug = 0
context = Контекст в extensions.conf
dateformat = D.M.Y
bindaddr = Адрес нашего сервера
port = 2000
disallow=all
allow=alaw
allow=ulaw
allow=g729
firstdigittimeout = 16
digittimeout = 8
autoanswer_ring_time = 1
autoanswer_tone = 0×32
remotehangup_tone = 0×32
transfer_tone = 0
callwaiting_tone = 0x2d
musicclass=default
language=en
deny=0.0.0.0/0.0.0.0
permit=Наша сеть/Маска сети
dnd = on
sccp_tos = 0×68
sccp_cos = 4
audio_tos = 0xB8
audio_cos = 6
video_tos = 0×88
video_cos = 5
echocancel = on
silencesuppression = off
trustphoneip = no
private = on
callanswerorder=oldestfirst
protocolversion=17
hotline_enabled=yes ;can devices without configuration register
hotline_context=custom-test ; context for hotline
hotline_extension=custom-test ; extension will be dialed on offHook
;=========================================================================================
;
; actual definitions
;
;=========================================================================================
[SEP001EBE900067] ; MAC of 7937G
description = Hell Tel
devicetype = 7940
type = device
button = line, 299
deny=0.0.0.0/0.0.0.0 ; Same as general
permit=Наша сеть/Маска сети ; Same as general
imageversion = Название нашей скачанной прошивки
pickupcontext = Контекст в extensions.conf
tzoffset = +0
transfer = on
trustphoneip = no
directrtp=off
earlyrtp = progress
private = on
mwilamp = on
mwioncall = off
setvar=testvar=value
cfwdall = on
imageversion = Название нашей скачанной прошивки
[299]
id = 299
type = line
label = Phone 299
description = Line 299
cid_name = Hell Tel
cid_num = 299
echocancel = off
context = Контекст в extensions.conf
transfer = on
vmnum = 600
trnsfvm = 1000
secondary_dialtone_digits = 9
secondary_dialtone_tone = 0×22
musicclass=default
language=en
echocancel = on
silencesuppression = off
/usr/local/etc/rc.d/asterisk restart
Теперь можем зайти в консоль и проверить регистрацию нашего телефончика:
asterisk -rvvvvvv
sccp show devices
Комментарии пользователей
Эту новость ещё не комментировалиНаписать комментарий
Анонимам нельзя оставоять комментарии, зарегистрируйтесь!