[Asterisk-Users] Auto callout - reminder - is it possible?
Roger Hanson
roger at makarios.us
Mon Jan 24 16:58:49 MST 2005
Sorry, I don't know what happened to my line returns. Here's that
message readable.
> On January 24, 2005 08:38 am, Roger Hanson wrote:
>> I did see the wiki items: "asterisk auto-dial out deliver message"
>> and
>> "Asterisk Auto-dial out" and think I may be able to muddle my way
>> through getting that working (although that may be questionable) but
>> is
>> it feasable to integrate this wit a website, where a user enters a
>> phone
>> number in a form, then asterisk somehow gets this information from
>> the
>> website and it gets added to a database or some way for Asterisk to
>> gather that information and make the phone calls automatically? Maybe
>> with another option on what type of notification it would be (furnace
>> filter, 1 month reminder, 2 month reminder) based on a variable in
>> the
>> form?
>
> The callout in the wiki blows goatass -- at least the voicemail one --
> I have
> a cron script which looks for messages in the watched "INBOX" folders
> and
> generates a callout every 5 minutes until the message is listened to
> (at
> which time it is moved to the Old folder).
>
> As far as integrating with a website or database -- that is a piece of
> cake.
> Your backend logic just determines when a call is needed and gerates
> the
> approprate .call file. Just remember to create it in /tmp or
> something,
> close it and then MOVE it to the outgoing spool instead of creating
> and
> working on it in the outgoing spool.
>
> -A.
OK - I've made some progress. I was able to use the wiki page "Asterisk
auto-dail out deliver message" to record the messages, successfully.
Now, I can't figure out this auto-dial thing. Nothing happens when I
move the call file to the /outgoing/ directory
I have a file made in /var/spool/asterisk/tmp01 called 1.call. Here it
is:
------------------------------------------------------------------------
Channel: ZAP/go/9337367
Callerid: 9524458585
MaxRetries: 5
RetryTimie: 300
WaitTime: 45
Context: outboundmsg1
Extension: s
Priority: 1
----------------------------------------------------------------------
I copy it to /var/spool/asterisk/outgoing and it magically disappears
(or does not appear?) in /var/spool/asterisk and nothing happens. I
have another CLI window to asterisk and nothing passes by - just dead.
Now, I'm using AMP, if that matters.
I've added the following to extensions.conf:
-------------------------------------------------------------------
[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
--------------------------------------------------------------
Which is working correctly. I can see that I've recorded and saved the
above files in the correct places.
In extensions.conf, I added this line:
------------------------------------------------------------
include extensions_callout.conf
-------------------------------------------------------------
Because I thought that may survive an AMP reload?
Then I created another .conf file, called extensions_callout.conf as
shown:
---------------------------------------------------------------
[outboundmsg1]
exten => s,1,DigitTimeout,5
exten => s,2,ResponseTimeout,10
exten => s,3,Answer
exten => s,4,Wait(1)
exten => s,5,Background(outboundmsgs/msg1)
exten => s,6,Background(outboundmsgs/how_to_ack)
exten => 1,1Goto(s,5)
exten => 2,1,Goto(msgack,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
[msgack]
exten => s,1,Playback(outboundmsgs/thankyou)
exten => s,2,Playback(vm-goodbye)
[record-outboundmsgs]
;Before using this the first time
; mkdir /var/lib/asterisk/sounds/outboundmsgs
; chown asterisk_user:asterisk_user
/var/lib/asterisk/sounds/outboundmsgs
;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 acs 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 messsage
;
; outbound msg1
exten => 2051,1,Wait(2)
exten => 2051,2,Record(outboundmsgs/msg1:gsm)
exten => 2051,3,Wait(2)
exten => 2051,4,Playbacak(outboundmsgs/msg1)
exten => 2051,5,Wait(2)
exten => 2051,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
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
;
;
--------------------------------------------------------------------
Am I way off base here? I'm new to asterisk and definately over my
head.
Help?
I can supply more information as needed.
More information about the asterisk-users
mailing list