login | register
Sat 17 of May, 2008 [15:43 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.39s
  • Memory usage: 2.25MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 0.77

Asterisk auto-dial out deliver message

Auto-dial out and deliver a prerecorded message

This example showes how to automatically dial out to a phone number and deliver a specified prerecorded message. The outgoing messages may be rerecorded at any time, and the person answering the call is asked to acknowledge receipt. The trigger for the dial-out could be a cron job, an alarm from an network management system, or other external event.


; This is a sample section from an extensions.conf file showing how to auto-dial an outbound call
; and play a prerecorded message when the call is answered.
; To install this application:
;     Create message directory see [record-outboundmsgs] below for details
;     If needed, modify extension numbers and context names to make compatible with your local dialing plan
;     Add the contexts below to your /etc/extensions.conf file
;     Record messages see [record-outboundmsgs] below for details
;     Create a call file to test
;
; The outbound call can be triggered by a call file or manager commands via a telnet session
;
; Creating a call file to call 7026241632 using context @syndeo in the sip.conf file
; set the caller ID to 7022340175 when placing the call
; A correct Caller ID may be required when using some VOIP to PSTN gateway services.
;
; cat <<EOF > /var/spool/asterisk/tmp01
; Channel: SIP/7026241632@syndeo
; Callerid: 7022340175
; MaxRetries: 5
; RetryTime: 300
; WaitTime: 45
; Context: outboundmsg1
; Extension: s
; Priority: 1
; EOF
; mv /var/spool/asterisk/tmp01 /var/spool/asterisk/outgoing
;
;
; For more information see:
;   http://www.voip-info.org/wiki-Asterisk+auto-dial+out+deliver+message
;   http://www.voip-info.org/wiki-Asterisk+auto-dial+out
;   http://www.voip-info.org/wiki-Asterisk+manager+dialout
;



[outboundmsg1]
exten => s,1,DigitTimeout,5             ; Set Digit Timeout to 5 seconds
exten => s,2,ResponseTimeout,10         ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg1)         ; "play outbound msg"
exten => s,6,Background(outboundmsgs/how_to_ack)   ; "Press 1 to replay or 2 to acknowledge receiving this message"
exten => 1,1,Goto(s,5)   ; replay message
exten => 2,1,Goto(msgack,s,1) ; acknowledge message
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
; at this point we could do something like reschedule the call to try again later
; or send an email saying the msg was not received,
; or ...


[outboundmsg2]
exten => s,1,DigitTimeout,5             ; Set Digit Timeout to 5 seconds
exten => s,2,ResponseTimeout,10         ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg2)         ; "play outbound msg"
exten => s,6,Background(outboundmsgs/how_to_ack)   ; "Press 1 to replay or 2 to acknowledge receiving this message"
exten => 1,1,Goto(s,5)   ; replay message
exten => 2,1,Goto(msgack,s,1) ; acknowledge message
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
; at this point we could do something like reschedule the call to try again later
; or send an email saying the msg was not received,
; or ...


[msgack]
exten => s,1,Playback(outboundmsgs/thankyou)
exten => s,2,Playback(vm-goodbye)
exten => s,3,Hangup
; at this point we might want to log the message acknowledgement somewhere
; and perhaps trigger some additional processing


