Browse Source

Merge remote-tracking branch 'origin/master'

Conflicts:
	sip_profiles/sipinterface_2.xml
3.12
James Aimonetti 15 years ago
parent
commit
f79c9b9450
11 changed files with 804 additions and 245 deletions
  1. +9
    -8
      autoload_configs/acl.conf.xml
  2. +15
    -4
      autoload_configs/logfile.conf.xml
  3. +3
    -3
      autoload_configs/modules.conf.xml
  4. +6
    -3
      autoload_configs/sofia.conf.xml
  5. +20
    -8
      autoload_configs/switch.conf.xml
  6. +2
    -2
      autoload_configs/syslog.conf.xml
  7. +11
    -0
      opensips/dispatcher.list
  8. +53
    -0
      opensips/dispatcher.sh
  9. +557
    -0
      opensips/opensips.cfg
  10. +128
    -85
      sip_profiles/sipinterface_1.xml
  11. +0
    -132
      sip_profiles/sipinterface_2.xml

+ 9
- 8
autoload_configs/acl.conf.xml View File

@ -1,13 +1,14 @@
<configuration name="acl.conf" description="Network Lists">
<network-lists>
<list name="inbound_carriers" default="deny">
<node type="allow" cidr="172.203.215.241/32"/>
<node type="allow" cidr="72.249.14.242/32"/>
</list>
<list name="proxies" default="deny">
<node type="allow" cidr="204.232.212.190/32"/>
<list name="trusted" default="deny">
<node type="allow" cidr="173.203.215.241/32"/> <!--proxy2.switchfreedom.com-->
<node type="allow" cidr="72.249.14.242/32"/> <!--gw01-car.dal.us.icall.net-->
<node type="allow" cidr="8.19.97.6/32"/> <!--sbc01-car.dal.us.icall.net-->
<node type="allow" cidr="208.85.184.0/24"/> <!--velocity.net-->
</list>
<list name="authoritative" default="deny">
<node type="allow" cidr="184.106.172.9/32"/> <!--sipproxy001-prod-ord-->
<node type="allow" cidr="204.232.212.190/32"/> <!--sipproxy002-prod-dfw-->
</list>
</network-lists>
</configuration>

+ 15
- 4
autoload_configs/logfile.conf.xml View File

@ -7,7 +7,7 @@
<profile name="debug">
<settings>
<param name="logfile" value="/var/log/freeswitch/debug.log"/>
<param name="rollover" value="0"/>
<param name="rollover" value="26214400"/>
<param name="uuid" value="true" />
</settings>
<mappings>
@ -18,7 +18,7 @@
<profile name="error">
<settings>
<param name="logfile" value="/var/log/freeswitch/error.log"/>
<param name="rollover" value="0"/>
<param name="rollover" value="26214400"/>
<param name="uuid" value="true" />
</settings>
<mappings>
@ -29,7 +29,7 @@
<profile name="erlang">
<settings>
<param name="logfile" value="/var/log/freeswitch/erlang.log"/>
<param name="rollover" value="0"/>
<param name="rollover" value="26214400"/>
<param name="uuid" value="true" />
</settings>
<mappings>
@ -40,7 +40,7 @@
<profile name="sofia">
<settings>
<param name="logfile" value="/var/log/freeswitch/sofia.log"/>
<param name="rollover" value="0"/>
<param name="rollover" value="10485760"/>
<param name="uuid" value="true" />
</settings>
<mappings>
@ -52,5 +52,16 @@
<map name="sofia_presence.c" value="info,notice,warning,err,crit,alert"/>
</mappings>
</profile>
<profile name="siptrace">
<settings>
<param name="logfile" value="/var/log/freeswitch/siptrace.log"/>
<param name="rollover" value="26214400"/>
<param name="uuid" value="true" />
</settings>
<mappings>
<map name="sofia.c" value="debug"/>
</mappings>
</profile>
</profiles>
</configuration>

+ 3
- 3
autoload_configs/modules.conf.xml View File

@ -3,7 +3,7 @@
<!-- Loggers -->
<load module="mod_console"/>
<load module="mod_logfile"/>
<!--<load module="mod_syslog"/>-->
<load module="mod_syslog"/>
<!-- XML Interfaces -->
<!--<load module="mod_xml_cdr"/>-->
@ -26,10 +26,10 @@
<load module="mod_dptools"/>
<load module="mod_expr"/>
<load module="mod_fifo"/>
<load module="mod_voicemail"/>
<!--<load module="mod_voicemail"/>-->
<load module="mod_directory"/>
<load module="mod_esf"/>
<load module="mod_valet_parking"/>
<!--<load module="mod_valet_parking"/>-->
<load module="mod_hash"/>
<!-- Codec Interfaces -->


+ 6
- 3
autoload_configs/sofia.conf.xml View File

@ -1,8 +1,11 @@
<configuration name="sofia.conf" description="sofia Endpoint">
<global_settings>
<param name="log-level" value="4"/>
<global_settings>
<param name="log-level" value="info"/>
<param name="tracelevel" value="debug"/>
<param name="debug-presence" value="0"/>
<param name="log-auth-failures" value="true"/>
<param name="debug-sla" value="0"/>
<param name="auto-restart" value="false"/>
<!--<param name="rewrite-multicasted-fs-path" value="to_host"/>-->
</global_settings>
<profiles>


