Asterisk Programming
converting mp3's for use as polycom ringers
Submitted by byo71 on Wed, 2008-02-06 04:47. Asterisk Programming | Communicationsfirst use mhWaveEdit and convert to 8 bit 8000hz mono
then
sox phonesring.wav -U -c1 phonesring1.wav
to put in g711
# file phonesring.wav
phonesring.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 8000 Hz
Queues with callback members Tutorial
Submitted by admin on Tue, 2007-07-31 19:54. Asterisk Programming | CommunicationsSetting up Call Queues -- A Tutorial
(This was pulled directly from the 1.4 asterisk docs folder included with the source)
Pardon, but the dialplan in this tutorial will be expressed
in AEL, the new Asterisk Extension Language. If you are
not used to its syntax, we hope you will find it to some
degree intuitive. If not, there are documents explaining
its syntax and constructs.
====== Configuring Call Queues
First of all, set up call queues in queue.conf
Here is an example:
=========== queues.conf ===========
| ; Cool Digium Queues |
| [general] |
convert wav files to gsm for use with asterisk / convert many mp3 to gsm
Submitted by byo71 on Fri, 2007-04-06 23:22. Asterisk Programming | CommunicationsI have to use this all the time to convert my wav files to gsm for use in asterisk.
sox foo.wav -r 8000 -c1 foo.gsm resample -ql
make sure you have sox installed
# apt-get install sox
-------------------------------------------------
CONVERT *.MP3 to *.GSM
for I in $(ls -1 *.mp3)
do
NAME=$I
echo "Converting from mp3.wav"
mpg123 -w "$NAME.wav" "$NAME"
echo "Converting from wav to gsm"
sox -t wav "$NAME.wav" -r 8000 -c1 -t gsm "$NAME.gsm" resample -ql
echo "output filename: $NAME.gsm"
done
Not sure if this works when there are spaces in the file names...
Asterisk Click 2 Call Application
Submitted by admin on Tue, 2007-02-27 01:40. Asterisk Programming | CommunicationsI found a great link for how to do a click to call implementation on the web site.
http://www.voipjots.com/2006/02/click-to-call-with-your-asteriskhome.html
I was able to get it working in under an hour!
How to fix "Unable to handle indication 3 for" / Asterisk Error Message
Submitted by admin on Mon, 2006-08-21 00:03. Asterisk Programming | CommunicationsHow to fix "Unable to handle indication 3 for" / Asterisk Error Message
The other day i had set up a new asterisk box and wanted to start making some calls. I noticed that anytime a SIP = SIP call was made, no ringing would be heard on the callers end. Additionally it would be accompanied by an error message about "indication 3"
Here is how you fix it...
1) cd /etc/asterisk
2) nano indications.conf
3) paste the following code into the conf file...
;
; Static indications configuration files, used by
; the pbx_indications module.
;
; The "general" category is for certain variables. All other categories
Get Festival Working in Asterisk on Debian after you compile Asterisk from source
Submitted by admin on Sun, 2006-08-06 08:03. Asterisk Programming | Communications1) apt-get install festival
2) nano /etc/festival.scm
3) paste:
;;; Command for Asterisk begin
(define (tts_textasterisk string mode)
"(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed for
use in server mode so a single function call may synthesize the string.
This function name may be added to the server safe functions."
(utt.send.wave.client (utt.wave.resample (utt.wave.rescale (utt.synth
(eval (list 'Utterance 'Text string))) 5) 8000)))
;;; Command for Asterisk end
4) restart festival / restart asterisk
A Marriage Made in Heaven: Sprint/Nextel Cellphone + Asterisk = Unlimited U.S. Cell Phone Calls for $5
Submitted by admin on Sun, 2006-07-23 03:58. Asterisk Programming | CommunicationsHuray! VOIP.
Sprint announced the availability of a new add-on for existing and new Sprint cellphone customers. For $5 more a month and a little Yankee ingenuity, you now can make unlimited FREE calls between your Sprint cellphone (or multiple PCS phones if you’re on a shared plan) and your residential phone number regardless of the wireline carrier. In short, your home phone service need not be with Sprint. If you have Sprint home phone service, then the new PCS to Home service will be free. In either case, no cellphone minutes will be assessed for inbound (read comments!) or outbound calls between your Sprint cellphone and your home number … ever. In fact, they’ll show up on your statement as PCS-to-PCS calls which are also free.
Setting up Asterisk and E911
Submitted by admin on Tue, 2006-05-30 06:31. Asterisk Programming | CommunicationsThe Asterisk Open Source PBX provides a cost effective way of achieving E911 compatibility when used in conjunction with a telephone carrier that offers E911 database management services to its customers. This database management service consists of a reverse directory maintained by the customer, but residing with the carrier, that assigns location information to private (DID) telephone numbers that the customer uses.
In order for E911 to function on an Asterisk PBX, each extension phone must be assigned a 10-digit DID number. This DID number is then registered with the telephone carrier along with the location of the phone.
Asterisk Day / Night Mode Example
Submitted by admin on Thu, 2006-05-11 13:03. Asterisk Programming | Communicationsexten => 4710,1,GotoIfTime(17:00-8:59|*|*|*?night-mode|1) ;break at night send directly to message otherwise just continue and dial
exten => 4710,2,GotoIfTime(12:00-12:59|*|*|*?night-mode|1);break for lunch
exten => 4710,3,Dial(Sip/521,15,tr)
exten => 4710,4,Goto(night-mode,1)
exten => night-mode,1,Answer
exten => night-mode,2,Wait(2)
exten => night-mode,3,SetMusicOnHold(default)
exten => night-mode,4,DigitTimeout,3
exten => night-mode,5,ResponseTimeout,20
exten => night-mode,6,Background(/astsounds/p1)
exten => night-mode,7,SetVar(LISTCOUNT=$[${LISTCOUNT} + 1]) ; increment
A sample Dialplan for an accounting office
Submitted by admin on Thu, 2005-11-03 05:00. Asterisk Programming | CommunicationsHey I just wanted to share with everyone the first dialplan that i created for a small 2 person accounting office. Have fund
[aa_1]
exten => 5,1,Playtones(!980/230,0)
exten => 5,2,AGI(festival-script.pl|Take 8 East then take the 67 north to wintergardens south exit.)
exten => 5,3,AGI(festival-script.pl|Travel approximatly 1 point 5 miles to. eight. eight. zero. seven. wintergardens boulevard.)
exten => 5,4,AGI(festival-script.pl|You will see us on the left hand side. The closest cross street is Garde-nia.)
exten => 5,5,Wait(2)
exten => 5,6,Background(to-hear-msg-again)
exten => 5,7,Background(press)


Recent comments
30 weeks 19 hours ago
40 weeks 2 days ago
40 weeks 2 days ago
45 weeks 3 days ago
52 weeks 19 hours ago
1 year 2 weeks ago
1 year 14 weeks ago
1 year 14 weeks ago
1 year 15 weeks ago
1 year 29 weeks ago