[record-outboundmsgs]
; Record voice files
;
; Before using this the first time
;    mkdir /var/lib/asterisk/sounds/outboundmsgs
;    chown asterisk_user:asterisk_user /var/lib/asterisk/sounds/outboundmsgs
;    (Where asterisk_user = the user that asterisk runs under: = root for many installations)
;
; In a context for incoming calls put something like
;  include => record-outboundmsgs
;
; Then call
;   2051 to Record a new outbound msg1
;   2052 to Record a new outbound msg2
;
;   2061 to Record the msg played when the recipient acks the message
;   2062 to Record the "How to ACK message"
;
; After dialing one of the extensions above:
;   Wait for the record start tone
;   Record your message
;   Press # to stop recording
;   Listen to an automatic playback of your new message
;
; outbound msg1
exten => 2051,1,Wait(2)
exten => 2051,2,Record(outboundmsgs/msg1:gsm)
exten => 2051,3,Wait(2)
exten => 2051,4,Playback(outboundmsgs/msg1)
exten => 2051,5,wait(2)
exten => 2051,6,Hangup
;
; outbound msg2
exten => 2052,1,Wait(2)
exten => 2052,2,Record(outboundmsgs/msg2:gsm)
exten => 2052,3,Wait(2)
exten => 2052,4,Playback(outboundmsgs/msg2)
exten => 2052,5,wait(2)
exten => 2052,6,Hangup
;
;
; Msg played when msg is acked
exten => 2061,1,Wait(2)
exten => 2061,2,Record(outboundmsgs/thankyou:gsm)
exten => 2061,3,Wait(2)
exten => 2061,4,Playback(outboundmsgs/thankyou)
exten => 2061,5,wait(2)
exten => 2061,6,Hangup
;
; Msg played after outbound msg: "Press 1 to replay or 2 to acknowledge receiving this message"
exten => 2062,1,Wait(2)
exten => 2062,2,Record(outboundmsgs/how_to_ack:gsm)
exten => 2062,3,Wait(2)
exten => 2062,4,Playback(outboundmsgs/how_to_ack)
exten => 2062,5,wait(2)
exten => 2062,6,Hangup




See also



Go back to Asterisk

Created by jht2, Last modification by Komnieve Singh on Wed 31 of Jan, 2007 [20:59 UTC]

Comments Filter

Asterisk 1.4.11

by Mark Shearer on Saturday 15 of September, 2007 [04:35:06 UTC]
The above code does not work with Asterisk 1.4.11. Here is the above code Tweaked to work with 1.4.11, FreePBX 2.3.0 and Centos 5.


Don't forget to add the follow to /etc/asterisk/extensions_additional.conf

Look for
from-internal-additional

and add this
include => record-outboundmsgs



;-------------------------------------------------------------------------------------------
;Add the Following to /etc/asterisk/extensions_custom.conf
;SEP2007
;BEGIN MASH Auto-dial out and deliver a prerecorded message

outboundmsg1
exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,2,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg1) ; "play outbound msg"
exten => s,6,Background(outboundmsgs/how_to_ack) ; "Press 1 to replay or 2 to acknowledge receiving this message"
exten => s,n,Noop(Waiting for input)
exten => s,n(end),WaitExten(60,)
exten => 1,1,Goto(s,5) ; replay message
exten => 2,1,Goto(msgack,s,1) ; acknowledge message
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
; at this point we could do something like reschedule the call to try again later
; or send an email saying the msg was not received,
; or ...



outboundmsg2
exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,2,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg2) ; "play outbound msg"
exten => s,6,Background(outboundmsgs/how_to_ack) ; "Press 1 to replay or 2 to acknowledge receiving this message"
exten => s,n,Noop(Waiting for input)
exten => s,n(end),WaitExten(60,)
exten => 1,1,Goto(s,5) ; replay message
exten => 2,1,Goto(msgack,s,1) ; acknowledge message
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
; at this point we could do something like reschedule the call to try again later
; or send an email saying the msg was not received,
; or ...

msgack
exten => s,1,Playback(outboundmsgs/thankyou)
exten => s,2,Playback(vm-goodbye)
exten => s,3,Hangup
; at this point we might want to log the message acknowledgement somewhere
; and perhaps trigger some additional processing


record-outboundmsgs
; Record voice files
;
; Before using this the first time
; mkdir /var/lib/asterisk/sounds/outboundmsgs
chown asterisk_user
asterisk_user /var/lib/asterisk/sounds/outboundmsgs

(Where asterisk_user = the user that asterisk runs under
= root for many installations)

;
; In a context for incoming calls put something like
; include => record-outboundmsgs
;
; Then call
; 2051 to Record a new outbound msg1
; 2052 to Record a new outbound msg2
;
; 2061 to Record the msg played when the recipient acks the message
; 2062 to Record the "How to ACK message" ; "Press 1 to replay or 2 to acknowledge receiving this message"

After dialing one of the extensions above

