The following configuration is for a Patton SmartNode 4118 gateway (4 FXO and 4 FXS ports).

The FXO ports are set to ring in to sip:100@xyz.com. Also oubound dialing on the FXO ports is in reverse port order.

The FXS ports are set to register with the SIP pbx (SRV records are being used). The extensions used are 614, 615, 616 and 617.

Caller-id is also being used in this example.

Also, the gateway is not stripping any digits, it is simply dialing what is passed to it.

#----------------------------------------------------------------#

  1. #
  2. SN4118/4JS4JO/EUI #
  3. R3.20 2006-05-23 H323 SIP FXS FXO #
  4. 2006-09-04T07:48:18 #
  5. Generated configuration file #
  6. #
    #----------------------------------------------------------------#

cli version 3.20
administrator administrator password ****** encrypted
dns-client server XXX.XXX.XXX.XXX
dns-client server XXX.XXX.XXX.XXX
webserver port 80 language en
sntp-client
sntp-client server primary time-b.nist.gov port 123 version 4
sntp-client server secondary 192.43.244.18 port 123 version 4
sntp-client poll-interval 36000
sntp-client local-clock-offset
sntp-client gmt-offset - 05:00:00
system hostname gateway.xyz.com

system

ic voice 0
low-bitrate-codec g729

profile ppp 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
codec 2 g729 rx-length 20 tx-length 20
fax transmission 1 relay t38-udp
fax transmission 2 bypass g711ulaw64k

profile pstn default

profile sip default

profile aaa default
method 1 local
method 2 none

context ip router

interface eth0
ipaddress XXX.XXX.XXX.XXX 255.255.255.0
tcp adjust-mss rx mtu
tcp adjust-mss tx mtu

context ip router
route 0.0.0.0 0.0.0.0 172.16.16.1 0

context cs switch
digit-collection timeout 3

routing-table called-e164 TAB-OUT
route .%T dest-interface IF-SIP

routing-table called-e164 TAB-IN
route 614 dest-interface IF-FXS0
route 615 dest-interface IF-FXS1
route 616 dest-interface IF-FXS2
route 617 dest-interface IF-FXS3
route default dest-service FXOHUNT

mapping-table called-e164 to called-e164 STRIP
map .% to \1

interface sip IF-SIP
bind gateway GW-SIP
service default
route call dest-table TAB-IN
remote xyz.com

interface sip IF-SIP1
bind gateway GW-SIP
service default
route call dest-table TAB-IN
remote xyz.com
address-translation outgoing-call to-header user-part fix 100 host-part interface

interface fxs IF-FXS0
route call dest-table TAB-OUT
no call-waiting
call-transfer
caller-id-presentation mid-ring
subscriber-number 614
use profile tone-set US

interface fxs IF-FXS1
route call dest-table TAB-OUT
no call-waiting
call-transfer
caller-id-presentation mid-ring
subscriber-number 615
use profile tone-set US

interface fxs IF-FXS2
route call dest-table TAB-OUT
no call-waiting
call-transfer
caller-id-presentation mid-ring
subscriber-number 616
use profile tone-set US

interface fxs IF-FXS3
route call dest-table TAB-OUT
no call-waiting
call-transfer
caller-id-presentation mid-ring
subscriber-number 617
use profile tone-set US

interface fxo PSTN
ring-number on-caller-id
use profile tone-set US

interface fxo IF_FXO0
route call dest-interface IF-SIP1
disconnect-signal busy-tone
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US

interface fxo IF_FXO1
route call dest-interface IF-SIP1
disconnect-signal busy-tone
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US

interface fxo IF_FXO2
route call dest-interface IF-SIP1
disconnect-signal busy-tone
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US

interface fxo IF_FXO3
route call dest-interface IF-SIP1
disconnect-signal busy-tone
ring-number on-caller-id
dial-after timeout 2
use profile tone-set US

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 1 dest-interface IF_FXO3
route call 2 dest-interface IF_FXO2
route call 3 dest-interface IF_FXO1
route call 4 dest-interface IF_FXO0

context cs switch
no shutdown

gateway sip GW-SIP
bind interface eth0 router

service default
registrar xyz.com
user 614 password ******** encrypted
user 615 password ******** encrypted
user 616 password ******** encrypted
user 617 password ******** encrypted

gateway sip GW-SIP
no shutdown

port ethernet 0 0
medium auto
encapsulation ip
bind interface eth0 router
no shutdown

port fxs 0 0
caller-id format bell
use profile fxs us
encapsulation cc-fxs
bind interface IF-FXS0 switch
no shutdown

port fxs 0 1
use profile fxs us
encapsulation cc-fxs
bind interface IF-FXS1 switch
no shutdown

port fxs 0 2
use profile fxs us
encapsulation cc-fxs
bind interface IF-FXS2 switch
no shutdown

port fxs 0 3
use profile fxs us
encapsulation cc-fxs
bind interface IF-FXS3 switch
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
flash-hook-duration 50
use profile fxo us
caller-id format bell
encapsulation cc-fxo
bind interface IF_FXO3 switch
no shutdown