mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
chan_sip: Remove deprecated module.
ASTERISK-30297 Change-Id: Ic700168c80b68879d9cee8bb07afe2712fb17996
This commit is contained in:
committed by
George Joseph
parent
e66c5da145
commit
4095a382da
@@ -15,7 +15,7 @@ SYNOPSIS
|
||||
$prog [ --help ] | [ [ --reset ] | [
|
||||
[ --uniqueid="<uniqueid>" ]
|
||||
|
||||
[ --pjsip-debug=<on|off> ] [ --sip-debug=<on|off> ]
|
||||
[ --pjsip-debug=<on|off> ]
|
||||
[ --iax2-debug=<on|off> ]
|
||||
|
||||
[ --agi-debug=<on|off> ] [ --ami-debug=<on|off> ]
|
||||
@@ -26,7 +26,7 @@ SYNOPSIS
|
||||
[ --dtmf-debug=<on|off> ] [ --fax-debug=<on|off> ]
|
||||
[ --security-debug=<on|off> ]
|
||||
|
||||
[ --pjsip-history=<on|off> ] [ --sip-history=<on|off> ]
|
||||
[ --pjsip-history=<on|off> ]
|
||||
|
||||
[ --verbose=<level> ] [ --debug=<level> ]
|
||||
] ]
|
||||
@@ -51,7 +51,7 @@ DESCRIPTION
|
||||
on/off commands will use the same uniqueid. Use the --reset
|
||||
option to reset it (and everything else).
|
||||
|
||||
--pjsip-debug --sip-debug --iax2-debug --agi-debug --ami-debug
|
||||
--pjsip-debug --iax2-debug --agi-debug --ami-debug
|
||||
--ari-debug --cdr-debug --channel-debug --rtp-debug --rtcp-debug
|
||||
Issues the subsystem appropriate command to turn on
|
||||
or off debugging. These are usually functional debug messages
|
||||
@@ -62,10 +62,10 @@ DESCRIPTION
|
||||
These subsystems set up their own log channels so if turned
|
||||
on, log files will be created in \$astlogdir for them.
|
||||
|
||||
--pjsip-history --sip-history
|
||||
The pjsip and sip channels have the ability to output an
|
||||
abbreviated, one-line, packet summary. If enabled, the summaries
|
||||
will be written to \$astlogdir/pjsip_history.\$UNIQUEID and
|
||||
--pjsip-history
|
||||
The pjsip channels have the ability to output an abbreviated,
|
||||
one-line, packet summary. If enabled, the summaries will be
|
||||
written to \$astlogdir/pjsip_history.\$UNIQUEID and
|
||||
\$astlogdir/sip_history.\$UNIQUEID.
|
||||
|
||||
--verbose-level --debug-level
|
||||
@@ -114,7 +114,6 @@ RESET=false
|
||||
|
||||
declare -A DEBUG_COMMANDS=(
|
||||
[PJSIP,on]="pjsip set logger on" [PJSIP,off]="pjsip set logger off"
|
||||
[SIP,on]="sip set debug on" [SIP,off]="sip set debug off"
|
||||
[IAX2,on]="iax2 set debug on" [IAX2,off]="iax2 set debug off"
|
||||
[ARI,on]="ari set debug all on" [ARI,off]="ari set debug all off"
|
||||
[AMI,on]="manager set debug on" [AMI,off]="manager set debug off"
|
||||
@@ -152,8 +151,6 @@ for a in "$@" ; do
|
||||
DEBUGS=true
|
||||
;;
|
||||
--pjsip-history=*)
|
||||
;&
|
||||
--sip-history=*)
|
||||
subsystem=${a%-history=*}
|
||||
subsystem=${subsystem#--}
|
||||
if [[ ${a#*=} =~ ^[Yy].* ]] ; then
|
||||
@@ -224,8 +221,6 @@ if $RESET ; then
|
||||
asterisk -rx "core set debug 0"
|
||||
asterisk -rx "pjsip set logger off"
|
||||
asterisk -rx "pjsip set history off"
|
||||
asterisk -rx "sip set debug off"
|
||||
asterisk -rx "sip set history off"
|
||||
asterisk -rx "iax2 set debug off"
|
||||
asterisk -rx "manager set debug off"
|
||||
asterisk -rx "ari set debug all off"
|
||||
@@ -259,9 +254,6 @@ if ! grep -q "; --START DEBUG_LOGGING-- ;" $CLI_CONF ; then
|
||||
[pjsip_debug](!)
|
||||
pjsip set logger on = yes
|
||||
|
||||
[sip_debug](!)
|
||||
sip set debug on = yes
|
||||
|
||||
[iax2_debug](!)
|
||||
iax2 set debug on = yes
|
||||
|
||||
@@ -299,10 +291,6 @@ if ! grep -q "; --START DEBUG_LOGGING-- ;" $CLI_CONF ; then
|
||||
logger add channel $PJSIP_HISTORY_LOG PJSIP_HISTORY = yes
|
||||
pjsip set history on = yes
|
||||
|
||||
[sip_history](!)
|
||||
logger add channel $SIP_HISTORY_LOG SIP_HISTORY = yes
|
||||
sip set history on = yes
|
||||
|
||||
[verbose_level](!)
|
||||
core set verbose 3 = yes
|
||||
|
||||
@@ -327,13 +315,12 @@ else
|
||||
VERBOSE_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/message\..+)\s+NOTICE.*@\1@p" "$CLI_CONF")
|
||||
DEBUG_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/debug\..+)\s+DEBUG.*@\1@p" "$CLI_CONF")
|
||||
PJSIP_HISTORY_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/pjsip_history\..+)\s+PJSIP.*@\1@p" "$CLI_CONF")
|
||||
SIP_HISTORY_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/sip_history\..+)\s+SIP.*@\1@p" "$CLI_CONF")
|
||||
DTMF_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/dtmf\..+)\s+DTMF.*@\1@p" "$CLI_CONF")
|
||||
FAX_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/fax\..+)\s+FAX.*@\1@p" "$CLI_CONF")
|
||||
SECURITY_LOG=$(sed -n -r -e "s@logger add channel ($LOG_DIR/security\..+)\s+SECURITY.*@\1@p" "$CLI_CONF")
|
||||
fi
|
||||
|
||||
for x in PJSIP SIP ARI AMI AGI ARI IAX2 CDR RTP RTCP ; do
|
||||
for x in PJSIP ARI AMI AGI ARI IAX2 CDR RTP RTCP ; do
|
||||
if eval \$${x}_DEBUG_SPECIFIED ; then
|
||||
if eval \$${x}_DEBUG ; then
|
||||
if $ASTERISK_IS_RUNNING ; then
|
||||
@@ -367,7 +354,7 @@ for x in DTMF FAX SECURITY ; do
|
||||
fi
|
||||
done
|
||||
|
||||
for x in PJSIP SIP ; do
|
||||
for x in PJSIP ; do
|
||||
if eval \$${x}_HISTORY_SPECIFIED ; then
|
||||
if eval \$${x}_HISTORY ; then
|
||||
if $ASTERISK_IS_RUNNING ; then
|
||||
|
@@ -192,7 +192,6 @@ if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
|
||||
"core show uptime" "core show settings" "core show sysinfo" "core show channels" \
|
||||
"pri show spans" "dahdi show status" "dahdi show channels" "dahdi show channel 1" \
|
||||
"pjsip show endpoints" "pjsip show registrations" "pjsip list channels" \
|
||||
"sip show peers" "sip show registry" "sip show channels" "sip show subscriptions" "sip show settings" \
|
||||
"show g729" "g729 show version" "g729 show licenses" "g729 show hostid" \
|
||||
"digium_phones show version" "digium_phones show alerts" "digium_phones show applications" \
|
||||
"digium_phones show firmwares" "digium_phones show lines" "digium_phones show networks" \
|
||||
|
@@ -1,92 +0,0 @@
|
||||
#!/usr/bin/perl -Tw
|
||||
# Retrieves the sip user/peer entries from the database
|
||||
# Use these commands to create the appropriate tables in MySQL
|
||||
#
|
||||
#CREATE TABLE sip (id INT(11) DEFAULT -1 NOT NULL,keyword VARCHAR(20) NOT NULL,data VARCHAR(50) NOT NULL, flags INT(1) DEFAULT 0 NOT NULL,PRIMARY KEY (id,keyword));
|
||||
#
|
||||
# if flags = 1 then the records are not included in the output file
|
||||
|
||||
use DBI;
|
||||
################### BEGIN OF CONFIGURATION ####################
|
||||
|
||||
# the name of the extensions table
|
||||
$table_name = "sip";
|
||||
# the path to the extensions.conf file
|
||||
# WARNING: this file will be substituted by the output of this program
|
||||
$sip_conf = "/etc/asterisk/sip_additional.conf";
|
||||
# the name of the box the MySQL database is running on
|
||||
$hostname = "localhost";
|
||||
# the name of the database our tables are kept
|
||||
$database = "sip";
|
||||
# username to connect to the database
|
||||
$username = "root";
|
||||
# password to connect to the database
|
||||
$password = "";
|
||||
|
||||
################### END OF CONFIGURATION #######################
|
||||
|
||||
$additional = "";
|
||||
|
||||
open EXTEN, ">$sip_conf" || die "Cannot create/overwrite extensions file: $sip_conf\n";
|
||||
|
||||
$dbh = DBI->connect("dbi:mysql:dbname=$database;host=$hostname", "$username", "$password");
|
||||
$statement = "SELECT keyword,data from $table_name where id=0 and keyword <> 'account' and flags <> 1";
|
||||
my $result = $dbh->selectall_arrayref($statement);
|
||||
unless ($result) {
|
||||
# check for errors after every single database call
|
||||
print "dbh->selectall_arrayref($statement) failed!\n";
|
||||
print "DBI::err=[$DBI::err]\n";
|
||||
print "DBI::errstr=[$DBI::errstr]\n";
|
||||
exit;
|
||||
}
|
||||
my @resultSet = @{$result};
|
||||
if ( $#resultSet > -1 ) {
|
||||
foreach $row (@{ $result }) {
|
||||
my @result = @{ $row };
|
||||
$additional .= $result[0]."=".$result[1]."\n";
|
||||
}
|
||||
}
|
||||
|
||||
$statement = "SELECT data,id from $table_name where keyword='account' and flags <> 1 group by data";
|
||||
|
||||
$result = $dbh->selectall_arrayref($statement);
|
||||
unless ($result) {
|
||||
# check for errors after every single database call
|
||||
print "dbh->selectall_arrayref($statement) failed!\n";
|
||||
print "DBI::err=[$DBI::err]\n";
|
||||
print "DBI::errstr=[$DBI::errstr]\n";
|
||||
}
|
||||
|
||||
@resultSet = @{$result};
|
||||
if ( $#resultSet == -1 ) {
|
||||
print "No sip accounts defined in $table_name\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
foreach my $row ( @{ $result } ) {
|
||||
my $account = @{ $row }[0];
|
||||
my $id = @{ $row }[1];
|
||||
print EXTEN "[$account]\n";
|
||||
$statement = "SELECT keyword,data from $table_name where id=$id and keyword <> 'account' and flags <> 1 order by keyword";
|
||||
my $result = $dbh->selectall_arrayref($statement);
|
||||
unless ($result) {
|
||||
# check for errors after every single database call
|
||||
print "dbh->selectall_arrayref($statement) failed!\n";
|
||||
print "DBI::err=[$DBI::err]\n";
|
||||
print "DBI::errstr=[$DBI::errstr]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
my @resSet = @{$result};
|
||||
if ( $#resSet == -1 ) {
|
||||
print "no results\n";
|
||||
exit;
|
||||
}
|
||||
foreach my $row ( @{ $result } ) {
|
||||
my @result = @{ $row };
|
||||
print EXTEN "$result[0]=$result[1]\n";
|
||||
}
|
||||
print EXTEN "$additional\n";
|
||||
}
|
||||
|
||||
exit 0;
|
@@ -1,67 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# sip_nat_settings: generate NAT settings for sip.conf of an Asterisk system
|
||||
# that is behind a NAT router.
|
||||
#
|
||||
# This is a script to generate sane defaults for externip and localnet
|
||||
# of sip.conf. The output should be included in the [general] section of
|
||||
# sip.conf .
|
||||
#
|
||||
# Multiple network interfaces: If you have multiple network interfaces,
|
||||
# this script will generate a 'localnet' line for each of them that has a
|
||||
# broadcast (ipv4) address, except the loopback interface (lo). You can
|
||||
# later rem-out all of those you don't need.
|
||||
#
|
||||
# Alternatively, provide a network interface as a parameter an a localnet
|
||||
# line will only be generated for its network.
|
||||
#
|
||||
# Copyright (C) 2005 by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# see http://unix.stackexchange.com/q/22615
|
||||
externip=`dig @resolver1.opendns.com -4 myip.opendns.com A +short`
|
||||
|
||||
# optional parameter: network interface to use. By default: none.
|
||||
IFACE="$1"
|
||||
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
Linux)
|
||||
echo "externip = $externip"
|
||||
if [ -x "${IFACE}" ]; then
|
||||
ip --brief -family inet address show scope global up dev $IFACE | awk '{print "localnet = " $3}'
|
||||
else
|
||||
ip --brief -family inet address show scope global up | awk '{print "localnet = " $3}'
|
||||
fi
|
||||
;;
|
||||
OpenBSD|FreeBSD)
|
||||
if [ "${OS}" = "FreeBSD" ]; then
|
||||
VER=`uname -r | cut -d . -f 1`
|
||||
if [ ${VER} -lt 7 ]; then
|
||||
echo "Unsupported OS"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "externip = $externip"
|
||||
ip=`/sbin/ifconfig $IFACE | awk '/\tinet .* broadcast/{print $6}'`
|
||||
x=`/sbin/ifconfig $IFACE | awk '/\tinet .* broadcast/{print $4}'`
|
||||
printf 'localnet = %s/%u.%u.%u.%u\n' $ip $(($x>>24&0xff)) $(($x>>16&0xff)) $(($x>>8&0xff)) $(($x&0xff))
|
||||
;;
|
||||
*)
|
||||
echo >&2 "$0: Unsupported OS $OS"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
@@ -17,10 +17,6 @@ ListenStream=0.0.0.0:5039
|
||||
ListenStream=127.0.0.1:8088
|
||||
# HTTPS
|
||||
ListenStream=127.0.0.1:8089
|
||||
# chan_sip TCP
|
||||
ListenStream=0.0.0.0:5060
|
||||
# chan_sip TLS
|
||||
ListenStream=0.0.0.0:5061
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
|
Reference in New Issue
Block a user