+ 20
- 8
autoload_configs/switch.conf.xml View File

@ -16,21 +16,33 @@
</cli-keybindings>
<settings>
<param name="colorize-console" value="true"/>
<param name="max-sessions" value="1000"/>
<param name="sessions-per-second" value="30"/>
<param name="loglevel" value="debug"/>
<param name="min-dtmf-duration" value="500"/>
<param name="max-dtmf-duration" value="192000"/>
<param name="default-dtmf-duration" value="1250"/>
<param name="dump-cores" value="yes"/>
<!--<param name="debug-level" value="1"/>-->
<!--<param name="sql-buffer-len" value="1"/>-->
<!--<param name="max-sql-buffer-len" value="1"/>-->
<param name="auto-create-schemas" value="true"/>
<!--<param name="enable-early-hangup" value="true"/>-->
<param name="colorize-console" value="true"/>
<param name="mailer-app" value="sendmail"/>
<param name="mailer-app-args" value="-t"/>
<param name="dump-cores" value="yes"/>
<param name="max-sessions" value="1000"/>
<param name="sessions-per-second" value="50"/>
<param name="max-dtmf-duration" value="192000"/>
<param name="min-dtmf-duration" value="400"/>
<param name="default-dtmf-duration" value="2000"/>
<!--<param name="enable-monotonic-timing" value="true"/>-->
<!--<param name="enable-clock-nanosleep" value="true"/>-->
<!--<param name="enable-cond-yield" value="true"/>-->
<!--<param name="enable-timer-matrix" value="true"/>-->
<!--<param name="verbose-channel-events" value="true"/>-->
<!--<param name="min-idle-cpu" value="15"/>-->
<!--<param name="tipping-point" value="15"/>-->
<!--<param name="timer-affinity" value="disabled"/>-->
<param name="rtp-start-port" value="16384"/>
<param name="rtp-end-port" value="32768"/>
<param name="rtp-enable-zrtp" value="false"/>
<!--<param name="core-db-dsn" value="fs_core"/>-->
<!--<param name="core-dbtype" value="MSSQL"/>-->
<param name="auto-create-schemas" value="true"/>
</settings>
</configuration>

+ 2
- 2
autoload_configs/syslog.conf.xml View File

@ -1,8 +1,8 @@
<configuration name="syslog.conf" description="Syslog Logger">
<settings>
<param name="facility" value="user"/>
<param name="facility" value="local0"/>
<param name="ident" value="freeswitch"/>
<param name="loglevel" value="err"/>
<param name="loglevel" value="debug"/>
<param name="uuid" value="true"/>
</settings>
</configuration>

+ 11
- 0
opensips/dispatcher.list View File

@ -0,0 +1,11 @@
# setit(integer) destination(sip uri) flags (integer, optional)
1 sip:184.106.179.143:5060 2
1 sip:184.106.169.42:5060 2
1 sip:209.114.34.232:5060 2
1 sip:209.114.32.203:5060 2
#1 sip:184.106.189.9:5060 2
#1 sip:184.106.170.41:5060 2
#1 sip:184.73.45.119:5060 2
#1 sip:50.16.89.56:5060 2
#1 sip:67.202.51.166:5060 2
#1 sip:50.17.16.247:5060 2

+ 53
- 0
opensips/dispatcher.sh View File

@ -0,0 +1,53 @@
#!/bin/bash
DISPATCHER_FILE="/usr/local/etc/opensips/dispatcher.list"
OSIP_CTL="/usr/local/etc/opensips/opensipsctl"
fUsage () {
echo "Usage: $0 [Media Server IP] [-a active] [-i inactive] [-p probing] [-r reload]"
exit 1
}
cd `dirname $0`
[[ ! $1 == -* ]] && server=$1 && shift
while [ -n "$*" ]; do
case "x$1" in
x-a)
action="a"
;;
x-i)
action="i"
;;
x-p)
action="p"
;;
x-r)
action="r"
;;
x--help)
fUsage
;;
*)
fUsage
;;
esac
shift
done
if [ -z $action ]; then
echo "# $OSIP_CTL fifo ds_list"
$OSIP_CTL fifo ds_list
exit 0
elif [ $action == "r" ]; then
echo "# $OSIP_CTL fifo ds_reload"
$OSIP_CTL fifo ds_reload
exit 0
elif grep -q $server $DISPATCHER_FILE; then
echo "# $OSIP_CTL fifo ds_set_state $action `grep $server $DISPATCHER_FILE | cut -d' ' -f 1` `grep $server $DISPATCHER_FILE | cut -d' ' -f 2`"
$OSIP_CTL fifo ds_set_state $action `grep $server $DISPATCHER_FILE | cut -d' ' -f 1` `grep $server $DISPATCHER_FILE | cut -d' ' -f 2`
exit 0
else
echo "ERROR: Could not locate $server in $DISPATCHER_FILE"
exit 1
fi

+ 557
- 0
opensips/opensips.cfg View File

