From SIPfoundry sipx, The Open Source SIP PBX for Linux - Calivia
IP.ADDR.OF.DNS - The IP address of your DNS server
IP.ADDR.OF.NTP - The IP address of your NTP server
GW.SIP.DOMAIN - The FQDN of your gateway
IP.ADDR.OF.GW - The Ethernet IP Address of your gateway
SUB.NET.MASK.GW - The Subnet Mask of the gateway
IP.ADDR.OF.DEFGW - The IP address of the network default IP gateway
SIP.DOMAIN - The SIP Domain setup in your SRV records
#----------------------------------------------------------------#
# #
# SN4524/JO/EUI #
# #
#----------------------------------------------------------------#
cli version 3.20
dns-client server IP.ADDR.OF.DNS
dns-relay
webserver port 80 language en
sntp-client
clock local offset -04:00
sntp-client server primary IP.ADDR.OF.NTP port 123 version 4
system hostname GW.SIP.DOMAIN
system
ic voice 0
low-bitrate-codec g729
profile napt NAPT
profile ppp default
profile tone-set default
profile call-progress-tone US_Dialtone
play 1 0 350 -13 440 -13
profile call-progress-tone US_Alertingtone
play 1 2000 440 -19 480 -19
pause 2 4000
profile call-progress-tone US_Busytone
play 1 500 480 -24 620 -24
pause 2 500
profile call-progress-tone US_FastBusy
play 1 250 480 -24 620 -24
pause 2 250
profile tone-set default
profile tone-set US
map call-progress-tone dial-tone US_Dialtone
map call-progress-tone ringback-tone US_Alertingtone
map call-progress-tone busy-tone US_Busytone
map call-progress-tone release-tone US_FastBusy
map call-progress-tone congestion-tone US_Busytone
profile voip default
codec 1 g711ulaw64k rx-length 20 tx-length 20
profile pstn default
profile sip default
profile dhcp-server DHCP
network 192.168.1.0 255.255.255.0
include 1 192.168.1.10 192.168.1.99
lease 2 hours
default-router 1 192.168.1.1
domain-name-server 1 192.168.1.1
profile aaa default
method 1 local
method 2 none
context ip router
interface eth0
ipaddress IP.ADDR.OF.GW SUB.NET.MASK.GW
tcp adjust-mss rx mtu
tcp adjust-mss tx mtu
context ip router
route 0.0.0.0 0.0.0.0 IP.ADDR.OF.DEFGW 0
context cs switch
digit-collection timeout 3
routing-table called-e164 TAB_IF_DESTINATION_OF_SIPX
#
# The following commented out default would cause outgoing
# calls to go via CallCentric and not an FXO
#
# route default dest-service OUTGOING_CALL_HUNT
#
route default dest-service FXOHUNT
route 18.% dest-service FXOHUNT
route 519.% dest-service FXOHUNT
route 011.% dest-service FXOHUNT
route 911 dest-service FXOHUNT
mapping-table called-e164 to called-e164 LSTRIP_1
map .(.%) to \1
interface sip IF_SIPX
bind gateway GW_SIPX
service default
route call dest-table TAB_IF_DESTINATION_OF_SIPX
remote SIP.DOMAIN
use profile voip default
interface fxo IF_FXO0
route call dest-table TAB_IF_DESTINATION_OF_CALLCENTRIC
#
# The loop-break-duration attributes are new to the Smartnode
# Firmware Technology Release from mid June. However, after
# running that firmware for three days, the SmartNode stopped
# answering and I had to power cycle the SmartNode.
# I rolled back to the previous release which has proven stable
#
loop-break-duration min 60 max 100
disconnect-signal loop-break
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US
interface fxo IF_FXO1
route call dest-table TAB_IF_DESTINATION_OF_CALLCENTRIC
#
# The loop-break-duration attributes are new to the Smartnode
# Firmware Technology Release from mid June. However, after
# running that firmware for three days, the SmartNode stopped
# answering and I had to power cycle the SmartNode.
# I rolled back to the previous release which has proven stable
#
loop-break-duration min 60 max 100
disconnect-signal loop-break
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US
interface fxo IF_FXO2
route call dest-table TAB_IF_DESTINATION_OF_CALLCENTRIC
#
# The loop-break-duration attributes are new to the Smartnode
# Firmware Technology Release from mid June. However, after
# running that firmware for three days, the SmartNode stopped
# answering and I had to power cycle the SmartNode.
# I rolled back to the previous release which has proven stable
#
loop-break-duration min 60 max 100
disconnect-signal loop-break
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US
interface sip IF_CALLCENTRIC
bind gateway GW_CALLCENTRIC
service default
route call dest-table TAB_IF_DESTINATION_OF_CALLCENTRIC
remote callcentric.com
#
# Substitute callcentric number for 17770000000 below
# (callcentric numbers starts with 777)
#
address-translation outgoing-call from-header user-part fix 17770000000 host-part domain
address-translation outgoing-call to-header user-part call host-part domain
address-translation incoming-call called-e164 to-header
############################
service hunt-group FXOHUNT
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
drop-cause user-busy
drop-cause destination-out-of-order
route call 2 dest-interface IF_FXO2
route call 3 dest-interface IF_FXO1
route call 4 dest-interface IF_FXO0
############################
# I THINK THE FOLLOWING IS UNNECESSARY SINCE WE NEVER GET
# A 9 IN FRONT
mapping-table called-e164 to called-e164 FIX_TO_CALLCENTRIC
map 91(..........) to 1
routing-table called-e164 PREP-CALLCENTRIC
route .% dest-interface IF_CALLCENTRIC FIX_TO_CALLCENTRIC
service hunt-group OUTGOING_CALL_HUNT
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
drop-cause user-busy
drop-cause destination-out-of-order
route call 1 dest-table PREP-CALLCENTRIC
routing-table called-e164 TAB_IF_DESTINATION_OF_CALLCENTRIC
route default dest-service INCOMING_EXTENSION_MAP
############################
# The following mappings are setup because I have some
# callcentric DID numbers forwarding directly to internal extensions
mapping-table called-e164 to called-e164 MAP_CC_TO_SIPX
# The free callcentric number
map 17770000000 to 201
# A CallCentric DID
map 17160000002 to 202
map 17160000003 to 203
# Anything else comes into the autoattendant
map default to 100
routing-table called-e164 PREP-SIPX
route .% dest-interface IF_SIPX MAP_CC_TO_SIPX
service hunt-group INCOMING_EXTENSION_MAP
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
drop-cause user-busy
drop-cause destination-out-of-order
route call 1 dest-table PREP-SIPX
############################
context cs switch
no shutdown
gateway sip GW_CALLCENTRIC
call-signaling-port 5062
bind interface eth0 router
service default
domain callcentric.com
registration manual callcentric.com
#
# Substitute Callcentric number, password, and name below
#
user 17770000000 authenticate password mysecretpassword register display-name "Joe Smoe"
gateway sip GW_CALLCENTRIC
no shutdown
gateway sip GW_SIPX
bind interface eth0 router
service default
#
# I have the following setup on sipx, but I think I only did
# it for testing
#
registrar sipx.mycompany.com
user 250 password sip_password_for_user_250
gateway sip GW_SIPX
no shutdown
####################################################
port ethernet 0 0
medium auto
encapsulation ip
bind interface eth0 router
no shutdown
port fxo 0 0
flash-hook-duration 50
use profile fxo us
caller-id format bell
encapsulation cc-fxo
bind interface IF_FXO0 switch
no shutdown
port fxo 0 1
flash-hook-duration 50
use profile fxo us
caller-id format bell
encapsulation cc-fxo
bind interface IF_FXO1 switch
no shutdown
port fxo 0 2
flash-hook-duration 50
use profile fxo us
caller-id format bell
encapsulation cc-fxo
bind interface IF_FXO2 switch
no shutdown
port fxo 0 3
shutdown