Outbound call handling


Outbound calls



;********************************************************************
; BEGIN - Outbound call handlers
;********************************************************************
;
;
[default]
;
; this is where SIP extensions enter the dial plan
;
exten => s,1,DigitTimeout,2 ; give them 2 seconds between digits
exten => s,2,ResponseTimeout,30 ; give them 30 seconds to make a choice
;
include => sip-trans
include => internal-svc
;
; Master context for outbound call routing
;
; Handle pstn service numbers.
; This group should only be dialed using
; one of our two analog lines.
;
; This routine is only used by our SIP
; phones. The Panasonic handsets enter
; the dial plan at co3out and co4out
; depending on the selection of CO3 or
; or CO4 at the handset.
;
exten => _0,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
exten => _411,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
exten => _611,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
exten => _911,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
;
;
; handle outbound toll free calls - force analog
;
exten => _1800.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1855.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1866.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1877.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1888.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
;
; Handle outbound local calls
;
; All local numbers are 10 digits in our area.
; This plan has no pattern for seven digit dialing.
; On local calls, we favor our analog lines from
; Verizon, then fail over to Voicepulse.
;
; NOTE VoicePulse needs the local 10 digit phone
; number to be preceeded by a "1" and there
; will be per-minute charges against the
; account.
;
; local call rule try analog line first, then sip, then iax
;
exten => _NXXNXXXXXX,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
;
; long distance rule sends call to iax first, then sip, then pstn
;
; for long distance calls, we try the VoicePulse IAX
; service first. if VoicePulse is not available we try
; the BroadVoice SIP service. if all else fails, we
; use an analog line from Verizon. This forces least
; cost routing of the call.
;
exten => _1NXXNXXXXXX,1,Macro(dial-iax-sip-pstn,${EXTEN},${LONGTIMEOUT}) ; voicepulse first
;
; handle outbound internationl calls
;
; for international calls, we try the VoicePulse IAX
; service first. if VoicePulse is not available we try
; the BroadVoice SIP service. if all else fails, we
; use an analog line from Verizon. This forces least
; cost routing of the call.
;
exten => _011.,1,Macro(dial-iax-sip-pstn,${EXTEN},${LONGTIMEOUT})
;
; handle outbound local calls - force ZAP trunk
;
exten => _9NXXNXXXXXX,1,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound long distance calls - force ZAP trunk
;
exten => _91NXXNXXXXXX,1,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound internationl calls - force ZAP trunk
;
exten => _9011.,1,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound local calls - force IAX via VoicePulse
;
exten => _8NXXNXXXXXX,1,Macro(dial-iax,1${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound long distance calls - force IAX via VoicePulse
;
exten => _81NXXNXXXXXX,1,Macro(dial-iax,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound internationl calls - force IAX via VoicePulse
;
exten => _8011.,1,Macro(dial-iax,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound local calls - force SIP via BroadVoice
;
exten => _7NXXNXXXXXX,1,Macro(dial-sip,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound long distance calls - force SIP via BroadVoice
;
exten => _71NXXNXXXXXX,1,Macro(dial-sip,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound internationl calls - force SIP via BroadVoice
;
exten => _7011.,1,Macro(dial-sip,${EXTEN:1},${LONGTIMEOUT})
;
exten => t,1,Goto(i,1) ; If they take too long, give up
;
exten => i,1,Background(invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,1)
;
;
[co3out]
;
; this is where a Panasonic analog extension enters
; the dial plan if they pick up CO3 (VoicePulse)
;
exten => s,1,DigitTimeout,2 ; give them 2 seconds between digits
exten => s,2,ResponseTimeout,30 ; give them 30 seconds to make a choice
;
; If the user presses 0, give them access to the
; system menu
;
exten => 0,1,NoOp
exten => 0,2,Goto(system-menu-main,s,1)
;
; Keep them from dialing PSTN service numbers as
; VoicePulse will not route them properly anyway
;
exten => _411,1,Goto(i,1)
exten => _611,1,Goto(i,1)
exten => _911,1,Goto(i,1)
;
include => sip-trans
include => internal-svc
;
; handle outbound local calls - force VoicePulse
;
exten => _NXXNXXXXXX,1,Macro(dial-iax,1${EXTEN},${LONGTIMEOUT})
;
; handle outbound long distance calls - force VoicePulse
;
exten => _1NXXNXXXXXX,1,Macro(dial-iax,${EXTEN},${LONGTIMEOUT})
;
; handle outbound internationl calls - force VoicePulse
;
exten => _011.,1,Macro(dial-iax,${EXTEN},${LONGTIMEOUT})
;
;
exten => t,1,Goto(i,1) ; If they take too long, let them try again
;
exten => i,1,Background(invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,1)
;
;
[co4out]
;
; this is where a Panasonic analog extension enters
; the dial plan if they pick up CO4 (BroadVoice)
;
exten => s,1,DigitTimeout,2 ; give them 2 seconds between digits
exten => s,2,ResponseTimeout,30 ; give them 30 seconds to make a choice
;
; If the user presses 0, give them access to the
; system menu
;
exten => 0,1,NoOp
exten => 0,2,Goto(system-menu-main,s,1)
;
; Keep them from dialing PSTN service numbers as
; VoicePulse will not route them properly anyway
;
exten => _411,1,Goto(i,1)
exten => _611,1,Goto(i,1)
exten => _911,1,Goto(i,1)
;
include => sip-trans
include => internal-svc
;
; handle outbound local calls - force BroadVoice
;
exten => _NXXNXXXXXX,1,Macro(dial-sip,${EXTEN},${LONGTIMEOUT})
;
; handle outbound long distance calls - force BroadVoice
;
exten => _1NXXNXXXXXX,1,Macro(dial-sip,${EXTEN},${LONGTIMEOUT})
;
; handle outbound internationl calls - force BroadVoice
;
exten => _011.,1,Macro(dial-sip,${EXTEN},${LONGTIMEOUT})
;
exten => t,1,Goto(i,1) ; If they take too long, let them try again
;
exten => i,1,Background(invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,1)
;
;
;********************************************************************
; END - Outbound call handlers
;********************************************************************
;
;


Outbound calls



;********************************************************************
; BEGIN - Outbound call handlers
;********************************************************************
;
;
[default]
;
; this is where SIP extensions enter the dial plan
;
exten => s,1,DigitTimeout,2 ; give them 2 seconds between digits
exten => s,2,ResponseTimeout,30 ; give them 30 seconds to make a choice
;
include => sip-trans
include => internal-svc
;
; Master context for outbound call routing
;
; Handle pstn service numbers.
; This group should only be dialed using
; one of our two analog lines.
;
; This routine is only used by our SIP
; phones. The Panasonic handsets enter
; the dial plan at co3out and co4out
; depending on the selection of CO3 or
; or CO4 at the handset.
;
exten => _0,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
exten => _411,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
exten => _611,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
exten => _911,1,Macro(dial-pstn,${EXTEN},${LONGTIMEOUT})
;
;
; handle outbound toll free calls - force analog
;
exten => _1800.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1855.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1866.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1877.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
exten => _1888.,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
;
; Handle outbound local calls
;
; All local numbers are 10 digits in our area.
; This plan has no pattern for seven digit dialing.
; On local calls, we favor our analog lines from
; Verizon, then fail over to Voicepulse.
;
; NOTE VoicePulse needs the local 10 digit phone
; number to be preceeded by a "1" and there
; will be per-minute charges against the
; account.
;
; local call rule try analog line first, then sip, then iax
;
exten => _NXXNXXXXXX,1,Macro(dial-pstn-sip-iax,${EXTEN},${LONGTIMEOUT})
;
; long distance rule sends call to iax first, then sip, then pstn
;
; for long distance calls, we try the VoicePulse IAX
; service first. if VoicePulse is not available we try
; the BroadVoice SIP service. if all else fails, we
; use an analog line from Verizon. This forces least
; cost routing of the call.
;
exten => _1NXXNXXXXXX,1,Macro(dial-iax-sip-pstn,${EXTEN},${LONGTIMEOUT}) ; voicepulse first
;
; handle outbound internationl calls
;
; for international calls, we try the VoicePulse IAX
; service first. if VoicePulse is not available we try
; the BroadVoice SIP service. if all else fails, we
; use an analog line from Verizon. This forces least
; cost routing of the call.
;
exten => _011.,1,Macro(dial-iax-sip-pstn,${EXTEN},${LONGTIMEOUT})
;
; handle outbound local calls - force ZAP trunk
;
exten => _9NXXNXXXXXX,1,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound long distance calls - force ZAP trunk
;
exten => _91NXXNXXXXXX,1,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound internationl calls - force ZAP trunk
;
exten => _9011.,1,Macro(dial-pstn,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound local calls - force IAX via VoicePulse
;
exten => _8NXXNXXXXXX,1,Macro(dial-iax,1${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound long distance calls - force IAX via VoicePulse
;
exten => _81NXXNXXXXXX,1,Macro(dial-iax,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound internationl calls - force IAX via VoicePulse
;
exten => _8011.,1,Macro(dial-iax,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound local calls - force SIP via BroadVoice
;
exten => _7NXXNXXXXXX,1,Macro(dial-sip,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound long distance calls - force SIP via BroadVoice
;
exten => _71NXXNXXXXXX,1,Macro(dial-sip,${EXTEN:1},${LONGTIMEOUT})
;
; handle outbound internationl calls - force SIP via BroadVoice
;
exten => _7011.,1,Macro(dial-sip,${EXTEN:1},${LONGTIMEOUT})
;
exten => t,1,Goto(i,1) ; If they take too long, give up
;
exten => i,1,Background(invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,1)
;
;
[co3out]
;
; this is where a Panasonic analog extension enters
; the dial plan if they pick up CO3 (VoicePulse)
;
exten => s,1,DigitTimeout,2 ; give them 2 seconds between digits
exten => s,2,ResponseTimeout,30 ; give them 30 seconds to make a choice
;
; If the user presses 0, give them access to the
; system menu
;
exten => 0,1,NoOp
exten => 0,2,Goto(system-menu-main,s,1)
;
; Keep them from dialing PSTN service numbers as
; VoicePulse will not route them properly anyway
;
exten => _411,1,Goto(i,1)
exten => _611,1,Goto(i,1)
exten => _911,1,Goto(i,1)
;
include => sip-trans
include => internal-svc
;
; handle outbound local calls - force VoicePulse
;
exten => _NXXNXXXXXX,1,Macro(dial-iax,1${EXTEN},${LONGTIMEOUT})
;
; handle outbound long distance calls - force VoicePulse
;
exten => _1NXXNXXXXXX,1,Macro(dial-iax,${EXTEN},${LONGTIMEOUT})
;
; handle outbound internationl calls - force VoicePulse
;
exten => _011.,1,Macro(dial-iax,${EXTEN},${LONGTIMEOUT})
;
;
exten => t,1,Goto(i,1) ; If they take too long, let them try again
;
exten => i,1,Background(invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,1)
;
;
[co4out]
;
; this is where a Panasonic analog extension enters
; the dial plan if they pick up CO4 (BroadVoice)
;
exten => s,1,DigitTimeout,2 ; give them 2 seconds between digits
exten => s,2,ResponseTimeout,30 ; give them 30 seconds to make a choice
;
; If the user presses 0, give them access to the
; system menu
;
exten => 0,1,NoOp
exten => 0,2,Goto(system-menu-main,s,1)
;
; Keep them from dialing PSTN service numbers as
; VoicePulse will not route them properly anyway
;
exten => _411,1,Goto(i,1)
exten => _611,1,Goto(i,1)
exten => _911,1,Goto(i,1)
;
include => sip-trans
include => internal-svc
;
; handle outbound local calls - force BroadVoice
;
exten => _NXXNXXXXXX,1,Macro(dial-sip,${EXTEN},${LONGTIMEOUT})
;
; handle outbound long distance calls - force BroadVoice
;
exten => _1NXXNXXXXXX,1,Macro(dial-sip,${EXTEN},${LONGTIMEOUT})
;
; handle outbound internationl calls - force BroadVoice
;
exten => _011.,1,Macro(dial-sip,${EXTEN},${LONGTIMEOUT})
;
exten => t,1,Goto(i,1) ; If they take too long, let them try again
;
exten => i,1,Background(invalid) ; "That's not valid, try again"
exten => i,2,Wait(1)
exten => i,3,Goto(s,1)
;
;
;********************************************************************
; END - Outbound call handlers
;********************************************************************
;
;

Created by: ghendershot, Last modification: Fri 29 of Oct, 2004 (02:33 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+