D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] VoIP PBX Demo...

 

On Tue, 6 Jan 2009, Sam Grabham wrote:

> Hi Gordon
>
> Just a quick thank you for all your tips and tricks on Asterisk on Saturday.
>
> I keep thinking about the B & B\hotel billing you mentioned, would it be
> that difficult as asterisk logs it's calls in a text file.
>> From memory i think there was a module for MySQL backend which might help,
> Have you ever setup a MySQL backend, And what extra features would it give?

I use a MySQL backend in my hosted systems (virtual PBX), but all it's 
doing is storing exactly the same records which are later processed. I 
don't use the one supplied, I wrote my own as there is a case where I need 
to make an adjustment to the records before storing them.

Asterisk call logs aren't the nicest of things to try to decode - it's not 
as simple as it might look )-: Especially when you implement call groups, 
hunts, etc. Every action generates a log entry and this might not be the 
one to consider for billing purposes...

> If you ever need a ISDN 2e card, we have a spare Quad BRI that i we could
> sell cheap.

Cheers!

> When we were talking about dial plans etc, we mentioned call fwding etc and
> DND, Have you sample code for this task?

It's a bit tightly embedded in my system, but I keep a series of flags for 
each extension in the astDB. These are turned on/off via star codes, so 
*491 enabld DND, and *490 disabled it - this looks like:

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

Then there is a huge macro which deals with calling extensions from other 
extenions - as part of it's sequence, it has to check these astDB entries 
and decide to do the Dial() or not...

The DND part 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)


Then there's the additional code required when building call-groups and 
hunt groups - I "write" these into the dialplan dynamically when they're 
created - the front-end written in PHP writes dialplan in response to the 
directions it's given. It all gets a bit messy after that, as every thing 
that might cause a phone to ring needs to check the DND status. Small 
price to pay to support multiple phone types though.

Or you can just standardise on one phone type and code round that :)

Gordon


>
> Regards
>
>
> Sam
>
>
>
> ----- Original Message -----
> From: "Gordon Henderson" <gordon+dcglug@xxxxxxxxxx>
> To: "Devon/Cornwall GNU LUG" <list@xxxxxxxxxxxxx>
> Sent: Sunday, January 04, 2009 7:35 PM
> Subject: [LUG] VoIP PBX Demo...
>
>
>>
>> If anyone wants to play with a live VoIP only PBX, then read on ..
>>
>> Go to: http://dcglug.drogon.net/
>>
>> ...and drop me an email and I'll send the username & password & more
>> details.
>>
>> Cheers,
>>
>> Gordon
>>
>> --
>> The Mailing List for the Devon & Cornwall LUG
>> http://mailman.dclug.org.uk/listinfo/list
>> FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html
>
>
> --------------------------------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.10.2/1876 - Release Date: 1/5/2009
> 9:44 AM
>
>
> -- 
> The Mailing List for the Devon & Cornwall LUG
> http://mailman.dclug.org.uk/listinfo/list
> FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html
>

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html