Automated dial out

flaviomonteiro
Posts: 19
Member Since:
2007-10-05

Hi,
I would like some help to make a automated dial out
I have done everything from the page
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out+deliver...
Auto-dial out and deliver a prerecorded message
I have inserted in the extensions-custom.conf

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[from-internal-custom]
include => custom-record-outboundmsgs

[custom-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 ...

[custom-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 ...

[custom-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

[custom-record-outboundmsgs]

; 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
Record voice files

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

And before using this the first time I have done the commands:
mkdir /var/lib/asterisk/sounds/outboundmsgs
chown root:root/var/lib/asterisk/sounds/outboundmsgs

Then called to the extensions:
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"
and for each one I:
Waited for the record start tone
Recorded the message
Pressed # to stop recording
and I listened to an automatic playback of new message.

The problem was, when I created a 1.call file to auto dial to the extension 2000 in the directory /var/spool/asterisk/tmp01 /var/spool/asterisk/tmp
and moved it to the directory /var/spool/asterisk/tmp01 /var/spool/asterisk/outgoing,
It didn't work.
XXXXXXXXXXXXXXXXX
Channel: SIP/2000
Callerid: 2001
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: custom-outboundmsg1
Extension: s
Priority: 1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Please, could someone help me?
Thanks



flaviomonteiro
Posts: 19
Member Since:
2007-10-05
Help me please

Help me please



MClauss
Posts: 4
Member Since:
2008-12-11
Almost works for me

I got the the call to automatically connect by doing chown asterisk:asterisk 1.call , but instead of playing the recorded messages the call terminates.
I've been searching around for a solution to this with no luck. Did you ever get this to work?



MClauss
Posts: 4
Member Since:
2008-12-11
I have changed the

I have changed the outboundmsg1 context and can get the call to auto generate, playback the messages and hang up so it's mostly correct.
My paths and message names are a little different.
[custom-outboundmsg1]
exten => s,1,Playback(automsg1) ; "play outbound msg"
exten => s,2,Wait(3)
exten => s,3,Playback(autothankyou)
exten => s,4,Hangup

The original context breaks immediately and hangs up.



ziplace
Posts: 7
Member Since:
2009-05-26
Questions

Hello,

I am trying to do exactly the same thing : make a automated outgoing call and play a message. But I can't make it work. Here is what I've done :

1. I add those lines at the end of the /etc/asterisk/extensions_custom.conf :

[custom-outboundmsg1]
exten => s,1,Playback(vm-goodbye)
exten => s,2,Wait(3)
exten => s,3,Hangup

2. Then I created a file called "1.call" under "/var/spool/asterisk/tmp", here is the contain of the file:
Channel: SIP/102
CallerID: Skype
MaxRetries: 5
RetryTime: 300
WaitTime: 45
Context: custom-outboundmsg1
Extension: s
Priority: 1

3. Then I copy "1.call" to "/var/spool/asterisk/outgoing/" and do "chown asterisk:asterisk /var/spool/asterisk/outgoing/1.call"

4. And finally, nothing append

Where am I wrong ? Do I miss something?



b14ck
Posts: 773
Member Since:
2009-03-03
Yep. Do the: chown

Yep. Do the:

chown asterisk:asterisk 1.call

BEFORE you move the file to /var/spool/asterisk/outgoing :)

Also, in your context, make it Answer() the call before playing the messages, etc. Just to be official about it!

--

Randall Degges
Lead Developer, RCI Telecommunications
projectb14ck - http://projectb14ck.org/ - Weblog



ziplace
Posts: 7
Member Since:
2009-05-26
Report

Ok thank you for the answer, but,

If I do the chown before copying, rights change back to "root:root" after the copying. In fact I have found a very strange way to trigger the call : open the 1.call file with "vi". Strange no? If I put the 1.call file on the directory with good permissions nothing append but when I open the file " vi 1.call", the call is trigerred.



ziplace
Posts: 7
Member Since:
2009-05-26
Auto dialout to outbound routes

Hello, i try now to make a autodialout call to a cellular using an outbound route. The outbound route works well if I make the call from XLITE, i write : 8+ and it works.

But with a .call file i can't do it, I tried several syntaxes for the "Channel" field, for example : "Channel: SIP/8+cellularNumber", "Channel: SIP/cellularNumber", etc

But it doesn't call, can anybody help me?



b14ck
Posts: 773
Member Since:
2009-03-03
ziplace, try: Channel:

ziplace, try:

Channel: SIP/xxxxxxxxxx@yoursiptrunkname

--

Randall Degges
Lead Developer, RCI Telecommunications
projectb14ck - http://projectb14ck.org/ - Weblog



ziplace
Posts: 7
Member Since:
2009-05-26
Hello, I found a solution

Hello,

I found a solution that works to auto-dialout external phone devices. So first, like I said, I created a outbound route that is used when the phone number destination is 'like 8+number'. And then, i write this for the 'channel' field of the .call file :

"Channel: Local/8+number@outbound-allroutes"

I don't really understand because "outbound-allroutes" is not the name of my outbound route, but it works, i found it on the forum. I suppose "outbound-allroutes" is the default route used by all outbound routes created. Hope it will help in the futur. Thanks to all for answers.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.