Solved

How to implement the following application in asterisk with freepbx

Posted on 2010-09-17
2
797 Views
Last Modified: 2013-11-12
Hi all

how would I implement the following application (auto dial out) in asterisk and freepbx?
thanks in advance
; 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,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 => 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 => 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

Open in new window

0
Comment
Question by:alexanderfoti
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
nttranbao earned 500 total points
ID: 33796382
1. Do the following once in linux console:

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)


2. Add to your extensions_custom.conf, under [from-internal-custom] context.

[from-internal-custom]
;add from line 1 to line 79
;continue to add from line 88 to 132

3. Still in extensions_custom.conf, add under [from-pstn-custom] context:
[from-pstn-custom]
include => record-outboundmsgs


0
 
LVL 7

Expert Comment

by:nttranbao
ID: 33891581
Hi. how does it go?
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cisco ISR - SIP and CUBE - CUCM 10 5 63
AIM-CUE installation on router 2811 2 76
Setting up a Good IVR 2 44
Cisco UCM licensing - do the unregistered count? 2 70
Ever wanted to query Cisco Call Manager CDR records from MS SQL Server? Here's how! CUCM can be configured to upload a CDR file to a given FTP server every minute. This article will show you how to set this up, schedule the import of this data an…
I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question