[asterisk-users] Adding DND to dialplan

Keshav keshav at arbor.net
Wed Apr 4 12:52:22 MST 2007


> One question... are there any places to get extra sound files like
> "activated" or "deactivated" or "do not disturb is..."  ?? I didn't
> find them in the sounds directory after a vanilla install of the
> latest stable asterisk 1.4.
As I couldn't find such files under 'sounds', I created them by "hand". It's 
easy, only if you have a few minutes:
1. Download and install a free mp3/wma recorder - I found 
http://www.xaudiotools.com/ to be quite handy
2. Record the required sounds - I chose .wav format with PCM 8000khz; 16bit; 
Mono for two reasons: First, the file size was small so i could ftp fast 
back to the server. Second,  the sound quality after converting to .gsm was 
fantastic.
3. convert .wav to .gsm using sox:
$ sox <soundfile>.wav <soundfile>.gsm
4. copy the file back to sounds directory


----- Original Message ----- 
From: "Brian McEntire" <brian.mcentire at gmail.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Wednesday, April 04, 2007 2:52 PM
Subject: Re: [asterisk-users] Adding DND to dialplan


> Ah!
>
> Got it. Hard coding CallerID is a good idea and thank you for the example.
>
> I decided to try the Noop(DB(...)) to see what was getting passed and
> the empty CALLERID was the issue.
>
> I decided to skip that and implement a global DND since that's what I
> wanted anyway so I just set DND/ALL=1 in the DB line.
>
> I'll post a full example here when I put on the finishing touches but
> it is working now. Thanks all for the help.
>
> One question... are there any places to get extra sound files like
> "activated" or "deactivated" or "do not disturb is..."  ?? I didn't
> find them in the sounds directory after a vanilla install of the
> latest stable asterisk 1.4.
>
> On 4/4/07, Gordon Henderson <gordon+asterisk at drogon.net> wrote:
>> On Wed, 4 Apr 2007, Brian McEntire wrote:
>>
>> > Don't think that was it unless I still have a typo. Here's my line
>> > from extensions.conf:
>> >
>> > exten => _#78,n,Set(DB(DND/${CALLERID(num)})=1)
>> >
>> > in the CLI issued 'reload' after saving the updated extensions.conf
>> > and then picked up the phone and dialed #78. Still getting this error:
>> >
>> > [Apr  4 08:56:20] WARNING[6866]: func_db.c:94 function_db_write: DB
>> > requires an argument, DB(<family>/<key>)=value
>> >
>> >
>> > Should DB support be built in by default?
>>
>> It seems that it's already there (else you'd not get an error from
>> func_db)
>>
>> > Is there a DB schema I need to consult to make sure I have the right
>> > family key pair?
>>
>> I do the same with:
>>
>> exten => *49,n,Set(DB(${CALLERID(num)}/doNotDisturb)=1)
>>
>> So I keep them the other way round.
>>
>> Why not put in something like:
>>
>>   exten => _#78,n,Noop(DB(DND/${CALLERID(num)})=1)
>>
>> and just see what it says? Maybe your callerId is somehow not being set
>> correctly?
>>
>> > I'm using a Zaptel driver so maybe the CALLERID(num) var is not set or
>> > is confusing the Set line. I think the zap comes up Zap/2.
>>
>> I'd definately check the caller-id - if it's a local phone on an FXS 
>> port,
>> then you might even want to hard-wire the caller-id in the
>> /etc/asterisk/zapata.conf file. eg.
>>
>> ; Channel 1: Local analogue line
>> context=internal
>> group=0
>> signalling=fxo_ks
>> sendcalleridafter=2
>> rxgain=3
>> txgain=3
>> mailbox=100
>> callerid=Shared DECT <100>
>> channel => 1
>>
>>
>>
>> Gordon
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list