@ -0,0 +1,557 @@
######################################################################
## Core Parameters
######################################################################
# chroot=
# group="opensips"
# user="opensips"
# dbversion_table=
disable_core_dump=no
max_while_loops=100
maxbuffer=262144
memdump=3
memlog=2
# open_files_limit=2048
server_signature=no
server_header="Server: 2600hz Trunk Store"
user_agent_header="User-Agent: 2600hz Trunk Store"
######################################################################
## Core Fork Parameters
######################################################################
fork=yes
children=8
tcp_children=8
######################################################################
## Core Logging Parameters
######################################################################
debug=3
sip_warning=0
log_stderror=no
log_facility=LOG_LOCAL0
log_name="opensips"
######################################################################
## Aliases
######################################################################
auto_aliases=no
alias=localhost
alias=localhost.localdomain
######################################################################
## Connectivity
######################################################################
listen=udp:eth0:5060
# listen=udp:eth1:5060
tos=IPTOS_LOWDELAY
# advertised_address=174.129.131.38
# advertised_port=5060
mcast_loopback=no
mcast_ttl=1
mhomed=0
# tcp_accept_aliases
tcp_connect_timeout=3
tcp_connection_lifetime=120
tcp_max_connections=2048
# tcp_poll_method=select
######################################################################
## DNS
######################################################################
dns=no
dns_retr_time=1
dns_retr_no=3
# dns_servers_no=2
dns_try_ipv6=no
disable_dns_blacklist=yes
disable_dns_failover=no
dns_use_search_list=no
rev_dns=no
######################################################################
## SIP
######################################################################
check_via=0
#! disable_503_translation=no
disable_stateless_fwd=no
disable_tcp=no
# disable_tls=no
#! reply_to_via=1
######################################################################
## TLS
######################################################################
# disable_tls=no
# listen=tls:your_IP:5061
# tls_verify_server=1
# tls_verify_client=1
# tls_require_client_certificate=0
# tls_method=TLSv1
# tls_certificate="/usr/local/etc/opensips/tls/user/user-cert.pem"
# tls_private_key="/usr/local/etc/opensips/tls/user/user-privkey.pem"
# tls_ca_list="/usr/local/etc/opensips/tls/user/user-calist.pem"
######################################################################
## Destination Blacklist
######################################################################
# dst_blacklist=gw:{( tcp , 192.168.2.100 , 5060 , "" ),( any , 192.168.2.101 , 0 , "" )}
# dst_blacklist=net_filter2:{ !( any , 192.168.30.0/255.255.255.0 , 0 , "" )}
######################################################################
## Attribute Value Pairs
######################################################################
# avp_aliases="uuid=I:660;email=s:email_addr;fwd=i:753"
######################################################################
## Module Loading
######################################################################
mpath="/usr/local/lib64/opensips/modules/"
loadmodule "memcached.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "maxfwd.so"
loadmodule "rr.so"
loadmodule "path.so"
loadmodule "uri.so"
loadmodule "textops.so"
loadmodule "usrloc.so"
loadmodule "nathelper.so"
loadmodule "dispatcher.so"
loadmodule "mi_fifo.so"
# loadmodule "mi_datagram.so"
# loadmodule "xlog.so"
######################################################################
## Memcached Module Parameters
######################################################################
modparam("memcached", "server", "callid_hash = 127.0.0.1:11211")
######################################################################
## Stateless UA Module Parameters
######################################################################
modparam("sl", "enable_stats", 1)
######################################################################
## SIP Transaction UA Module Parameters
######################################################################
modparam("tm", "fr_timer", 5)
# modparam("tm", "fr_inv_timer", 60)
# modparam("tm", "wt_timer", 5)
# modparam("tm", "delete_timer", 2)
# modparam("tm", "T1_timer", 500)
# modparam("tm", "T2_timer", 4000)
# modparam("tm", "ruri_matching", 1)
# modparam("tm", "via1_matching", 1)
# modparam("tm", "unix_tx_timeout", 2)
# modparam("tm", "restart_fr_on_each_reply", 1)
# modparam("tm", "fr_timer_avp", "$avp(i:24)")
# modparam("tm", "fr_inv_timer_avp", "$avp(i:25)")
# modparam("tm", "tw_append",
# "test: ua=$hdr(User-Agent) ;avp=$avp(i:10);$rb;time=$Ts")
# modparam("tm", "pass_provisional_replies", 0)
# modparam("tm", "syn_branch", 1)
# modparam("tm", "onreply_avp_mode", 0)
# modparam("tm", "disable_6xx_block", 0)
# modparam("tm", "enable_stats", 1)
# modparam("tm", "minor_branch_flag", 3)
######################################################################
## Max Forward Module Parameters
######################################################################
modparam("maxfwd", "max_limit", 30)
######################################################################
## Record Route Module Parameters
######################################################################
modparam("rr", "enable_full_lr", 1)
modparam("rr", "append_fromtag", 1)
modparam("rr", "enable_double_rr", 0)
modparam("rr", "add_username", 0)
######################################################################
## Path Module Parameters
######################################################################
modparam("path", "use_received", 1)
######################################################################
## URI Module Parameters
######################################################################
# modparam("uri", "aaa_url", "radius:/etc/radiusclient-ng/radiusclient.conf")
modparam("uri", "use_sip_uri_host", 0)
modparam("uri", "use_uri_table", 0)
modparam("uri", "service_type", 10)
modparam("uri", "use_domain", 1)
modparam("uri", "use_uri_table", 0)
# modparam("uri", "db_url", "mysql://username:password@localhost/opensips")
# modparam("uri", "db_table", "uri")
# modparam("uri", "user_column", "username")
# modparam("uri", "domain_column", "domain")
# modparam("uri", "uriuser_column", "uri_user")
######################################################################
## User Location Module Parameters
######################################################################
modparam("usrloc", "nat_bflag", 6)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "desc_time_order", 0)
modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "cseq_delay", 20)
modparam("usrloc", "hash_size", 9)
modparam("usrloc", "db_mode", 0)
# modparam("usrloc", "db_url", "dbdriver://username:password@dbhost/dbname")
modparam("usrloc", "fetch_rows", 2000)
modparam("usrloc", "user_column", "username")
modparam("usrloc", "domain_column", "domain")
modparam("usrloc", "contact_column", "contact")
modparam("usrloc", "expires_column", "expires")
modparam("usrloc", "q_column", "q")
modparam("usrloc", "callid_column", "callid")
modparam("usrloc", "cseq_column", "cseq")
modparam("usrloc", "methods_column", "methods")
modparam("usrloc", "flags_column", "flags")
modparam("usrloc", "cflags_column", "cflags")
modparam("usrloc", "user_agent_column", "user_agent")
modparam("usrloc", "received_column", "received")
modparam("usrloc", "socket_column", "socket")
modparam("usrloc", "path_column", "path")
######################################################################
## Nathelper Module Parameters
######################################################################
# modparam("nathelper", "rtpproxy_sock", "udp:127.0.0.1:7890")
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
# modparam("nathelper", "natping_processes", 3)
modparam("nathelper", "sipping_bflag", 7)
modparam("nathelper", "sipping_from", "sip:sipcheck@184.106.172.9 ")
# modparam("nathelper", "sipping_method", "INFO")
######################################################################
## Dispatcher Module Parameters
######################################################################
modparam("dispatcher", "list_file", "/usr/local/etc/opensips/dispatcher.list")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "use_default", 0)
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "attrs_avp", "$avp(i:272)")
modparam("dispatcher", "grp_avp", "$avp(i:273)")
modparam("dispatcher", "cnt_avp", "$avp(i:274)")
modparam("dispatcher", "hash_pvar", "$avp(i:273)")
# modparam("dispatcher", "setid_pvar", "$var(setid)")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_from", "sip:sipcheck@184.106.172.9:5060")
modparam("dispatcher", "ds_ping_interval", 10)
# modparam("dispatcher", "ds_ping_sock", "udp:10.80.25.168:5080")
modparam("dispatcher", "ds_probing_threshhold", 3)
modparam("dispatcher", "ds_probing_mode", 0)
modparam("dispatcher", "options_reply_codes", "501, 403, 404, 400")
######################################################################
## MI-FIFO Module Parameters
######################################################################
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
######################################################################
## MI-Datagram Module Parameters
######################################################################
# modparam("mi_datagram", "socket_name", "udp:10.180.180.230:8889")
# modparam("mi_datagram", "children_count", 1)
# modparam("mi_datagram", "unix_socket_mode", 0600)
# modparam("mi_datagram", "unix_socket_group", "root")
# modparam("mi_datagram", "unix_socket_user", "root")
# modparam("mi_datagram", "socket_timeout", 2000)
# modparam("mi_datagram", "reply_indent", "\t")
######################################################################
## XLog Module Parameters
######################################################################
# modparam("xlog", "buf_size", 4096)
# modparam("xlog", "force_color", 0)
######################################################################
## Multiple Module Parameters
######################################################################
######################################################################
## Main Request Routing
######################################################################
route
{
if (!mf_process_maxfwd_header("10"))
{
xlog("L_WARN", "To many hops to [$ou] from [$si:$sp]");
sl_send_reply("483", "We refuse to process this endless imbroglio");
exit;
}
xlog("L_INFO", "Received [$rm] [$ou] from [$si:$sp]");
xlog("L_DBG", " From: [$fu]");
xlog("L_DBG", " To: [$tu]");
if (is_method("OPTIONS"))
{
xlog("L_NOTICE", " Method [$rm] is not supported, sending 503 to [$si:$sp]");
sl_send_reply("503", "Rawr!!");
exit;
}
t_on_reply("1");
if (nat_uac_test("18"))
{
xlog("L_INFO", " Source port is different from the port in Via, force rport");
force_rport();
fix_nated_contact();
if (has_body("application/sdp"))
{
xlog("L_INFO", " Fixing nated SDP, rewritting media and origin with [$si]");
fix_nated_sdp("10");
}
# If this leads to a sucessfull register then flag 5 will cause nat=yes to be append to the contact
# and (when appropriate) the use of the nat_compensator reply branch
setflag(5);
}
if (has_totag())
{
if (subst_uri('/(sip:.*);nat=yes/\1/'))
{
xlog("L_INFO", " Set reply branch for NAT compensation on this message in the existing dialog");
t_on_reply("nat_compensator");
}
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route())
{
if (is_method("INVITE"))
{
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
xlog("L_INFO", " Record route for loosely routed INVITE on an existing dialog");
#record_route();
}
# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(1);
}
else
{
if ( is_method("ACK") )
{
if ( t_check_trans() )
{
# non loose-route, but stateful ACK; must be an ACK after
# a 487 or e.g. 404 from upstream server
xlog("L_INFO", " Forwarding a stateful ACK for a known dialog");
t_relay();
exit;
}
else
{
# ACK without matching transaction ->
# ignore and discard
xlog("L_NOTICE", " Recieved ACK from [$si:$sp] for unknown dialog, ignoring");
exit;
}
}
xlog("L_WARN", " Recieved [$rm] for a dialog but the RR is invalid, sending 486 to [$si:$sp]");
sl_send_reply("486", "PC Load Letter");
}
exit;
}
# CANCEL processing
if (is_method("CANCEL"))
{
# If this cancel is part of a transaction
# then pass it along to concerned parties
if (t_check_trans())
{
t_relay();
}
exit;
}
# If this is a retransmission it will break/stop the script
# and do standard processing of the message
t_check_trans();
# Since it is possible to suppress a second provisional response, the first one can be sent pre-emptively
sl_send_reply("100", "Thinking about it...");
# preloaded route checking
if (loose_route())
{
if (!is_method("ACK"))
{
xlog("L_WARN", " Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci] from [$si:$sp]");
sl_send_reply("403", "Please leave the routing up to us");
exit;
}
}
if (is_method("REGISTER"))
{
if (!add_path_received())
{
xlog("L_ERR", " Unable to add path for [$rm] [$tu] from [$si:$sp], sending 503");
sl_send_reply("503", "Internal path befuddlement");
exit;
}
}
# is not from media servers
if (!ds_is_in_list("$si", "$sp", "1") and !ds_is_in_list("$si", "$sp", "2"))
{
if(cache_fetch("memcached_callid_hash", "$ci", $avp(i:55)))
{
$rd = $avp(i:55);
xlog("L_INFO", " Reconized call-id [$ci] as belonging to media server [$rd]");
}
else
{
xlog("L_INFO", " Selecting domain from set 1 using round-robin");
ds_select_domain("1", "4");
t_on_failure("1");
}
append_hf("X-AUTH-IP: $si\r\n");
if (isflagset(5))
{
xlog("L_INFO", " This contact is behind NAT, appending nat=yes to the Contact header");
# "nat=yes" is added to help with in-dialog re-INVITE, UPDATE, etc.
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
}
}
# record routing
if (!is_method("REGISTER|MESSAGE"))
{
# Record the route that this request has taken
# so we remain in the signaling path
xlog("L_INFO", " Adding record route to this message");
record_route();
}
route(1);
}
route[1]
{
if (!t_relay())
{
xlog("L_ERR", " Unable to relay [$rm] [$ru] to [$du], sending 500");
sl_reply_error();
}
xlog("L_INFO", " Sent [$rm] [$ru] to [$rd]");
exit;
}
onreply_route[1]
{
if (t_check_status("(407)|(401)"))
{
cache_store("memcached_callid_hash", "$ci ", "$si", 60);
xlog("L_INFO", " Stored call-id [$ci] as belonging to media server [$si]");
}
}
onreply_route[nat_compensator]
{
xlog("L_INFO ", " Compensating reply from NATed message [$rs] [$rr]");
if (t_check_status("(407)|(401)"))
{
cache_store("memcached_callid_hash", "$ci ", "$si", 60);
xlog("L_INFO", " Stored call-id [$ci] for NATed reply as belonging to media server [$si]");
}
if (has_body("application/sdp"))
{
xlog("L_INFO", " Fixing nated reply SDP, rewritting media and origin with [$si]");
fix_nated_sdp("10");
}
if (is_present_hf("Contact"))
{
xlog("L_INFO", " Fixing nated reply contact header");
fix_nated_contact();
#search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
}
}
failure_route[1]
{
if (t_was_cancelled())
{
exit;
}
if (t_check_status("(408)|(5[0-9][0-9])"))
{
xlog("L_ERR", " Media server [$rd] replied with error [$rs] for [$ru], disabling");
ds_mark_dst("p");
if (ds_next_domain())
{
xlog("L_ERR", " Hunting for avaliable media server...");
xlog("L_INFO", " Sent [$rm] [$ru] to [$rd]");
t_relay();
exit;
}
}
else if(!cache_fetch("memcached_callid_hash", "$ci", $avp(i:55)))
{
xlog("L_INFO", " Failed to route call from carrier, sending 486");
t_reply("486", "The ratio of people to cake is too big");
}
exit;
}

