差分

移動先: 案内検索

利用者:Pin ptr

410 バイト追加, 2017年4月4日 (火) 05:21
編集の要約なし
* /etc/dhcp/dhclient.conf
<nowiki># デフォルトのdhclient既存の dhclient.conf に追加する
option ip-sip-servers code 120 = { boolean, array of ip-address };
dhclientが起動するスクリプトからasteriskの設定を作る。
* /etc/dhcp/dhclient-exit-hooks.d/sip-configuration <nowiki>if [ "eth0" = "$interfaceをチェックしたり、bindaddrも書き換えた方がいいかも…interface" ]; then case $reason in BOUND|RENEW|REBIND|REBOOT) domain=$(echo "$new_ntt_domain" | sed -e 's/[.]$//') number="$new_ntt_number" is_ip=$(echo "$new_ip_sip_servers" | awk '{ print $1; }') server=$(echo "$new_ip_sip_servers" | awk '{ print $2; }')
* /etc/dhcp/dhclient if [ -exitn "$domain" ] && [ -hooks.d/sip-configuration <nowiki>case n "$number" ] && [ "$reason in BOUND|RENEW|REBIND|REBOOT) domainis_ip" =$(echo 'true' ] && [ -n "$new_ntt_domainserver" ]; then cat /etc/asterisk/ntt.conf.up | \ sed \ -e '"s/[.]DOMAIN/$domain//')g" \ number= -e "s/NUMBER/$new_ntt_numbernumber/g"\ is_ip=$(echo -e "s/SERVER/$new_ip_sip_serversserver/g" | awk '{ print $1\ > /usr/local/etc/asterisk/ntt.conf service asterisk reload fi ; }') server=$(echo "$new_ip_sip_servers" | awk '{ print $2; }')
if [ -n "$domain" ] && [ -n "$number" ] && [ "$is_ip" = 'true' ] && [ -n "$server" ] thenEXPIRE|FAIL|RELEASE|STOP) cat cp /etc/asterisk/ntt.conf.up | \ sed \ -e "s/DOMAIN/$domain/g" \ -e "s/NUMBER/$number/g" \ -e "s/SERVER/$server/g" \ > down /usr/local/etc/asterisk/ntt.conf
service asterisk reload
fi ;;  EXPIRE|FAIL|RELEASE|STOP)esac cp /etc/asterisk/ntt.conf.down /usr/local/etc/asterisk/ntt.conf service asterisk reload ;;esacfi</nowiki>
* /etc/asterisk/ntt.conf.up
host=SERVER
context=fromntt
nat=never
fromdomain=DOMAIN</nowiki>
* sip.conf
<nowiki>[general](略)#include <ntt.conf> [201](略)</nowiki> === 結果 ===  <nowiki>eri*CLI> sip show registryHost dnsmgr Username Refresh State Reg.Timexxx.xxx.xxx.x:5060 N 0xxxxxxxxx@n 3585 Registered Tue, 04 Apr 2017 04:55:151 SIP registrations.</nowiki>
16
回編集

案内メニュー

VoIp-Info.jp

HP Directplus -HP公式オンラインストア-