Here is a working configuration for a Patton 4114 FXO running 5.4 where the ports are used for varying purposes (not just a simple milking machine setup).
Overview of setup
- FXO port 0 and 1 are connected to analog trunks on an ITSP's DTA (a grandstream). In this config I refer to them as 'PP'.
- Inbound calls
- Callerid is provided by the DTA Bell style
- Both ports ring for the same call if they are both free; there is a 1 ring delay on the 2nd port so both ports don't answer
- Inbound calls are directed to '0' (the AA) on sipXecs
- Outbound calls
- sipXecs is configured to see these two ports together as an unmanaged gateway on UDP port 5060
- Either port can be used to make outbound calls
- 1+10 digit dialing is used
- Inbound calls
- FXO port 2 is connected to a POTS Qwest line that does not provide callerid, QW is the abbreviation used for these elements
- Inbound calls
- Calls are directed to '0' (the AA) on sipXecs
- Callerid is fixed as Unknown, name 'Qwest'
- Outbound calls
- sipXecs is configured to see this port as an unmanaged gateway on UDP port 5061
- Inbound calls
- FXO port 3 is connected to a Viking W2000A-EWP doorphone, FD is the abbreviation for these elements
- Inbound calls
- Calls are directed to extension 224 on sipXecs (a hunt group)
- The callerid is set to number '250' name 'Front Door'
- Internally the hunt group goes to several Polycom 650's and 335's which are configured to issue a 'ding dong' distinctive ring on calls from '250' (via the speed dial RT feature and the SAF wave file feature).
- The input gain is pushed up by 6db as the doorphone's mic is pretty quiet
- Outbound calls
- sipXecs is configured to see this port as an unmanaged gateway on UDP port 5062
- The door phone does not provide dialtone, going off hook opens the intercom, there is some special setup in the config to deal with this
- sipXecs is configured with a custom dial rule just for this, when you dial '250' with '0' extra digits it sends a '1'. The patton is configured to strip the 1 out so you don't hear DTMF at the door when dialing out to it.
- Inbound calls
Patton plumbing
The Patton internally has a number of components you plumb up between the ethernet port and each FXO port. In some cases the same component is used for PSTN -> SIP calls and SIP -> PSTN calls. Below is a chart showing the high level plumbing (but not all the configuration details) for this configuration.
Configuration
No Format |
---|
#----------------------------------------------------------------# # # # SN4114/JO/EUI # # R5.4 2009-11-18 H323 SIP FXS FXO # # 2010-01-31T18:17:46 # # SN/00A0BA04EB81 # # Generated configuration file # # # #----------------------------------------------------------------# cli version 3.20 clock local offset -06:00 dns-client server 192.172.252.1 webserver port 80 language en sntp-client sntp-client server primary 192.172.252.1 port 123 version 4 sntp-client poll-interval 36000 system hostname fxo2.foo21.com system ic voice 0 low-bitrate-codec g729 profile ppp default profile call-progress-tone US_dialtone play 1 1000 350 -13 440 -13 profile call-progress-tone US_Altertingtone 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 tone-set default profile tone-set US map call-progress-tone dial-tone US_dialtone map call-progress-tone ringback-tone US_Altertingtone map call-progress-tone busy-tone US_Busytone map call-progress-tone release-tone US_Busytone map call-progress-tone congestion-tone US_Busytone profile voip default codec 1 g711ulaw64k rx-length 20 tx-length 20 profile pstn default profile pstn doorphone input-gain 6 profile sip default profile aaa default method 1 local method 2 none context ip router interface eth0 ipaddress 192.172.252.22 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 192.172.252.1 0 context cs switch digit-collection timeout 4 routing-table called-e164 SIP-TO-PP route default dest-service PP-HUNT routing-table calling-e164 FXO2-TO-SIP route default dest-interface IF-SIP-QW FXO2-CID-FUNC routing-table calling-e164 FXO3-TO-SIP route default dest-interface IF-SIP-FD FXO3-CID-FUNC mapping-table calling-name to calling-name FXO2-CID-MAP-NAME map ^$ to Qwest mapping-table calling-e164 to calling-e164 FXO2-CID-MAP-E164 map ^$ to Unknown mapping-table calling-name to calling-name FXO3-CID-MAP-NAME map ^$ to "Front Door" mapping-table calling-e164 to calling-e164 FXO3-CID-MAP-E164 map ^$ to 250 complex-function FXO2-CID-FUNC execute 1 FXO2-CID-MAP-NAME execute 2 FXO2-CID-MAP-E164 complex-function FXO3-CID-FUNC execute 1 FXO3-CID-MAP-NAME execute 2 FXO3-CID-MAP-E164 interface sip IF-SIP-PP bind context sip-gateway SIP-GW-PP route call dest-table SIP-TO-PP remote 192.172.252.20 5060 address-translation outgoing-call to-header user-part fix 102 host-part fix pbx.foo21.com use profile tone-set US interface sip IF-SIP-QW bind context sip-gateway SIP-GW-QW route call dest-interface IF-FXO2 remote 192.172.252.20 5060 address-translation outgoing-call to-header user-part fix 0 host-part fix pbx.foo21.com use profile tone-set US interface sip IF-SIP-FD bind context sip-gateway SIP-GW-FD route call dest-interface IF-FXO3 remote 192.172.252.20 5060 address-translation outgoing-call to-header user-part fix 224 host-part fix pbx.foo21.com address-translation incoming-call called-e164 fix "" use profile tone-set US interface fxo IF-FXO0 route call dest-interface IF-SIP-PP disconnect-signal loop-break disconnect-signal busy-tone ring-number on-caller-id mute-dialing use profile tone-set US interface fxo IF-FXO1 route call dest-interface IF-SIP-PP disconnect-signal loop-break disconnect-signal busy-tone ring-number 4 mute-dialing use profile tone-set US interface fxo IF-FXO2 route call dest-table FXO2-TO-SIP disconnect-signal loop-break disconnect-signal busy-tone mute-dialing use profile tone-set US interface fxo IF-FXO3 route call dest-table FXO3-TO-SIP disconnect-signal loop-break disconnect-signal busy-tone mute-dialing use profile tone-set US use profile pstn doorphone service hunt-group PP-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 route call 1 dest-interface IF-FXO0 route call 2 dest-interface IF-FXO1 context cs switch no shutdown location-service SIPX-SERVER domain 1 192.172.252.20 5060 context sip-gateway SIP-GW-PP interface IF-IP-PP bind interface eth0 context router port 5060 context sip-gateway SIP-GW-PP no shutdown context sip-gateway SIP-GW-QW interface IF-IP-QW bind interface eth0 context router port 5061 context sip-gateway SIP-GW-QW no shutdown context sip-gateway SIP-GW-FD interface IF-IP-FD bind interface eth0 context router port 5062 context sip-gateway SIP-GW-FD 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 flash-hook-duration 50 use profile fxo us caller-id format bell encapsulation cc-fxo bind interface IF-FXO3 switch no shutdown |