+ 128
- 85
sip_profiles/sipinterface_1.xml View File

@ -1,131 +1,174 @@
<?xml version="1.0"?>
<include>
<profile name="sipinterface_1">
<domains>
<domain name="all" alias="true" parse="false"/>
</domains>
<settings>
<!-- ACL -->
<param name="auth-calls" value="true"/>
<param name="apply-nat-acl" value="rfc1918"/>
<param name="apply-inbound-acl" value="trusted"/>
<param name="apply-proxy-acl" value="authoritative"/>
<param name="local-network-acl" value="localnet.auto"/>
<!--<param name="apply-register-acl" value="domains"/>-->
<!-- Authentication -->
<param name="challenge-realm" value="auto_from"/>
<param name="multiple-registrations" value="false"/>
<!--<param name="max-registrations-per-extension" value="1"/>-->
<param name="accept-blind-reg" value="false"/>
<param name="accept-blind-auth" value="false"/>
<param name="nonce-ttl" value="86400"/>
<param name="disable-register" value="false"/>
<!--<param name="NDLB-broken-auth-hash" value="true"/>-->
<param name="inbound-reg-force-matching-username" value="true"/>
<param name="auth-all-packets" value="false"/>
<!--<param name="user-agent-filter" value=""/>-->
<!--<param name="force-register-domain" value="sip.2600hz.com"/>-->
<!--<param name="force-register-db-domain" value="sip.2600hz.com"/>-->
<!-- Routing -->
<!--<param name="username" value="default"/>-->
<param name="context" value="context_2"/>
<param name="dialplan" value="XML"/>
<!--<param name="full-id-in-dialplan" value="false"/>-->
<param name="manual-redirect" value="false"/>
<param name="disable-transfer" value="false"/>
<!-- SIP -->
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="auto"/>
<param name="user-agent-string" value="2600hz.org"/>
<param name="debug" value="0"/>
<param name="sip-trace" value="yes"/>
<param name="ext-sip-ip" value="auto"/>
<param name="sip-port" value="5060"/>
<!--<param name="outbound-proxy" value="127.0.0.1"/>-->
<!--<param name="sip-domain" value="sip.2600hz.com"/>-->
<!--<param name="contact-user" value="sip.2600hz.com"/>-->
<param name="user-agent-string" value="sip.2600hz.com"/>
<param name="enable-100rel" value="false"/>
<param name="max-proceeding" value="1000"/>
<param name="sip-port" value="5060"/>
<!--<param name="max-calls" value="250"/>-->
<!--<param name="track-calls" value="true"/>-->
<param name="inbound-use-callid-as-uuid" value="true"/>
<param name="outbound-use-uuid-as-callid" value="true"/>
<param name="nat-options-ping" value="true"/>
<!--<param name="bind-params" value="transport=udp"/>-->
<!--<param name="enable-compact-headers" value="true"/>-->
<!--<param name="extended-info-parsing" value="true"/>-->
<!--<param name="enable-soa" value="false" />-->
<!--<param name="disable-srv" value="false" />-->
<!--<param name="disable-naptr" value="false" />-->
<!--<param name="disable-naptr" value="false" />-->
<!--<param name="enable-3pcc" value="true"/>-->
<!--<param name="auto-restart" value="false"/> -->
<param name="auto-restart" value="false"/>
<!-- TLS -->
<param name="tls" value="false"/>
<param name="tls-bind-params" value="transport=tls"/>
<param name="tls-sip-port" value="5070"/>
<param name="tls-version" value="tlsv1"/>
<!-- Media -->
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="auto"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="auto"/>
<param name="rtp-timer-name" value="soft"/>
<param name="rtp-autoflush-during-bridge" value="true"/>
<!--<param name="rtp-rewrite-timestamps" value="true"/>-->
<param name="pass-rfc2833" value="true"/>
<!--<param name="inbound-bypass-media" value="true"/>-->
<!--<param name="rtp-timeout-sec" value="true"/>-->
<param name="hold-music" value="local_stream://default"/>
<!--<param name="media-option" value="resume-media-on-hold"/>-->
<!--<param name="media-option" value="bypass-media-after-att-xfer"/>-->
<!--<param name="disable-rtp-auto-adjust" value="true"/>-->
<!--<param name="rtp-autofix-timing" value="false"/>-->
<!--<param name="auto-rtp-bugs" data="clear"/>-->
<!--<param name="suppress-cng" value="true"/> -->
<param name="inbound-bypass-media" value="true"/>
<!--<param name="media-option" value="resume-media-on-hold"/>-->
<!--<param name="media-option" value="bypass-media-after-att-xfer"/>-->
<!--<param name="rtp-timeout-sec" value="true"/>-->
<param name="hold-music" value="local_stream://default"/>
<!--<param name="suppress-cng" value="true"/>-->
<!--<param name="cng-pt" value="13"/>-->
<!--<param name="ignore-183nosdp" value="false"/>-->
<!--<param name="vad" value="out"/>-->
<param name="record-path" value="$${recordings_dir}"/>
<param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
<!--<param name="NDLB-sendrecv-in-session" value="true"/>-->
<!--<param name="NDLB-support-asterisk-missing-srtp-auth" value="true"/>-->
<!--<param name="require-secure-rtp" value="true"/>-->
<!--<param name="auto-jitterbuffer-msec" value="120"/>-->
<!-- TLS -->
<param name="tls" value="false"/>
<!--<param name="tls-bind-params" value="transport=tls"/>-->
<!--<param name="tls-sip-port" value="5070"/>-->
<!--<param name="tls-version" value="tlsv1"/>-->
<!-- DTMF -->
<param name="dtmf-duration" value="100"/>
<param name="dtmf-duration" value="2000"/>
<param name="rfc2833-pt" value="101"/>
<param name="dtmf-type" value="rfc2833"/>
<!-- Dialplan -->
<param name="context" value="context_2"/>
<param name="dialplan" value="XML"/>
<param name="manual-redirect" value="true"/>
<param name="disable-transfer" value="false"/>
<!-- ACL -->
<param name="apply-nat-acl" value="nat.auto"/>
<param name="apply-inbound-acl" value="inbound_carriers"/>
<param name="local-network-acl" value="localnet.auto"/>
<!--<param name="apply-register-acl" value="domains"/>-->
<param name="auth-calls" value="true"/>
<!-- Presence -->
<param name="manage-presence" value="true"/>
<!--<param name="manage-shared-appearance" value="true"/>-->
<!--<param name="dbname" value="share_presence"/>-->
<!--<param name="presence-hosts" value=".2600hz.org"/>-->
<param name="force-subscription-expires" value="360"/>
<param name="send-message-query-on-register" value="true"/>
<param name="pass-rfc2833" value="true"/>
<!-- Codecs -->
<param name="codec-prefs" value="G729,PCMU"/>
<param name="inbound-codec-negotiation" value="generous"/>
<param name="inbound-late-negotiation" value="true"/>
<param name="codec-prefs" value="G729,G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM"/>
<!--<param name="bitpacking" value="aal2"/> -->
<!--<param name="bitpacking" value="aal2"/> -->
<param name="disable-transcoding" value="false"/>
<!-- Session Timers -->
<!--<param name="NDLB-allow-bad-iananame" value="true"/>-->
<!--<param name="t38-passthru" value="true"/>-->
<!-- NAT -->
<param name="nat-options-ping" value="true"/>
<!--<param name="all-reg-options-ping" value="true"/>-->
<!--<param name="unregister-on-options-fail" value="true"/>-->
<!--<param name="aggressive-nat-detection" value="true"/>-->
<!--<param name="NDLB-force-rport" value="safe"/>-->
<!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
<!--<param name="NDLB-funny-stun" value="true"/>-->
<!--<param name="stun-enabled" value="true"/>-->
<!--<param name="stun-auto-disable" value="true"/>-->
<!-- Session Timers -->
<param name="enable-timer" value="false"/>
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<param name="minimum-session-expires" value="120"/>
<param name="session-timeout" value="120"/>
<!--<param name="enable-timer" value="false"/>-->
<!--<param name="timer-T1" value="500"/>-->
<!--<param name="timer-T1X64" value="32000"/>-->
<!--<param name="timer-T2" value="4000"/>-->
<!--<param name="timer-T4" value="4000"/> -->
<!-- Authentication -->
<param name="challenge-realm" value="auto_from"/>
<param name="multiple-registrations" value="false"/>
<!--<param name="unregister-on-options-fail" value="true"/>-->
<param name="accept-blind-reg" value="false"/>
<param name="accept-blind-auth" value="false"/>
<param name="nonce-ttl" value="86400"/>
<param name="disable-register" value="false"/>
<!--<param name="NDLB-broken-auth-hash" value="true"/>-->
<!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
<!--<param name="NDLB-force-rport" value="true"/>-->
<param name="inbound-reg-force-matching-username" value="true"/>
<param name="auth-all-packets" value="false"/>
<!--<param name="force-register-domain" value="trunks.2600hz.com"/>-->
<!--<param name="force-register-db-domain" value="trunks.2600hz.com"/>-->
<!-- CID -->
<!--<param name="cid-in-1xx" value="false"/>-->
<!--<param name="caller-id-type" value="rpid"/>-->
<!--<param name="pass-callee-id" value="false"/>-->
<!-- Subscription and Presence -->
<param name="manage-presence" value="false"/>
<!--<param name="delete-subs-on-register" value="false"/>-->
<!--<param name="manage-shared-appearance" value="true"/>-->
<!--<param name="dbname" value="share_presence"/>-->
<!--<param name="presence-hosts" value=".2600hz.org"/>-->
<!--<param name="force-subscription-expires" value="360"/>-->
<!--<param name="send-message-query-on-register" value="true"/>-->
<!--<param name="send-presence-on-register" value="true"/> -->
<!--<param name="force-publish-expires" value="true"/>-->
<!--<param name="forward-unsolicited-mwi-notify" value="true"/>-->
<!--<param name="presence-probe-on-register" value="true"/>-->
<!--<param name="in-dialog-chat" value="true"/>-->
<!-- ODBC -->
<!--<param name="odbc-dsn" value="fs_sofia"/>-->
<!--<param name="sql-in-transactions" value="true"/>--> -->
<!-- Watchdog -->
<param name="watchdog-enabled" value="false"/>
<!--<param name="watchdog-step-timeout" value="30000"/>-->
<!--<param name="watchdog-event-timeout" value="30000"/>-->
<!-- LOGGING -->
<param name="log-level" value="3"/>
<param name="debug-presence" value="3"/>
<param name="debug" value="info"/>
<param name="sip-trace" value="true"/>
<param name="log-auth-failures" value="true"/>
</settings>
</profile>