; Wait for the record start tone
; Record your message
; Press # to stop recording
; Listen to an automatic playback of your new message
;
; outbound msg1
exten => 2051,1,Wait(2)
exten => 2051,2,Record(outboundmsgs/msg1:gsm)
exten => 2051,3,Wait(2)
exten => 2051,4,Playback(outboundmsgs/msg1)
exten => 2051,5,wait(2)
exten => 2051,6,Hangup
;
; outbound msg2
exten => 2052,1,Wait(2)
exten => 2052,2,Record(outboundmsgs/msg2:gsm)
exten => 2052,3,Wait(2)
exten => 2052,4,Playback(outboundmsgs/msg2)
exten => 2052,5,wait(2)
exten => 2052,6,Hangup
;
;
; Msg played when msg is acked
exten => 2061,1,Wait(2)
exten => 2061,2,Record(outboundmsgs/thankyou:gsm)
exten => 2061,3,Wait(2)
exten => 2061,4,Playback(outboundmsgs/thankyou)
exten => 2061,5,wait(2)
exten => 2061,6,Hangup
;
Msg played after outbound msg
"Press 1 to replay or 2 to acknowledge receiving this message"

exten => 2062,1,Wait(2)
exten => 2062,2,Record(outboundmsgs/how_to_ack:gsm)
exten => 2062,3,Wait(2)
exten => 2062,4,Playback(outboundmsgs/how_to_ack)
exten => 2062,5,wait(2)
exten => 2062,6,Hangup


;END MASH Auto-dial out and deliver a prerecorded message
;-------------------------------------------------------------------------------------------

Re: It does not work

by Jonathan on Friday 14 of September, 2007 [01:35:35 UTC]
Carmen, creo que es porque el * cuando marca un zap de una vez lo toma como si hubiera contestado, no sé si por ahí andará la cosa...

It does not work

by Carmen Quiroz on Thursday 16 of August, 2007 [13:51:36 UTC]
I need aid please.

I am trying to do calls to analogical lines from asterisk using archives .call, the calls are made correctly but asterisk detcta the moment in I do not telephone is taken care of, before repique I even telephone to which I am calling asterisk says that the call already was answered by ayudenme to solve this problem.

P.D: Excuse my English, not to be written it very well.

Multiple Numbers

by sparcusa on Friday 04 of May, 2007 [17:21:53 UTC]
This may be a dumb question, but do you have to create a file for every number you want to call? Is there a way of dialing mulitple numbers without having to use an application? Seems very cumbersome if you have to create and manage a file for every call you want to make. Am I missing something?

Using FollowMe for unconfirmed status

by jamie easterman on Monday 12 of February, 2007 [14:21:58 UTC]
Hi,

This script looks excellent but we would like this to go a stage further and use a follow me group that we use for high priority actions required. So that if an alert is not acknowledged it will then cycle through the other agents available.

Is there an easy way to change this script to use the confirmation and followme features that come with the followme group facility.

Thanks in advance

Re: Auto Dial Out Troubles

by jmadden on Friday 27 of January, 2006 [21:54:34 UTC]
May be a silly question, but in extensions.conf, is your "alert" inside square brackets? I only ask because it is not in your example.

Re: Auto Dial Out Troubles

by atheos on Wednesday 24 of August, 2005 [14:28:16 UTC]
Fix your Callerid, cause some PRI's must see a number in your DID group.
Add your area code to your number, cause your PRI may require 10 digit numbers.

Re: Auto Dial Out Troubles

by cristian on Wednesday 11 of May, 2005 [17:27:22 UTC]
If try with background
Edit

how to handle failed calls

by Anonymous on Saturday 13 of November, 2004 [13:01:13 UTC]
I use the configuration showned with a Zap channel and it works correctly.
Unfortunateli I am not able to handle Failed calls as , buly line, channel unavailable, wrong number. Ther is a way to handle in the extension such a errors. Thanks

wow. didnt know you could do this.

by sjobeck on Friday 23 of July, 2004 [07:27:57 UTC]
(:razz:)

Wow, I didnt know you could do this. This is really great. I think I'll have to tie this in to our monitoring softwares to know when things are offline, it could alert the client.

Have you updated this since posting it? Do you tie it in to email? instant messengers? anything like that? etc? etc? etc?

Thanks.

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver