[asterisk-users] RAW asterisk!

Gordon Henderson gordon+asterisk at drogon.net
Fri Aug 17 03:09:58 CDT 2007


On Thu, 16 Aug 2007, Bill Andersen wrote:

> OK, I understand that.  But if I gotta learn how to support
> myself to do advanced features, why pay them at all?  I'll
> just become my own expert :()

That's how I started...

Sit-down and work out what features you want - and do you want them 
supported in the phones or in the system - eg. features like divert or do 
not disturb - many phones have this feature, but they need to be turned on 
for them to work, or you can implement them in the PBX itself. Similarly 
for speed dialling, etc.

I took the approach that if I could make the PBX work with the dumbest of 
phones then it'd work for any phone regardless of it's features, so 
implemented a whole raft of "star codes" in the PBX itself.

So to implement do not disturb, I have:

; *490: *491:
;       Clear/Set Do Not Disturb

exten => *490,1,Answer()
exten => *490,n,Macro(clearStarCode,doNotDisturb)

exten => *491,1,Answer()
exten => *491,n,Set(dndCode=${EXTEN:3})
exten => *491,n,Set(DB(${CALLERID(num)}/doNotDisturb)=${dndCode})
exten => *491,n,Macro(starAck)

but then you need to handle it in the bit that handles calls internally, so 
mine looks like:

; Check for Do Not Disturb

exten => s,n,Set(DND=${DB(${MACRO_EXTEN}/doNotDisturb)})
exten => s,n,GotoIf(${DND}?:doneDoNotDisturb)
exten => s,n,Wait(90)
exten => s,n,Hangup()
exten => s,n(doneDoNotDisturb),Noop(Carrying on after DO NOT DISTURB Check)

and so on ...

There are other ways to do this, and other better/different? macros to 
handle dialling and so on, or you might want to do it all in AGI, AEL, 
or...

My systems are completely done in dialplan as I've found it adequate for 
my needs and this includes setting up IAX trunks between offices which 
work out the correct site & caller id without using DUNDi

I just googled & searched through the books and voip-wiki for dialplan 
examples and built it up from there.

Keep It Simple is my motto and I'm not putting a MySQL database on a 
diskless system when it's not needed... Over complexity for the sake of 
nerdyness really peeves me! (But it could be argued that that's because I 
was brought up on trying to squeeze programs into 256 byte of RAM too many 
years ago ;-)

Enjoy!

Gordon



More information about the asterisk-users mailing list