+ 0
- 132
sip_profiles/sipinterface_2.xml View File

@ -1,132 +0,0 @@
<?xml version="1.0"?>
<include>
<profile name="sipinterface_2">
<domains>
<domain name="all" alias="true" parse="false"/>
</domains>
<settings>
<!-- SIP -->
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-sip-ip" value="auto"/>
<param name="user-agent-string" value="2600hz.org"/>
<param name="debug" value="0"/>
<param name="sip-trace" value="yes"/>
<param name="enable-100rel" value="false"/>
<param name="max-proceeding" value="1000"/>
<param name="sip-port" value="5080"/>
<param name="inbound-use-callid-as-uuid" value="true"/>
<param name="outbound-use-uuid-as-callid" value="true"/>
<param name="nat-options-ping" value="true"/>
<!--<param name="disable-srv" value="false" />-->
<!--<param name="disable-naptr" value="false" />-->
<!--<param name="enable-3pcc" value="true"/>-->
<!--<param name="auto-restart" value="false"/> -->
<param name="auto-restart" value="false"/>
<!-- TLS -->
<param name="tls" value="false"/>
<param name="tls-bind-params" value="transport=tls"/>
<param name="tls-sip-port" value="5090"/>
<param name="tls-version" value="tlsv1"/>
<!-- Media -->
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="auto"/>
<param name="rtp-timer-name" value="soft"/>
<param name="rtp-autoflush-during-bridge" value="true"/>
<!--<param name="rtp-rewrite-timestamps" value="true"/>-->
<param name="pass-rfc2833" value="true"/>
<!--<param name="inbound-bypass-media" value="true"/>-->
<!--<param name="rtp-timeout-sec" value="true"/>-->
<param name="hold-music" value="local_stream://default"/>
<!--<param name="media-option" value="resume-media-on-hold"/>-->
<!--<param name="media-option" value="bypass-media-after-att-xfer"/>-->
<!--<param name="disable-rtp-auto-adjust" value="true"/>-->
<!--<param name="rtp-autofix-timing" value="false"/>-->
<!--<param name="auto-rtp-bugs" data="clear"/>-->
<!--<param name="suppress-cng" value="true"/> -->
<param name="record-path" value="$${recordings_dir}"/>
<param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
<!-- DTMF -->
<param name="dtmf-duration" value="100"/>
<param name="rfc2833-pt" value="101"/>
<param name="dtmf-type" value="rfc2833"/>
<!-- Dialplan -->
<param name="context" value="context_2"/>
<param name="dialplan" value="XML"/>
<param name="manual-redirect" value="true"/>
<param name="disable-transfer" value="false"/>
<!-- ACL -->
<param name="apply-nat-acl" value="nat.auto"/>
<param name="apply-inbound-acl" value="proxies"/>
<param name="local-network-acl" value="localnet.auto"/>
<!--<param name="apply-register-acl" value="domains"/>-->
<param name="auth-calls" value="true"/>
<!-- Presence -->
<param name="manage-presence" value="true"/>
<!--<param name="manage-shared-appearance" value="true"/>-->
<!--<param name="dbname" value="share_presence"/>-->
<!--<param name="presence-hosts" value=".2600hz.org"/>-->
<param name="force-subscription-expires" value="360"/>
<param name="send-message-query-on-register" value="true"/>
<!-- Codecs -->
<param name="inbound-codec-negotiation" value="generous"/>
<param name="inbound-late-negotiation" value="true"/>
<param name="codec-prefs" value="G729,G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM"/>
<!--<param name="bitpacking" value="aal2"/> -->
<param name="disable-transcoding" value="false"/>
<!-- Session Timers -->
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<param name="minimum-session-expires" value="120"/>
<param name="session-timeout" value="120"/>
<!--<param name="enable-timer" value="false"/>-->
<!--<param name="timer-T1" value="500"/>-->
<!--<param name="timer-T1X64" value="32000"/>-->
<!--<param name="timer-T2" value="4000"/>-->
<!--<param name="timer-T4" value="4000"/> -->
<!-- Authentication -->
<param name="challenge-realm" value="auto_from"/>
<param name="multiple-registrations" value="false"/>
<!--<param name="unregister-on-options-fail" value="true"/>-->
<param name="accept-blind-reg" value="false"/>
<param name="accept-blind-auth" value="false"/>
<param name="nonce-ttl" value="86400"/>
<param name="disable-register" value="false"/>
<!--<param name="NDLB-broken-auth-hash" value="true"/>-->
<!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
<!--<param name="NDLB-force-rport" value="true"/>-->
<param name="inbound-reg-force-matching-username" value="true"/>
<param name="auth-all-packets" value="false"/>
<!--<param name="force-register-domain" value="trunks.2600hz.com"/>-->
<!--<param name="force-register-db-domain" value="trunks.2600hz.com"/>-->
<!-- ODBC -->
<!--<param name="odbc-dsn" value="fs_sofia"/>-->
<!-- LOGGING -->
<param name="log-level" value="3"/>
<param name="debug-presence" value="3"/>
<param name="log-auth-failures" value="true"/>
</settings>
</profile>
</include>

Loading…
Cancel
Save