Macro to announce inbound call to Pana user or page all


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


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

Created by: ghendershot, Last modification: Mon 18 of Oct, 2004 (00:20 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+