Upgrade 3CX to v18 and get it hosted free!

Macro to announce inbound call to Pana user or page all

Author image

 

Call routed from Asterisk to Panasonic Extension

* From extensions.conf

[analog-ext]
;
; This context provides access to internal Panasonicextensions
;
; Panasonic analogextensions
;
; Varialbes assigned are
; PANAEXTxx ………the extension number to dial
; USERNAMEFILE ….audio file name saying name of called party
; RINGINGLINE ……audio file name saying which line is ringing
; USERxVM ………..the intended user’s voice mail box
;
; This context is then included in any other context that might need to route a call
; to a Panasonic extension.
;
; include=>analog.ext
;
exten => 11,1,macro(pana-transfer,${PANAEXT11},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 12,1,macro(pana-transfer,${PANAEXT12},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 13,1,macro(pana-transfer,${PANAEXT13},${USR2NAMEFILE},${RINGINGLINE},${USR2VM})
exten => 14,1,macro(pana-transfer,${PANAEXT14},${USR3NAMEFILE},${RINGINGLINE},${USR3VM})
exten => 15,1,macro(pana-transfer,${PANAEXT15},${USR4NAMEFILE},${RINGINGLINE},${USR4VM})
exten => 16,1,macro(pana-transfer,${PANAEXT16},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 17,1,macro(pana-transfer,${PANAEXT17},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 18,1,macro(pana-transfer,${PANAEXT18},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 19,1,macro(pana-transfer,${PANAEXT19},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 20,1,macro(pana-transfer,${PANAEXT20},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 21,1,macro(pana-transfer,${PANAEXT21},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 22,1,macro(pana-transfer,${PANAEXT22},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 23,1,macro(pana-transfer,${PANAEXT23},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
exten => 26,1,macro(pana-transfer,${PANAEXT26},${USR1NAMEFILE},${RINGINGLINE},${USR1VM})
;
;

The macros that actually do the work

;
;********************************************************************
[macro-pana-transfer]
;********************************************************************
;
;
; This macro performs an unattended transfer
; to a Panasonic analogextension using a
; a hook flash transfer
;
; First we call the registeredextension for the
; person we are attempting to transfer the call
; to. Then we announce the line their call is
; on.
;
; ARG1 = Panasonic analogextension to dial
; ARG2 = sound file name to say user name
; ARG3 = sound file name of ringing line to anounce
; ARG4 = VoiceMail box ID
;
; announce the incoming call three times on the
; called party registeredextension
;
exten => s,1,Macro(pana-announce,${ARG1},${ARG2},${ARG3})
;
; if all else fails, put the caller in voicemail
;
exten => s,3,Voicemail(u${ARG4})
exten => s,4,Hangup
;
;
;********************************************************************
[macro-pana-find]
;********************************************************************
;
;
; This macro performs an unattended transfer
; to a Panasonic analogextension using a
; a hook flash transfer
;
; First we call the registeredextension for the
; person we are attempting to transfer the call
; to. Then we announce the line their call is
; on.
;
; If the call is not picked up, we perform a
; “PAGEALL” annuncement. If the call is still
; not picked up, we transfer the caller into
; voicemail.
;
; ARG1 = Panasonic analogextension to dial
; ARG2 = sound file name to say user name
; ARG3 = sound file name of ringing line to anounce
; ARG4 = VoiceMail box ID
;
; announce the incoming call three times on the
; called party registeredextension
;
exten => s,1,Macro(pana-announce,${ARG1},${ARG2},${ARG3})
;
; try again doing a page all
;
exten => s,2,Macro(pana-announce,${PAGEALL},${ARG2},${ARG3})
;
; if all else fails, put the caller in voicemail
;
exten => s,3,Voicemail(u${ARG4})
exten => s,4,Hangup
;
;
;********************************************************************
[macro-pana-announce]
;********************************************************************
;
;
; ARG1 = Panasonic analogextension to dial
; ARG2 = sound file name to say user name
; ARG3 = sound file name of ringing line to anounce
;
exten => s,1,Background(transfer) ; announce to caller
exten => s,2,NoOp
exten => s,3,Flash ; hook flash
exten => s,4,Wait(1) ; wait for KSU
exten => s,5,SendDTMF(${ARG1}) ; send KSU theextension
exten => s,6,Wait(2) ; wait for KSU
exten => s,7,SoftHangup ; soft hangup
;
exten => s,8,Background(custom/there-is-a-call-for) ; announce to called party
exten => s,9,Background(${ARG2}) ; say their name
exten => s,10,Background(custom/${ARG3}) ; tell what line
exten => s,11,Wait(1) ; wait a second
;
exten => s,12,Background(custom/there-is-a-call-for) ; repeat the announcement
exten => s,13,Background(${ARG2})
exten => s,14,Background(custom/${ARG3})
exten => s,15,Wait(1)
;
exten => s,16,Background(custom/there-is-a-call-for) ; and repeat it a third time
exten => s,17,Background(${ARG2})
exten => s,18,Background(custom/${ARG3})
exten => s,19,Wait(1)
;
exten => s,20,Flash ; flash the hook to return to caller
exten => s,21,Wait(1)
;
;

 


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.