Below is a sample config that will set up all 4 lines to ring the auto attendant at "100" and all outbound calls to use ports on reverse order (inbound ports 0/1/2/3 and outbound 3/2/1/0).
You can shutdown the fxo ports not used with "shutdown" instead of "no shutdown, just remember to remove the interface in your outbound hunt group by remming out the corresponding "route call" statement.
Just copy this code
...
and edit it to suit your network as a plain text file. Upload it to your gateway via the webgui (import) and then reload without saving changes to initialize it.
Code Block |
---|
cli version 3.20 clock local default-offset -05:00 # this assumes your time zone is USA, New York. You can replace your clock offset to reflect your timezone and your DST periods clock local dst-rule SPRING2011 -04:00 from 02:00 mar 13rd 2011 until 03:00 nov 6th 2011 clock local dst-rule SPRING2012 -04:00 from 02:00 mar 11st 2012 until 03:00 nov 4th 2012 clock local dst-rule SPRING2013 -04:00 from 02:00 mar 10th 2013 until 03:00 nov 3rd 2013 clock local dst-rule SPRING2014 -04:00 from 02:00 mar 9th 2014 until 03:00 nov 2nd 2014 clock local dst-rule SPRING2015 -04:00 from 02:00 mar 8th 2015 until 03:00 nov 1st 2015 clock local dst-rule SPRING2016 -04:00 from 02:00 mar 13rd 2016 until 03:00 nov 6th 2016 #best to use sipx as dns server or whatever dns sipx uses dns-client server 192.168.54.2 webserver port 80 language en #use sipx as timeserver or another source allowed on or through your network sntp-client server 192.5.41.40 # this device hostname system hostname sip-gw.voice.mydomain.loc 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_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 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_Busytone map call-progress-tone congestion-tone US_Busytone profile voip default codec 1 g711alaw64k rx-length 20 tx-length 20 codec 2 g711ulaw64k rx-length 20 tx-length 20 profile pstn default profile sip default no autonomous-transitioning profile aaa default method 1 local method 2 none context ip router interface LAN #the ip and mask of this device ipaddress 192.168.54.3 255.255.255.0 tcp adjust-mss rx mtu tcp adjust-mss tx mtu context ip router #the router of this network route 0.0.0.0 0.0.0.0 192.168.54.1 context cs switch digit-collection timeout 3 routing-table called-e164 SIP_TO_ISDN route default dest-service OUTBOUND interface sip IF_SIPX bind context sip-gateway GW-SIP route call dest-table SIP_TO_ISDN #sipx sip domain name remote pbx.voice.mydomain.loc #use your sip hostname below and your destination, the system AA at "100" is used for this example address-translation outgoing-call to-header user-part fix 100 host-part fix pbx.voice.mydomain.loc interface fxo IF_FXO0 route call dest-interface IF_SIPX disconnect-signal loop-break disconnect-signal busy-tone ring-number on-caller-id dial-after timeout 2 mute-dialing use profile tone-set US interface fxo IF_FXO1 route call dest-interface IF_SIPX disconnect-signal loop-break disconnect-signal busy-tone ring-number on-caller-id dial-after timeout 2 mute-dialing use profile tone-set US interface fxo IF_FXO2 route call dest-interface IF_SIPX disconnect-signal loop-break disconnect-signal busy-tone ring-number on-caller-id dial-after timeout 2 mute-dialing use profile tone-set US interface fxo IF_FXO3 route call dest-interface IF_SIPX disconnect-signal loop-break disconnect-signal busy-tone ring-number on-caller-id dial-after timeout 2 mute-dialing use profile tone-set US service hunt-group OUTBOUND 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 #routeroute call 1 dest-interface IF_FXO3 #routeroute call 2 dest-interface IF_FXO2 #routeroute call 3 dest-interface IF_FXO1 route call 3 dest-interface IF_FXO0 context cs switch no shutdown location-service SIPX_SERVER domain 1 sipx.voice.mydomain.loc context sip-gateway GW-SIP interface IF_SIPX bind interface LAN context router port 5060 context sip-gateway GW-SIP bind location-service SIPX_SERVER no shutdown port ethernet 0 0 medium auto encapsulation ip bind interface LAN router no shutdown port ethernet 0 1 medium 10 half 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 |