[Asterisk-Dev] Comedian Mail features
The Traveller
traveler at xs4all.nl
Fri Jul 25 11:57:36 MST 2003
Hey all,
On Fri, Jul 25, 2003 at 13:57:24 -0400, Ryan Tucker wrote:
> On Thu, 24 Jul 2003 15:56:56 -0400, Alex Lopez <alex at opsys.com> wrote:
> >>I was thinking of using a database to keep track of things. Perhaps
> >even
> >>base extension handling altogether out of the database.
> >
> >I haven't had a chance to play with that yet, how hard was it the
> >configure??? Can you share some examples??
>
> We don't have anything *too* useful yet, but someone a couple weeks back
> posted their call forwarding, etc, extensions.conf entries, which we're
> basing things off of.
>
> Here's our [macro-stdexten]:
[...]
I was the one who originally posted the call-features. For completeness,
here's the current version, as I'm using it. It expects it's prompts
to be in "/var/lib/asterisk/sounds/local/". These prompts have been kindly
contributed to the community by VoicePulse (http://www.voicepulse.com) and
can be had from "http://www.loligo.com/asterisk/sounds/". Also note
the commented calls to Festival, which can, ofcourse, be removed.
I'm working with Mark to get this included into Asterisk's standard
sample-configuration.
Grtz,
Oliver
;
; Macros
;
[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
; ${ARG3} - Timeout
; ${ARG4} - Other options to app_dial
;
exten => s,1,DBget(fwdexten=FEAT/${ARG1}/CFWD/CFU)
exten => s,102,Goto(s|4)
exten => s,2,DBget(fwdcontext=FEAT/${ARG1}/CFWD/CFUC)
exten => s,3,Goto(${fwdcontext}|${fwdexten}|1)
exten => s,4,Dial(${ARG2},${ARG3},${ARG4})
exten => s,105,Goto(s|205)
exten => s,5,DBget(fwdexten=FEAT/${ARG1}/CFWD/CFNA)
exten => s,106,Goto(s|8)
exten => s,6,DBget(fwdcontext=FEAT/${ARG1}/CFWD/CFNAC)
exten => s,7,Goto(${fwdcontext}|${fwdexten}|1)
exten => s,8,Answer
exten => s,9,Voicemail2(su${ARG1})
exten => s,10,Hangup
exten => s,205,DBget(fwdexten=FEAT/${ARG1}/CFWD/CFB)
exten => s,306,Goto(s|208)
exten => s,206,DBget(fwdcontext=FEAT/${ARG1}/CFWD/CFBC)
exten => s,207,Goto(${fwdcontext}|${fwdexten}|1)
exten => s,208,Answer
exten => s,209,Voicemail2(sb${ARG1})
exten => s,210,Hangup
;
; Special features, Call Forwarding, unconditional.
;
[feature-cfu]
exten => 9921,1,Answer
exten => 9921,2,DBget(fwdexten=FEAT/${CALLERIDNUM}/CFWD/CFU)
;exten => 9921,103,Festival(Call-Forward Unconditional: Is not set.)
exten => 9921,103,Playback(local/call-fwd-unconditional)
exten => 9921,104,Playback(local/is-not-set)
exten => 9921,105,Hangup
;exten => 9921,3,Festival(Call-Forward Unconditional: Is set too: ${fwdexten}.)
exten => 9921,3,Playback(local/call-fwd-unconditional)
exten => 9921,4,Playback(local/is-set-to)
exten => 9921,5,SayDigits(${fwdexten})
exten => 9921,6,Hangup
exten => 92100,1,Answer
exten => 92100,2,DBdel(FEAT/${CALLERIDNUM}/CFWD/CFU)
exten => 92100,3,DBdel(FEAT/${CALLERIDNUM}/CFWD/CFUC)
;exten => 92100,4,Festival(Call-Forward Unconditional: Has been cleared.)
exten => 92100,4,Playback(local/call-fwd-unconditional)
exten => 92100,5,Playback(local/has-been-cleared)
exten => 92100,6,Hangup
exten => _921X.,1,Answer
exten => _921X.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT})
exten => _921X.,103,Playback(invalid)
exten => _921X.,104,Hangup
exten => _921X.,3,DBput(FEAT/${CALLERIDNUM}/CFWD/CFU=${EXTEN:3})
exten => _921X.,4,DBput(FEAT/${CALLERIDNUM}/CFWD/CFUC=${CONTEXT})
;exten => _921X.,5,Festival(Call-Forward Unconditional: Has been set too: ${EXTEN:3}.)
exten => _921X.,5,Playback(local/call-fwd-unconditional)
exten => _921X.,6,Playback(local/has-been-set-to)
exten => _921X.,7,SayDigits(${EXTEN:3})
exten => _921X.,8,Hangup
;
; Special features, Call Forwarding, on no answer.
;
[feature-cfna]
exten => 9961,1,Answer
exten => 9961,2,DBget(fwdexten=FEAT/${CALLERIDNUM}/CFWD/CFNA)
;exten => 9961,103,Festival(Call-Forward on No Answer: Is not set.)
exten => 9961,103,Playback(local/call-fwd-no-ans)
exten => 9961,104,Playback(local/is-not-set)
exten => 9961,105,Hangup
;exten => 9961,3,Festival(Call-Forward on No Answer: Is set too: ${fwdexten}.)
exten => 9961,3,Playback(local/call-fwd-no-ans)
exten => 9961,4,Playback(local/is-set-to)
exten => 9961,5,SayDigits(${fwdexten})
exten => 9961,6,Hangup
exten => 96100,1,Answer
exten => 96100,2,DBdel(FEAT/${CALLERIDNUM}/CFWD/CFNA)
exten => 96100,3,DBdel(FEAT/${CALLERIDNUM}/CFWD/CFNAC)
;exten => 96100,4,Festival(Call-Forward on No Answer: Has been cleared.)
exten => 96100,4,Playback(local/call-fwd-no-ans)
exten => 96100,5,Playback(local/has-been-cleared)
exten => 96100,6,Hangup
exten => _961X.,1,Answer
exten => _961X.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT})
exten => _961X.,103,Playback(invalid)
exten => _961X.,104,Hangup
exten => _961X.,3,DBput(FEAT/${CALLERIDNUM}/CFWD/CFNA=${EXTEN:3})
exten => _961X.,4,DBput(FEAT/${CALLERIDNUM}/CFWD/CFNAC=${CONTEXT})
;exten => _961X.,5,Festival(Call-Forward on No Answer: Has been set too: ${EXTEN:3}.)
exten => _961X.,5,Playback(local/call-fwd-no-ans)
exten => _961X.,6,Playback(local/has-been-set-to)
exten => _961X.,7,SayDigits(${EXTEN:3})
exten => _961X.,8,Hangup
;
; Special features, Call Forwarding, on busy.
;
[feature-cfb]
exten => 9967,1,Answer
exten => 9967,2,DBget(fwdexten=FEAT/${CALLERIDNUM}/CFWD/CFB)
;exten => 9967,103,Festival(Call-Forward on Busy: Is not set.)
exten => 9967,103,Playback(local/call-fwd-on-busy)
exten => 9967,104,Playback(local/is-not-set)
exten => 9967,105,Hangup
;exten => 9967,3,Festival(Call-Forward on Busy: Is set too: ${fwdexten}.)
exten => 9967,3,Playback(local/call-fwd-on-busy)
exten => 9967,4,Playback(local/is-set-to)
exten => 9967,5,SayDigits(${fwdexten})
exten => 9967,6,Hangup
exten => 96700,1,Answer
exten => 96700,2,DBdel(FEAT/${CALLERIDNUM}/CFWD/CFB)
exten => 96700,3,DBdel(FEAT/${CALLERIDNUM}/CFWD/CFBC)
;exten => 96700,4,Festival(Call-Forward on Busy: Has been cleared.)
exten => 96700,4,Playback(local/call-fwd-on-busy)
exten => 96700,5,Playback(local/has-been-cleared)
exten => 96700,6,Hangup
exten => _967X.,1,Answer
exten => _967X.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT})
exten => _967X.,103,Playback(invalid)
exten => _967X.,104,Hangup
exten => _967X.,3,DBput(FEAT/${CALLERIDNUM}/CFWD/CFB=${EXTEN:3})
exten => _967X.,4,DBput(FEAT/${CALLERIDNUM}/CFWD/CFBC=${CONTEXT})
;exten => _967X.,5,Festival(Call-Forward on Busy: Has been set too: ${EXTEN:3}.)
exten => _967X.,5,Playback(local/call-fwd-on-busy)
exten => _967X.,6,Playback(local/has-been-set-to)
exten => _967X.,7,SayDigits(${EXTEN:3})
exten => _967X.,8,Hangup
;
; Special features, speed-dials.
;
[feature-speeddials]
exten => _9[789]X,1,DBget(sdexten=FEAT/${CALLERIDNUM}/SD/${EXTEN::3}/NR)
exten => _9[789]X,102,Answer
;exten => _9[789]X,103,Festival(Speed-dial: ${EXTEN::3}: Is not set.)
exten => _9[789]X,103,Playback(local/speed-dial)
exten => _9[789]X,104,SayNumber(${EXTEN::3})
exten => _9[789]X,105,Playback(local/is-not-set)
exten => _9[789]X,106,Hangup
exten => _9[789]X,2,Goto(${sdexten}|1)
exten => _9[789]X00,1,Answer
exten => _9[789]X00,2,DBdel(FEAT/${CALLERIDNUM}/SD/${EXTEN::3}/NR)
exten => _9[789]X00,3,DBdel(FEAT/${CALLERIDNUM}/SD/${EXTEN::3}/NRC)
;exten => _9[789]X00,4,Festival(Speed-dial: ${EXTEN::3}: Has been cleared.)
exten => _9[789]X00,4,Playback(local/speed-dial)
exten => _9[789]X00,5,SayNumber(${EXTEN::3})
exten => _9[789]X00,6,Playback(local/has-been-cleared)
exten => _9[789]X00,7,Hangup
exten => _9[9][789]X,1,Answer
exten => _9[9][789]X,2,DBget(sdexten=FEAT/${CALLERIDNUM}/SD/${EXTEN:1:3}/NR)
;exten => _9[9][789]X,103,Festival(Speed-dial: ${EXTEN:1:3}: Is not set.)
exten => _9[9][789]X,103,Playback(local/speed-dial)
exten => _9[9][789]X,104,SayNumber(${EXTEN:1:3})
exten => _9[9][789]X,105,Playback(local/is-not-set)
exten => _9[9][789]X,106,Hangup
;exten => _9[9][789]X,3,Festival(Speed-dial: ${EXTEN:1:3}: Is set too: ${sdexten}.)
exten => _9[9][789]X,3,Playback(local/speed-dial)
exten => _9[9][789]X,4,SayNumber(${EXTEN:1:3})
exten => _9[9][789]X,5,Playback(local/is-set-to)
exten => _9[9][789]X,6,SayDigits(${sdexten})
exten => _9[9][789]X,7,Hangup
exten => _9[789]XX.,1,Answer
exten => _9[789]XX.,2,ChanIsAvail(Local/${EXTEN:3}@${CONTEXT})
exten => _9[789]XX.,103,Playback(invalid)
exten => _9[789]XX.,104,Hangup
exten => _9[789]XX.,3,DBput(FEAT/${CALLERIDNUM}/SD/${EXTEN::3}/NR=${EXTEN:3})
exten => _9[789]XX.,4,DBput(FEAT/${CALLERIDNUM}/SD/${EXTEN::3}/NRC=${CONTEXT})
;exten => _9[789]XX.,5,Festival(Speed-dial: ${EXTEN::3}: Has been set too: ${EXTEN:3}.)
exten => _9[789]XX.,5,Playback(local/speed-dial)
exten => _9[789]XX.,6,SayNumber(${EXTEN::3})
exten => _9[789]XX.,7,Playback(local/has-been-set-to)
exten => _9[789]XX.,8,SayDigits(${EXTEN:3})
exten => _9[789]XX.,9,Hangup
More information about the asterisk-dev
mailing list