Quantcast
Channel: VOIP-info.org Wiki Changes
Viewing all articles
Browse latest Browse all 5767

Asterisk auto-dial out deliver message

$
0
0

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,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 ... ...

Viewing all articles
Browse latest Browse all 5767

Trending Articles