Upgrade 3CX to v18 and get it hosted free!

Outbound call handling

Author image

 

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
;********************************************************************
;
;

 


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.